| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static void | |
| public static void | clear(float r, float g, float b, float a, boolean
Clears the depth buffer if true. clearDepth)Clears the color buffers and optionally the depth buffer. |
| public static void | clear(float r, float g, float b, float a, boolean
Clears the depth buffer if true. clearDepth, boolean applies multi-sampling for antialiasing if true. applyAntialiasing)Clears the color buffers, optionally the depth buffer and whether to apply antialiasing (requires to set number of samples in the launcher class). |
| public static byte[] | getFrameBufferPixels(boolean
whether to flip pixels along Y axis flipY)Returns the current framebuffer contents as a byte[] array with a length equal to screen width * height * 4. |
| public static byte[] | getFrameBufferPixels(int x, int y, int w, int h, boolean
whether to flip pixels along Y axis flipY)Returns a portion of the current framebuffer contents specified by x, y, width and height, as a byte[] array with a length equal to the specified width * height * 4. |
| public static Pixmap | getFrameBufferPixmap(int x, int y, int w, int h)
Deprecated
use
Pixmap#createFromFrameBuffer(int, int, int, int) instead.
|
| public static TextureRegion | getFrameBufferTexture()
Returns the current framebuffer contents as a |
| public static TextureRegion | getFrameBufferTexture(int
the x position of the framebuffer contents to capture x, int the y position of the framebuffer contents to capture y, int the width of the framebuffer contents to capture w, int the height of the framebuffer contents to capture h)Returns a portion of the current framebuffer contents specified by x, y, width and height as a |
| ScreenUtils | back to summary |
|---|---|
| public ScreenUtils() | |
| clear | back to summary |
|---|---|
| public static void clear(Color color) Clears the color buffers with the specified Color.
| |
| clear | back to summary |
|---|---|
| public static void clear(float r, float g, float b, float a) Clears the color buffers with the specified color. | |
| clear | back to summary |
|---|---|
| public static void clear(Color color, boolean clearDepth) Clears the color buffers and optionally the depth buffer.
| |
| clear | back to summary |
|---|---|
| public static void clear(float r, float g, float b, float a, boolean clearDepth) Clears the color buffers and optionally the depth buffer.
| |
| clear | back to summary |
|---|---|
| public static void clear(float r, float g, float b, float a, boolean clearDepth, boolean applyAntialiasing) Clears the color buffers, optionally the depth buffer and whether to apply antialiasing (requires to set number of samples in the launcher class).
| |
| getFrameBufferPixels | back to summary |
|---|---|
| public static byte[] getFrameBufferPixels(boolean flipY) Returns the current framebuffer contents as a byte[] array with a length equal to screen width * height * 4. The byte[] will always contain RGBA8888 data. Because of differences in screen and image origins the framebuffer contents should be flipped along the Y axis if you intend save them to disk as a bitmap. Flipping is not a cheap operation, so use this functionality wisely.
| |
| getFrameBufferPixels | back to summary |
|---|---|
| public static byte[] getFrameBufferPixels(int x, int y, int w, int h, boolean flipY) Returns a portion of the current framebuffer contents specified by x, y, width and height, as a byte[] array with a length equal to the specified width * height * 4. The byte[] will always contain RGBA8888 data. If the width and height specified are larger than the framebuffer dimensions, the Texture will be padded accordingly. Pixels that fall outside of the current screen will have RGBA values of 0. Because of differences in screen and image origins the framebuffer contents should be flipped along the Y axis if you intend save them to disk as a bitmap. Flipping is not a cheap operation, so use this functionality wisely.
| |
| getFrameBufferPixmap | back to summary |
|---|---|
| public static Pixmap getFrameBufferPixmap(int x, int y, int w, int h)
Deprecated use
| |
| getFrameBufferTexture | back to summary |
|---|---|
| public static TextureRegion getFrameBufferTexture() Returns the current framebuffer contents as a | |
| getFrameBufferTexture | back to summary |
|---|---|
| public static TextureRegion getFrameBufferTexture(int x, int y, int w, int h) Returns a portion of the current framebuffer contents specified by x, y, width and height as a
| |