IRenderer.PushScissorRect(Nullable) Method
Definition¶
Namespace: Brine2D.Rendering
Push the current scissor rect onto a stack and set a new one. Useful for nested clipping regions (e.g., nested scroll views).
void PushScissorRect(System.Nullable<Brine2D.Core.Rectangle> rect);
Parameters¶
rect System.Nullable<Rectangle>
New scissor rectangle, or null to disable clipping
Example¶
// Outer panel
renderer.PushScissorRect(outerPanelBounds);
RenderOuterPanel();
// Inner scroll view (clipped to both outer and inner)
renderer.PushScissorRect(innerScrollViewBounds);
RenderScrollContent();
renderer.PopScissorRect();
renderer.PopScissorRect();
Remarks¶
This is particularly useful when rendering UI hierarchies where child elements need to be clipped to parent bounds.