|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjtge.util.grid.builder.AbstractHexagonBuilder
jtge.util.grid.builder.PeakHexagonBuilder
Utiliy class used to help drawing peak hexagons.
| Field Summary |
| Fields inherited from class jtge.util.grid.builder.AbstractHexagonBuilder |
A, B, H, R, S, shifted |
| Constructor Summary | |
PeakHexagonBuilder(int hexagonSideLength,
boolean shifted)
Create a peak hexagon builder. |
|
| Method Summary | |
protected Coordinate |
approximate(java.awt.Point point)
Retrieve an approximated coordinate from a given point. |
java.awt.Polygon |
buildHexagon(Coordinate coordinate)
Build an hexagon within a map. |
int |
computeHeight(int height)
Compute the height in pixels of a map consisting of given number of tiles height. |
int |
computeWidth(int width)
Compute the width in pixels of a map consisting of given number of tiles width. |
| Methods inherited from class jtge.util.grid.builder.AbstractHexagonBuilder |
buildHexagon, floor, floor, fromPixel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PeakHexagonBuilder(int hexagonSideLength,
boolean shifted)
hexagonSideLength - the length of an hexagon side in pixelsshifted - whether to shift the top left hexagon or not| Method Detail |
public final int computeWidth(int width)
width - a number of tiles
public final int computeHeight(int height)
height - a number of tiles
public final java.awt.Polygon buildHexagon(Coordinate coordinate)
coordinate - position of the hexagon
protected final Coordinate approximate(java.awt.Point point)
approximate in class AbstractHexagonBuilderpoint - the point
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||