Rectangle objects to be used for clipping via GL20#glScissor(int, int, int, int). When a new
Rectangle is pushed onto the stack, it will be merged with the current top of stack. The minimum area of overlap is then set as
the real top of the stack.
| Modifier and Type | Field and Description |
|---|---|
| private static Array | |
| pack-priv static Vector3 | |
| pack-priv static final Rectangle |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | calculateScissors(Camera camera, Matrix4 batchTransform, Rectangle area, Rectangle scissor)
Calculates a scissor rectangle using 0,0,Gdx.graphics.getWidth(),Gdx.graphics.getHeight() as the viewport. |
| public static void | calculateScissors(Camera
the camera, float viewportX, float viewportY, float viewportWidth, float viewportHeight, Matrix4 Camerathe transformation batchTransform, Rectangle Matrix4the area, Rectangle Rectangle to transform to window coordinatesthe Rectangle to store the result in scissor)Calculates a scissor rectangle in OpenGL ES window coordinates from a |
| private static void | |
| public static Rectangle | getViewport()
Returns: the current viewport in OpenGL ES window coordinates based on the currently applied scissor |
| public static Rectangle | |
| public static Rectangle | popScissors()
Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. |
| public static boolean | Returns: true if the scissors were pushed. false if the scissor area was zero, in this case the scissors were not pushed and no drawing should occur.Pushes a new scissor |
| scissors | back to summary |
|---|---|
| private static Array<Rectangle> scissors | |
| tmp | back to summary |
|---|---|
| pack-priv static Vector3 tmp | |
| viewport | back to summary |
|---|---|
| pack-priv static final Rectangle viewport | |
| ScissorStack | back to summary |
|---|---|
| public ScissorStack() | |
| calculateScissors | back to summary |
|---|---|
| public static void calculateScissors(Camera camera, Matrix4 batchTransform, Rectangle area, Rectangle scissor) Calculates a scissor rectangle using 0,0,Gdx.graphics.getWidth(),Gdx.graphics.getHeight() as the viewport. | |
| calculateScissors | back to summary |
|---|---|
| public static void calculateScissors(Camera camera, float viewportX, float viewportY, float viewportWidth, float viewportHeight, Matrix4 batchTransform, Rectangle area, Rectangle scissor) Calculates a scissor rectangle in OpenGL ES window coordinates from a | |
| fix | back to summary |
|---|---|
| private static void fix(Rectangle rect) | |
| getViewport | back to summary |
|---|---|
public static Rectangle getViewport()
| |
| peekScissors | back to summary |
|---|---|
| public static Rectangle peekScissors() | |
| popScissors | back to summary |
|---|---|
| public static Rectangle popScissors() Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. In case
no more rectangles are on the stack, Any drawing should be flushed before popping scissors. | |
| pushScissors | back to summary |
|---|---|
| public static boolean pushScissors(Rectangle scissor) Pushes a new scissor Any drawing should be flushed before pushing scissors.
| |