Class Scissors
java.lang.Object
io.github.cottonmc.cotton.gui.client.Scissors
Deprecated, for removal: This API element is subject to removal in a future version.
Contains a stack for GL scissors for restricting the drawn area of a widget.
- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Deprecated, for removal: This API element is subject to removal in a future version.A single scissor frame in the stack. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
pop()
Deprecated, for removal: This API element is subject to removal in a future version.Pops the topmost scissor frame and refreshes the scissored area.static Scissors.Frame
push
(DrawContext context, int x, int y, int width, int height) Deprecated, for removal: This API element is subject to removal in a future version.Pushes a new scissor frame onto the stack and refreshes the scissored area.
-
Method Details
-
push
Deprecated, for removal: This API element is subject to removal in a future version.Pushes a new scissor frame onto the stack and refreshes the scissored area.- Parameters:
context
- the associated draw contextx
- the frame's X coordinatey
- the frame's Y coordinatewidth
- the frame's width in pixelsheight
- the frame's height in pixels- Returns:
- the pushed frame
-
pop
public static void pop()Deprecated, for removal: This API element is subject to removal in a future version.Pops the topmost scissor frame and refreshes the scissored area.- Throws:
IllegalStateException
- if there are no scissor frames on the stack
-
DrawContext
instead.