uk.co.keang.hex.gui
Class HexBtnUtilities
java.lang.Object
uk.co.keang.hex.gui.HexBtnUtilities
public class HexBtnUtilities
- extends java.lang.Object
A collection of utility methods for Hexagonal buttons
- Version:
- 1.1
- Author:
- A.G.Docherty
Method Summary |
(package private) static void |
drawDashedPolygon(java.awt.Graphics g,
java.awt.Polygon p)
Draws a dashed polgon in the given graphics context |
(package private) static java.awt.Polygon |
getHexagon(HexBtnUtilities.HexOrientation orientation,
int originX,
int originY,
int w,
int h)
Creates a hexagon based on the given orientation, origin and size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HexBtnUtilities
public HexBtnUtilities()
getHexagon
static java.awt.Polygon getHexagon(HexBtnUtilities.HexOrientation orientation,
int originX,
int originY,
int w,
int h)
- Creates a hexagon based on the given orientation, origin and size
- Parameters:
orientation
- - the hexagons orientationoriginX
- - the x axis origin. This is the top left corner of an imaginary square enclosing the hexagonoriginY
- - the y axis origin. This is the top left corner of an imaginary square enclosing the hexagonw
- - the maximum width of the hexagonh
- - the maximum height of the hexagon
- Returns:
- the co-ordinates of the hexagon
drawDashedPolygon
static void drawDashedPolygon(java.awt.Graphics g,
java.awt.Polygon p)
- Draws a dashed polgon in the given graphics context
- Parameters:
g
- the graphics contextp
- the polygon to draw