Version: Unity 6.4 (6000.4)
LanguageEnglish
  • C#

Painter2D.PushClip

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void PushClip();

Description

Uses the current path as a clipping region. This region clips subsequent Fill() and Stroke() operations.


For performance reasons, this only works for Painter2D instances created with "new Painter2D()" to be eventually saved to a VectorImage using SaveToVectorImage. This will not work with Painter2D attached to a MeshGenerationContext.

Note that the clipped shapes will not have antialiased edges since the clipping path is applied by doing a per-triangle clipping process. Use PopClip() to remove the most recently added clipping region.