PushClip()
Uses the current path as a clipping region. This region clips subsequent Fill() and Stroke() operations.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
public void PushClip()
Remarks
For performance reasons, this only works for Painter2D instances created with "new Painter2D()" to be eventually saved to a VectorImage using Painter2D.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.