Gridarta Editor
net.sf.gridarta.gui.map.renderer.GridMapSquarePainter Class Reference

Paints overlays for map grids. More...

+ Collaboration diagram for net.sf.gridarta.gui.map.renderer.GridMapSquarePainter:

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...
 

Detailed Description

Paints overlays for map grids.

Instances do not hold internal state; they may be accessed concurrently.

Author
Andreas Kirschbaum

Definition at line 34 of file GridMapSquarePainter.java.

Constructor & Destructor Documentation

◆ GridMapSquarePainter()

Member Function Documentation

◆ paint()

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.

Parameters
graphicsthe graphics to paint into
gridFlagsthe grid flags to paint
lightwhether this map square is affected by a light emitting game object
xthe x-coordinate to paint at
ythe y-coordinate to paint at
imageObserverthe 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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ cursorImg

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.cursorImg
private

◆ lightSquare

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.lightSquare
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().

◆ preSelImg

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.preSelImg
private

◆ selImg

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImg
private

◆ selImgEast

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgEast
private

◆ selImgNorth

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgNorth
private

◆ selImgSouth

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgSouth
private

◆ selImgWest

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.selImgWest
private

◆ warningSquareImg

final Image net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.warningSquareImg
private

The documentation for this class was generated from the following file: