Constructor and Description |
---|
LineOverlay(java.awt.Color colour,
boolean useWorldCoords)
Construct a LineOverlay with no coordinates defined..
|
LineOverlay(Point2D start,
Point2D end,
java.awt.Color colour,
boolean useWorldCoords)
Construct a LineOverlay.
|
Modifier and Type | Method and Description |
---|---|
void |
render(java.awt.Graphics2D g,
ScreenTransform transform)
Render this overlay.
|
void |
setColour(java.awt.Color c)
Set the colour.
|
void |
setEnd(Point2D p)
Set the end coordinate.
|
void |
setStart(Point2D p)
Set the start coordinate.
|
void |
setUseWorldCoordinates(boolean b)
Set whether to use world coordinates or not.
|
public LineOverlay(java.awt.Color colour, boolean useWorldCoords)
colour
- The colour to draw the rectangle.useWorldCoords
- Whether to convert the coordinates from world to screen. Set to false if you want to directly specify screen coordinates.public LineOverlay(Point2D start, Point2D end, java.awt.Color colour, boolean useWorldCoords)
start
- The start coordinate.end
- The end coordinate.colour
- The colour to draw the rectangle.useWorldCoords
- Whether to convert the coordinates from world to screen. Set to false if you want to directly specify screen coordinates.public void setStart(Point2D p)
p
- The new start coordinate.public void setEnd(Point2D p)
p
- The new end coordinate.public void setColour(java.awt.Color c)
c
- The new colour.public void setUseWorldCoordinates(boolean b)
b
- True to use world coordinates, false otherwise.public void render(java.awt.Graphics2D g, ScreenTransform transform)
Overlay