![]() |
Gridarta Editor
|
Abstract base class for ISO MapRenderers. More...
Public Member Functions | |
void | forceRepaint () |
BufferedImage | getFullImage () |
Size2D | getImageSize () |
Rectangle | getSquareBounds (@NotNull final Point p) |
boolean | getSquareLocationAt (@NotNull final Point point, @NotNull final Point retPoint) |
![]() | |
abstract void | closeNotify () |
Must be called when this renderer is not used anymore. More... | |
String | getToolTipText ( @NotNull final MouseEvent event) |
@noinspection RefusedBequest More... | |
void | printFullImage ( @NotNull final File file) throws IOException |
Saves an image of the entire view to a file. More... | |
void | setErroneousMapSquares ( @NotNull final Map< MapSquare< G, A, R >, ValidationError< G, A, R >> erroneousMapSquares) |
Sets the MapSquares that are known to contain errors. More... | |
void | setLightVisible (final boolean lightVisible) |
If set, inverts the setting of net.sf.gridarta.model.mapviewsettings.MapViewSettings#isLightVisible(). More... | |
Protected Member Functions | |
AbstractSimpleIsoMapRenderer (@NotNull final MapModel< G, A, R > mapModel, @NotNull final IsoMapSquareInfo isoMapSquareInfo) | |
Creates a new instance. More... | |
abstract void | paint (@NotNull Graphics2D graphics2D, int xStart, int yStart, @NotNull G gameObject) |
Paints a single GameObject. More... | |
void | paintComponent (@NotNull final Graphics g) |
![]() | |
AbstractMapRenderer ( @NotNull final MapModel< G, A, R > mapModel, @Nullable final GameObjectParser< G, A, R > gameObjectParser) | |
Creates a new instance. More... | |
boolean | isLightVisible () |
Returns whether the setting for lighted map squares should be inverted. More... | |
Private Member Functions | |
void | calculateOrigin () |
The origin which is located in the NORTH_WEST-corner of the map is calculated. More... | |
void | paintComponent2 (@NotNull final Graphics2D graphics) |
Paints this component. More... | |
Private Attributes | |
final IsoMapSquareInfo | isoMapSquareInfo |
The IsoMapSquareInfo to use. More... | |
final MapModel< G, A, R > | mapModel |
The MapModel to render. More... | |
final Point | origin = new Point() |
The origin is the point in the north-west corner. More... | |
Static Private Attributes | |
static final Color | BACKGROUND_COLOR = new Color(255, 255, 255, 0) |
The background Color for created images. More... | |
static final long | serialVersionUID = 1 |
The serial version UID. More... | |
Abstract base class for ISO MapRenderers.
Definition at line 41 of file AbstractSimpleIsoMapRenderer.java.
|
protected |
Creates a new instance.
mapModel | the rendered map model |
isoMapSquareInfo | the iso map square info to use |
Definition at line 77 of file AbstractSimpleIsoMapRenderer.java.
|
private |
The origin which is located in the NORTH_WEST-corner of the map is calculated.
On non-pickmaps there is an extra border.
Definition at line 128 of file AbstractSimpleIsoMapRenderer.java.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.getFullImage().
void net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.forceRepaint | ( | ) |
Definition at line 166 of file AbstractSimpleIsoMapRenderer.java.
BufferedImage net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getFullImage | ( | ) |
Definition at line 146 of file AbstractSimpleIsoMapRenderer.java.
Size2D net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getImageSize | ( | ) |
Definition at line 140 of file AbstractSimpleIsoMapRenderer.java.
Rectangle net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSquareBounds | ( | @NotNull final Point | p | ) |
Definition at line 177 of file AbstractSimpleIsoMapRenderer.java.
boolean net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSquareLocationAt | ( | @NotNull final Point | point, |
@NotNull final Point | retPoint | ||
) |
Definition at line 134 of file AbstractSimpleIsoMapRenderer.java.
|
abstractprotected |
Paints a single GameObject.
graphics2D | the graphics to paint to |
xStart | the x offset for painting |
yStart | the y offset for painting |
gameObject | the game object to paint |
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent2().
|
protected |
Definition at line 171 of file AbstractSimpleIsoMapRenderer.java.
|
private |
Paints this component.
graphics | the graphics context to paint to |
Definition at line 87 of file AbstractSimpleIsoMapRenderer.java.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.getFullImage(), and net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent().
|
staticprivate |
The background Color for created images.
Definition at line 52 of file AbstractSimpleIsoMapRenderer.java.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.getFullImage().
|
private |
The IsoMapSquareInfo to use.
Definition at line 64 of file AbstractSimpleIsoMapRenderer.java.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.AbstractSimpleIsoMapRenderer(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.calculateOrigin(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.getFullImage(), and net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent2().
|
private |
The MapModel to render.
Definition at line 58 of file AbstractSimpleIsoMapRenderer.java.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.AbstractSimpleIsoMapRenderer(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.calculateOrigin(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.getFullImage(), and net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent2().
|
private |
The origin is the point in the north-west corner.
Definition at line 70 of file AbstractSimpleIsoMapRenderer.java.
Referenced by net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.calculateOrigin(), and net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent2().
|
staticprivate |
The serial version UID.
Definition at line 46 of file AbstractSimpleIsoMapRenderer.java.