Skip to main content
Version: 15.x (API 15) [Legacy]

Class ClipRectDisposable

Assembly: Dalamud.dll​
Declaration
public sealed class ClipRectDisposable : IDisposable

Implements:
System.IDisposable

Properties​

Count​

Gets the number of ClipRects currently pushed with this object.

Declaration
public int Count { get; }

Methods​

Push(in Vector2, in Vector2, bool, bool)​

Push a new global ClipRect.

Declaration
public ClipRectDisposable Push(in Vector2 topLeft, in Vector2 bottomRight, bool intersectWithCurrentClipRect = false, bool condition = true)
Returns​

Dalamud.Interface.Utility.Raii.ClipRectDisposable: A disposable object that can be used to push further ClipRects and pops those ClipRects after leaving scope. Use with using.

Parameters​
TypeNameDescription
System.Numerics.Vector2topLeftThe top-left corner of the rectangle in screen coordinates.
System.Numerics.Vector2bottomRightThe bottom-right corner of the rectangle in screen coordinates.
System.BooleanintersectWithCurrentClipRectWhether to intersect the rectangle with the current existing ClipRect or to replace it.
System.BooleanconditionIf this is false, the ClipRect is not pushed.
Remarks​

If you need to keep ClipRects pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ClipRectDisposable.PopUnsafe(int).

Push(in Vector2, in Vector2, bool)​

Push a new global ClipRect.

Declaration
public ClipRectDisposable Push(in Vector2 topLeft, in Vector2 bottomRight, bool intersectWithCurrentClipRect = false)
Returns​

Dalamud.Interface.Utility.Raii.ClipRectDisposable: A disposable object that can be used to push further ClipRects and pops those ClipRects after leaving scope. Use with using.

Parameters​
TypeNameDescription
System.Numerics.Vector2topLeftThe top-left corner of the rectangle in screen coordinates.
System.Numerics.Vector2bottomRightThe bottom-right corner of the rectangle in screen coordinates.
System.BooleanintersectWithCurrentClipRectWhether to intersect the rectangle with the current existing ClipRect or to replace it.
Remarks​

If you need to keep ClipRects pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ClipRectDisposable.PopUnsafe(int).

Push(in Rectangle, bool, bool)​

Push a new global ClipRect.

Declaration
public ClipRectDisposable Push(in Rectangle rectangle, bool intersectWithCurrentClipRect = false, bool condition = true)
Returns​

Dalamud.Interface.Utility.Raii.ClipRectDisposable: A disposable object that can be used to push further ClipRects and pops those ClipRects after leaving scope. Use with using.

Parameters​
TypeNameDescription
Dalamud.Interface.Utility.RectanglerectangleThe rectangle in screen coordinates.
System.BooleanintersectWithCurrentClipRectWhether to intersect the rectangle with the current existing ClipRect or to replace it.
System.BooleanconditionIf this is false, the ClipRect is not pushed.
Remarks​

If you need to keep ClipRects pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ClipRectDisposable.PopUnsafe(int).

Push(in Rectangle, bool)​

Push a new global ClipRect.

Declaration
public ClipRectDisposable Push(in Rectangle rectangle, bool intersectWithCurrentClipRect = false)
Returns​

Dalamud.Interface.Utility.Raii.ClipRectDisposable: A disposable object that can be used to push further ClipRects and pops those ClipRects after leaving scope. Use with using.

Parameters​
TypeNameDescription
Dalamud.Interface.Utility.RectanglerectangleThe rectangle in screen coordinates.
System.BooleanintersectWithCurrentClipRectWhether to intersect the rectangle with the current existing ClipRect or to replace it.
Remarks​

If you need to keep ClipRects pushed longer than the current scope, use without using and use Dalamud.Interface.Utility.Raii.ClipRectDisposable.PopUnsafe(int).

Pop(int)​

Pop a number of ClipRects in this draw list.

Declaration
public void Pop(int count = 1)
Parameters​
TypeNameDescription
System.Int32countThe number of ClipRects to pop. This is clamped to the number of ClipRects pushed by this object.

Dispose()​

Pop all ClipRects pushed with this object.

Declaration
public void Dispose()

PopUnsafe(int)​

Pop a number of ClipRects from the ClipRect stack without using an IDisposable.

Declaration
public static void PopUnsafe(int count = 1)
Parameters​
TypeNameDescription
System.Int32countThe number of rects to pop. The number is not checked against the rect stack.
Remarks​

Avoid using this function, and ClipRects across scopes, as much as possible.

Implements​

  • System.IDisposable