public static class MapDisplay.Layer extends MapCanvas
Modifier and Type | Method and Description |
---|---|
byte[] |
getBuffer()
Gets the backing color data buffer for all the data in this canvas.
|
int |
getHeight()
Gets the height of this canvas
|
int |
getWidth()
Gets the width of this canvas
|
MapDisplay.Layer |
next()
Gets the layer that follows this one, creating a new layer if required.
|
MapDisplay.Layer |
previous()
Gets the layer that precedes this one, creating a new layer if required.
|
byte |
readPixel(int x,
int y)
Reads the pixel color value of a single pixel
|
byte[] |
readPixels(int x,
int y,
int w,
int h,
byte[] dst_buffer)
Reads the raw pixel color data for a particular area in this canvas.
|
void |
writePixel(int x,
int y,
byte color)
Updates the pixel color of a single pixel.
|
MapCanvas |
writePixelsFill(int x,
int y,
int w,
int h,
byte color)
Fills a rectangular area in this canvas with a single color.
|
calcFontSize, calcFontSize, calcFontSize, clear, clearDepthBuffer, clearDepthBuffer, clearRectangle, clone, draw, draw, draw, draw, draw, drawContour, drawCopy, drawItem, drawLine, drawLine, drawModel, drawModel, drawModel, drawMove, drawPixel, drawQuad, drawQuad, drawQuad, drawRawData, drawRawData, drawRectangle, fill, fillItem, fillRectangle, getAlignment, getBlendMode, getDepth, getDepthBuffer, getView, getView, hasMoreDepth, hasMoreDepth, movePixels, readPixels, readPixels, remap, setAlignment, setBlendMode, setBrushMask, setDrawDepth, setLightOptions, setLightOptions, setRelativeBrushMask, setSpacing, toJavaImage, writePixels
public final int getWidth()
MapCanvas
public final int getHeight()
MapCanvas
public final byte[] getBuffer()
MapCanvas
MapCanvas.readPixels()
instead.
This data is formatted in such a way that:
public MapDisplay.Layer next()
public MapDisplay.Layer previous()
public MapCanvas writePixelsFill(int x, int y, int w, int h, byte color)
MapCanvas
writePixelsFill
in class MapCanvas
x
- - coordinate of the top-left corner of the areay
- - coordinate of the top-left corner of the areaw
- - width of the areah
- - height of the areacolor
- to fillpublic final void writePixel(int x, int y, byte color)
MapCanvas
writePixel
in class MapCanvas
x
- - coordinate of the pixely
- - coordinate of the pixelcolor
- to drawpublic final byte readPixel(int x, int y)
MapCanvas
public byte[] readPixels(int x, int y, int w, int h, byte[] dst_buffer)
MapCanvas
readPixels
in class MapCanvas
x
- - coordinate of the top-left corner of the areay
- - coordinate of the top-left corner of the areaw
- - width of the areah
- - height of the areadst_buffer
- - buffer to write the pixels to