 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.map.renderer;
22 import java.awt.Graphics;
23 import java.awt.Image;
24 import java.awt.image.ImageObserver;
27 import org.jetbrains.annotations.NotNull;
95 lightSquare = resourceIcons.getLightSquareIcon().getImage();
108 public void paint(@NotNull
final Graphics graphics,
final int gridFlags,
final boolean light,
final int x,
final int y, @NotNull
final ImageObserver imageObserver) {
110 graphics.drawImage(
selImg, x, y, imageObserver);
113 graphics.drawImage(
selImgNorth, x, y, imageObserver);
116 graphics.drawImage(
selImgEast, x, y, imageObserver);
119 graphics.drawImage(
selImgSouth, x, y, imageObserver);
122 graphics.drawImage(
selImgWest, x, y, imageObserver);
125 graphics.drawImage(
preSelImg, x, y, imageObserver);
128 graphics.drawImage(
cursorImg, x, y, imageObserver);
134 graphics.drawImage(
lightSquare, x, y, imageObserver);
static final String SQUARE_PRE_SELECTED_SQUARE
GridMapSquarePainter(@NotNull final ResourceIcons resourceIcons)
Creates a new instance.
Base package of all Gridarta classes.
static final String SQUARE_SELECTED_SQUARE_EAST
static final int GRID_FLAG_SELECTION
Selection - marks all selected squares.
static final int GRID_FLAG_SELECTION_EAST
Selection - is set for squares at the east edge of the selected area.
final Image preSelImg
The overlay Image for MapGrid#GRID_FLAG_SELECTING.
final Image selImgEast
The overlay Image for MapGrid#GRID_FLAG_SELECTION_EAST.
final Image selImgSouth
The overlay Image for MapGrid#GRID_FLAG_SELECTION_SOUTH.
static final String SQUARE_SELECTED_SQUARE_WEST
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.
Paints overlays for map grids.
final Image selImgNorth
The overlay Image for MapGrid#GRID_FLAG_SELECTION_NORTH.
static final int GRID_FLAG_SELECTION_SOUTH
Selection - is set for squares at the south edge of the selected area.
static final String SQUARE_SELECTED_SQUARE_SOUTH
static final int GRID_FLAG_SELECTION_WEST
Selection - is set for squares at the west edge of the selected area.
static final int GRID_FLAG_ERROR
Flag to highlight as error.
final Image selImgWest
The overlay Image for MapGrid#GRID_FLAG_SELECTION_WEST.
final Image cursorImg
The overlay Image for MapGrid#GRID_FLAG_CURSOR.
static final int GRID_FLAG_CURSOR
Flag to highlight cursor position.
static final String SQUARE_CURSOR
final Image warningSquareImg
The overlay Image for MapGrid#GRID_FLAG_ERROR.
2D-Grid containing flags for selection, pre-selection, cursor, warnings and errors.
static final String SQUARE_SELECTED_SQUARE_NORTH
final Image lightSquare
The overlay Image for map squares that are affected by light emitting game objects.
static final int GRID_FLAG_SELECTION_NORTH
Selection - is set for squares at the north edge of the selected area.
Creates ImageIcon instances from resources.
final Image selImg
The overlay Image for MapGrid#GRID_FLAG_SELECTION.
static final int GRID_FLAG_SELECTING
Pre-selection - used to preselect squares.
static final String SQUARE_SELECTED_SQUARE