Constructor and Description |
---|
RectangleOverlay(java.awt.Color colour,
boolean useWorldCoords)
Construct a RectangleOverlay with no coordinates defined..
|
RectangleOverlay(double left,
double right,
double top,
double bottom,
java.awt.Color colour,
boolean useWorldCoords)
Construct a RectangleOverlay.
|
Modifier and Type | Method and Description |
---|---|
void |
render(java.awt.Graphics2D g,
ScreenTransform transform)
Render this overlay.
|
void |
setBottom(double y)
Set the bottom Y coordinate.
|
void |
setColour(java.awt.Color c)
Set the colour.
|
void |
setLeft(double x)
Set the left-hand X coordinate.
|
void |
setRight(double x)
Set the right-hand X coordinate.
|
void |
setTop(double y)
Set the top Y coordinate.
|
void |
setUseWorldCoordinates(boolean b)
Set whether to use world coordinates or not.
|
public RectangleOverlay(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 RectangleOverlay(double left, double right, double top, double bottom, java.awt.Color colour, boolean useWorldCoords)
left
- The left-hand X coordinate.right
- The right-hand X coordinate.top
- The top Y coordinate.bottom
- The bottom Y 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 setLeft(double x)
x
- The new coordinate.public void setRight(double x)
x
- The new coordinate.public void setTop(double y)
y
- The new coordinate.public void setBottom(double y)
y
- The new 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