![]() |
Gridarta Editor
|
Paints overlays for map grids. More...
Public Member Functions | |
GridMapSquarePainter (@NotNull final ResourceIcons resourceIcons) | |
Creates a new instance. More... | |
void | paint (@NotNull final Graphics graphics, final int gridFlags, final boolean light, final int x, final int y, @NotNull final ImageObserver imageObserver) |
Paints overlay images for one grid square. More... | |
Private Attributes | |
final Image | cursorImg |
The overlay Image for MapGrid#GRID_FLAG_CURSOR. More... | |
final Image | lightSquare |
The overlay Image for map squares that are affected by light emitting game objects. More... | |
final Image | preSelImg |
The overlay Image for MapGrid#GRID_FLAG_SELECTING. More... | |
final Image | selImg |
The overlay Image for MapGrid#GRID_FLAG_SELECTION. More... | |
final Image | selImgEast |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_EAST. More... | |
final Image | selImgNorth |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_NORTH. More... | |
final Image | selImgSouth |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_SOUTH. More... | |
final Image | selImgWest |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_WEST. More... | |
final Image | warningSquareImg |
The overlay Image for MapGrid#GRID_FLAG_ERROR. More... | |
Paints overlays for map grids.
Instances do not hold internal state; they may be accessed concurrently.
Definition at line 34 of file GridMapSquarePainter.java.
net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter | ( | @NotNull final ResourceIcons | resourceIcons | ) |
Creates a new instance.
resourceIcons | the resource icons for creating icons |
Definition at line 86 of file GridMapSquarePainter.java.
References net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.cursorImg, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.lightSquare, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.preSelImg, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImg, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgEast, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgNorth, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgSouth, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgWest, net.sf.gridarta.utils.ResourceIcons.SQUARE_CURSOR, net.sf.gridarta.utils.ResourceIcons.SQUARE_PRE_SELECTED_SQUARE, net.sf.gridarta.utils.ResourceIcons.SQUARE_SELECTED_SQUARE, net.sf.gridarta.utils.ResourceIcons.SQUARE_SELECTED_SQUARE_EAST, net.sf.gridarta.utils.ResourceIcons.SQUARE_SELECTED_SQUARE_NORTH, net.sf.gridarta.utils.ResourceIcons.SQUARE_SELECTED_SQUARE_SOUTH, net.sf.gridarta.utils.ResourceIcons.SQUARE_SELECTED_SQUARE_WEST, and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.warningSquareImg.
void net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint | ( | @NotNull final Graphics | graphics, |
final int | gridFlags, | ||
final boolean | light, | ||
final int | x, | ||
final int | y, | ||
@NotNull final ImageObserver | imageObserver | ||
) |
Paints overlay images for one grid square.
graphics | the graphics to paint into |
gridFlags | the grid flags to paint |
light | whether this map square is affected by a light emitting game object |
x | the x-coordinate to paint at |
y | the y-coordinate to paint at |
imageObserver | the image observer to notify |
Definition at line 108 of file GridMapSquarePainter.java.
References net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.cursorImg, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_CURSOR, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_ERROR, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTING, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_EAST, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_NORTH, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_SOUTH, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_WEST, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.lightSquare, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.preSelImg, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImg, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgEast, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgNorth, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgSouth, net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgWest, and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.warningSquareImg.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.paintMapSelection(), and net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintSquareSelection().
|
private |
The overlay Image for MapGrid#GRID_FLAG_CURSOR.
Definition at line 69 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for map squares that are affected by light emitting game objects.
Definition at line 80 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_SELECTING.
Definition at line 64 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_SELECTION.
Definition at line 39 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_EAST.
Definition at line 49 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_NORTH.
Definition at line 44 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_SOUTH.
Definition at line 54 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_SELECTION_WEST.
Definition at line 59 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().
|
private |
The overlay Image for MapGrid#GRID_FLAG_ERROR.
Definition at line 74 of file GridMapSquarePainter.java.
Referenced by net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.GridMapSquarePainter(), and net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint().