Drag[en]gine Script Module DragonScript
1.21
|
Immutable rectangular area. More...
Public Member Functions | |
Constructors | |
RectArea | new () |
Create rectangular area with all coordinates set to 0. More... | |
RectArea | new (int x1, int y1, int x2, int y2) |
Create rectangular area with initial coordinates. More... | |
RectArea | new (RectArea rect) |
Create copy of rectangular area. More... | |
RectArea | new (Point position, Point size) |
Create recangular area from a point and size. More... | |
Management | |
int | getX1 () |
X1-Coordinate. More... | |
int | getY1 () |
Y1-Coordinate. More... | |
int | getX2 () |
X2-Coordinate. More... | |
int | getY2 () |
Y2-Coordinate. More... | |
RectArea | orientate () |
Orientate rectangular area placing (x1,y1) top-left and (x2,y2) bottom-right. More... | |
Point | getPosition () |
Position. More... | |
Point | getSize () |
Size. More... | |
int | getWidth () |
Width. More... | |
int | getHeight () |
Height. More... | |
Point | getTopLeft () |
Top-left corner (x1, y1). More... | |
Point | getTopRight () |
Top-right corner (x2, y1). More... | |
Point | getBottomLeft () |
Bottom-left corner (x1, y2). More... | |
Point | getBottomRight () |
Bottom-right corner (x2, y2). More... | |
RectArea | move (int x, int y) |
Rectangular area moved by offset. More... | |
RectArea | move (Point distance) |
Rectangular area moved by offset. More... | |
RectArea | grow (int x, int y) |
Rectangular area grown by size at bottom right. More... | |
RectArea | grow (Point size) |
Rectangular area grown by size at bottom right. More... | |
RectArea | growInverse (int x, int y) |
Rectangular area grown by size at top left. More... | |
RectArea | growInverse (Point size) |
Rectangular area grown by size at top left. More... | |
RectArea | include (RectArea rect) |
Rectangular area grown to include another rectangular area. More... | |
RectArea | intersect (RectArea rect) |
Rectangular set to the intersection area between two rectangular areas. More... | |
Point | clamp (Point point) |
Point clamped to rectangular area. More... | |
bool | isInside (int x, int y) |
Point is inside rectangular area. More... | |
bool | isEqual (RectArea rect) |
Rrectangular areas is equal to another rectangular area. More... | |
String | toString () |
String representation. More... | |
File Handling | |
void | writeToFile (FileWriter writer) |
Write rectangular area to file writer. More... | |
static RectArea | readFromFile (FileReader reader) |
Read rectangular area from file reader. More... | |
Immutable rectangular area.
Point Dragengine.Gui.RectArea.getBottomLeft | ( | ) |
Bottom-left corner (x1, y2).
Point Dragengine.Gui.RectArea.getBottomRight | ( | ) |
Bottom-right corner (x2, y2).
int Dragengine.Gui.RectArea.getHeight | ( | ) |
Height.
Point Dragengine.Gui.RectArea.getPosition | ( | ) |
Position.
Point Dragengine.Gui.RectArea.getSize | ( | ) |
Size.
Point Dragengine.Gui.RectArea.getTopLeft | ( | ) |
Top-left corner (x1, y1).
Point Dragengine.Gui.RectArea.getTopRight | ( | ) |
Top-right corner (x2, y1).
int Dragengine.Gui.RectArea.getWidth | ( | ) |
Width.
int Dragengine.Gui.RectArea.getX1 | ( | ) |
X1-Coordinate.
int Dragengine.Gui.RectArea.getX2 | ( | ) |
X2-Coordinate.
int Dragengine.Gui.RectArea.getY1 | ( | ) |
Y1-Coordinate.
int Dragengine.Gui.RectArea.getY2 | ( | ) |
Y2-Coordinate.
RectArea Dragengine.Gui.RectArea.grow | ( | int | x, |
int | y | ||
) |
Rectangular area grown by size at bottom right.
RectArea Dragengine.Gui.RectArea.growInverse | ( | int | x, |
int | y | ||
) |
Rectangular area grown by size at top left.
Rectangular area grown by size at top left.
Rectangular area grown to include another rectangular area.
Rectangular set to the intersection area between two rectangular areas.
bool Dragengine.Gui.RectArea.isEqual | ( | RectArea | rect | ) |
Rrectangular areas is equal to another rectangular area.
bool Dragengine.Gui.RectArea.isInside | ( | int | x, |
int | y | ||
) |
Point is inside rectangular area.
RectArea Dragengine.Gui.RectArea.move | ( | int | x, |
int | y | ||
) |
Rectangular area moved by offset.
RectArea Dragengine.Gui.RectArea.new | ( | ) |
Create rectangular area with all coordinates set to 0.
RectArea Dragengine.Gui.RectArea.new | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Create rectangular area with initial coordinates.
Create recangular area from a point and size.
RectArea Dragengine.Gui.RectArea.orientate | ( | ) |
Orientate rectangular area placing (x1,y1) top-left and (x2,y2) bottom-right.
|
static |
Read rectangular area from file reader.
String Dragengine.Gui.RectArea.toString | ( | ) |
String representation.
void Dragengine.Gui.RectArea.writeToFile | ( | FileWriter | writer | ) |
Write rectangular area to file writer.