Class Graphics2DFramebuffer
java.lang.Object
net.minestom.server.map.framebuffers.Graphics2DFramebuffer
- All Implemented Interfaces:
Framebuffer
public class Graphics2DFramebuffer extends java.lang.Object implements Framebuffer
Framebuffer
that embeds a BufferedImage, allowing for rendering directly via Graphics2D or its pixel array.-
Field Summary
-
Constructor Summary
Constructors Constructor Description Graphics2DFramebuffer()
-
Method Summary
Modifier and Type Method Description int
get(int x, int z)
java.awt.image.BufferedImage
getBackingImage()
java.awt.Graphics2D
getRenderer()
Graphics2DFramebuffer
set(int x, int z, int rgb)
byte[]
toMapColors()
-
Constructor Details
-
Graphics2DFramebuffer
public Graphics2DFramebuffer()
-
-
Method Details
-
getRenderer
public java.awt.Graphics2D getRenderer() -
getBackingImage
public java.awt.image.BufferedImage getBackingImage() -
get
public int get(int x, int z) -
set
-
toMapColors
public byte[] toMapColors()- Specified by:
toMapColors
in interfaceFramebuffer
-