public interface MapCanvas
MapRenderer
and represents that renderer's layer on the
map.Modifier and Type | Method | Description |
---|---|---|
void |
drawImage(int x,
int y,
@NotNull Image image) |
Draw an image to the map.
|
void |
drawText(int x,
int y,
@NotNull MapFont font,
@NotNull String text) |
Render text to the map using fancy formatting.
|
byte |
getBasePixel(int x,
int y) |
Get a pixel from the layers below this canvas.
|
@NotNull MapCursorCollection |
getCursors() |
Get the cursor collection associated with this canvas.
|
@NotNull MapView |
getMapView() |
Get the map this canvas is attached to.
|
byte |
getPixel(int x,
int y) |
Get a pixel from the canvas.
|
void |
setCursors(@NotNull MapCursorCollection cursors) |
Set the cursor collection associated with this canvas.
|
void |
setPixel(int x,
int y,
byte color) |
Draw a pixel to the canvas.
|
@NotNull @NotNull MapView getMapView()
@NotNull @NotNull MapCursorCollection getCursors()
void setCursors(@NotNull @NotNull MapCursorCollection cursors)
cursors
- The MapCursorCollection to associate with this canvas.void setPixel(int x, int y, byte color)
x
- The x coordinate, from 0 to 127.y
- The y coordinate, from 0 to 127.color
- The color. See MapPalette
.byte getPixel(int x, int y)
x
- The x coordinate, from 0 to 127.y
- The y coordinate, from 0 to 127.MapPalette
.byte getBasePixel(int x, int y)
x
- The x coordinate, from 0 to 127.y
- The y coordinate, from 0 to 127.MapPalette
.void drawImage(int x, int y, @NotNull @NotNull Image image)
x
- The x coordinate of the image.y
- The y coordinate of the image.image
- The Image to draw.void drawText(int x, int y, @NotNull @NotNull MapFont font, @NotNull @NotNull String text)
MapPalette
).x
- The column to start rendering on.y
- The row to start rendering on.font
- The font to use.text
- The formatted text to render.Copyright © 2020. All rights reserved.