public interface JavaFramebuffer
extends java.io.Closeable
Java2D-based framebuffer interface
This class provides an interface between BufferedImages and native framebuffers.
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the hardware framebuffer.
|
java.awt.image.BufferedImage |
createCompatibleBuffer()
Create full-screen buffer.
|
java.awt.image.BufferedImage |
createCompatibleBuffer(int width,
int height)
Create pixel-compatible buffer with a specified size.
|
java.awt.image.BufferedImage |
createCompatibleBuffer(int width,
int height,
int stride)
Create pixel-compatible buffer with a specified size and stride.
|
java.awt.image.BufferedImage |
createCompatibleBuffer(int width,
int height,
int stride,
byte[] backed)
Create pixel-compatible buffer with a specified size and stride.
|
void |
flushScreen(java.awt.image.BufferedImage compatible)
Write full-screen buffer into the framebuffer.
|
DisplayInterface |
getDisplay()
Get the associated display manager.
|
int |
getHeight()
Query framebuffer height.
|
int |
getStride()
Query framebuffer scanline stride, e.g.
|
int |
getWidth()
Query framebuffer width.
|
void |
restoreData()
Restore original hardware framebuffer state.
|
void |
setFlushEnabled(boolean rly)
Controls whether
flushScreen(BufferedImage) has effect or not. |
void |
storeData()
Store current hardware framebuffer state.
|
int getWidth()
int getHeight()
int getStride()
java.awt.image.BufferedImage createCompatibleBuffer()
java.awt.image.BufferedImage createCompatibleBuffer(int width, int height)
width
- Requested image width.height
- Requested image height.java.awt.image.BufferedImage createCompatibleBuffer(int width, int height, int stride)
width
- Requested image width.height
- Requested image height.stride
- Requested scanline stride.java.awt.image.BufferedImage createCompatibleBuffer(int width, int height, int stride, byte[] backed)
width
- Requested image width.height
- Requested image height.stride
- Requested scanline stride.void flushScreen(java.awt.image.BufferedImage compatible)
compatible
- What to draw onto the screen.void setFlushEnabled(boolean rly)
flushScreen(BufferedImage)
has effect or not.rly
- Whether flushing should be enabled or not.void storeData()
void restoreData()
void clear()
DisplayInterface getDisplay()