Class ScissorStack

java.lang.Object
foundry.veil.api.client.ui.util.ScissorStack

public class ScissorStack extends Object
A utility class to manage scissor clipping regions. This allows for restricting rendering to specific rectangular areas.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    pop()
    Removes the top scissor clipping region from the stack.
    void
    push(int x, int y, int width, int height)
    Pushes a new scissor clipping region onto the stack.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScissorStack

      public ScissorStack()
  • Method Details

    • push

      public void push(int x, int y, int width, int height)
      Pushes a new scissor clipping region onto the stack. The region is automatically constrained by any existing regions on the stack.
      Parameters:
      x - The x-coordinate of the top-left corner of the region.
      y - The y-coordinate of the top-left corner of the region.
      width - The width of the region.
      height - The height of the region.
    • pop

      public void pop()
      Removes the top scissor clipping region from the stack. If there are any regions remaining, the previous region is reapplied.