|
Drag[en]gine Script Module DragonScript 1.32.1
|
Immutable rectangular area. More...
Public Member Functions | |
Constructors | |
| RectArea | new () |
| Create rectangular area with all coordinates set to 0. | |
| RectArea | new (int x1, int y1, int x2, int y2) |
| Create rectangular area with initial coordinates. | |
| RectArea | new (RectArea rect) |
| Create copy of rectangular area. | |
| RectArea | new (Point position, Point size) |
| Create recangular area from a point and size. | |
Management | |
| int | getX1 () |
| X1-Coordinate. | |
| int | getY1 () |
| Y1-Coordinate. | |
| int | getX2 () |
| X2-Coordinate. | |
| int | getY2 () |
| Y2-Coordinate. | |
| RectArea | orientate () |
| Orientate rectangular area placing (x1,y1) top-left and (x2,y2) bottom-right. | |
| Point | getPosition () |
| Position. | |
| Point | getSize () |
| Size. | |
| int | getWidth () |
| Width. | |
| int | getHeight () |
| Height. | |
| Point | getTopLeft () |
| Top-left corner (x1, y1). | |
| Point | getTopRight () |
| Top-right corner (x2, y1). | |
| Point | getBottomLeft () |
| Bottom-left corner (x1, y2). | |
| Point | getBottomRight () |
| Bottom-right corner (x2, y2). | |
| RectArea | move (int x, int y) |
| Rectangular area moved by offset. | |
| RectArea | move (Point distance) |
| Rectangular area moved by offset. | |
| RectArea | grow (int x, int y) |
| Rectangular area grown by size at bottom right. | |
| RectArea | grow (Point size) |
| Rectangular area grown by size at bottom right. | |
| RectArea | growInverse (int x, int y) |
| Rectangular area grown by size at top left. | |
| RectArea | growInverse (Point size) |
| Rectangular area grown by size at top left. | |
| RectArea | include (RectArea rect) |
| Rectangular area grown to include another rectangular area. | |
| RectArea | intersect (RectArea rect) |
| Rectangular area set to the intersection area between two rectangular areas. | |
| Point | clamp (Point point) |
| Point clamped to rectangular area. | |
| bool | isZeroWidth () |
| Width is 0 (x1=x2). | |
| bool | isZeroHeight () |
| Height is 0 (y1=y2). | |
| bool | isZeroSize () |
| Size is 0 (x1=x2, y1=y2). | |
| bool | isZeroWidthOrHeight () |
| Width or height is 0 (x1=x2 or y1=y2). | |
| bool | isInside (int x, int y) |
| Point is inside rectangular area. | |
| bool | isInsideX (int x) |
| Point is inside rectangular area along X axis. | |
| bool | isInsideY (int y) |
| Point is inside rectangular area along Y axis. | |
| bool | isOverlapping (RectArea rect) |
| Rectangular areas overlap. | |
| bool | isOverlappingX (RectArea rect) |
| Rectangular areas overlap in X direction. | |
| bool | isOverlappingY (RectArea rect) |
| Rectangular areas overlap in Y direction. | |
| bool | isEqual (RectArea rect) |
| Rectangular areas is equal to another rectangular area. | |
| String | toString () |
| String representation. | |
Public Attributes | |
| int | pX1 |
File Handling | |
| void | writeToFile (FileWriter writer) |
| Write rectangular area to file writer. | |
| static RectArea | readFromFile (FileReader reader) |
| Read rectangular area from file reader. | |
Immutable rectangular area.
Coordinate (x2,y2) is exclusive. Hence the rectangular area includes all points except row y2 and column x2.
Point clamped to rectangular area.
This excludes the row y2 and column x2 unless the width or height is 0.
| 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 area set to the intersection area between two rectangular areas.
| bool Dragengine.Gui.RectArea.isEqual | ( | RectArea | rect | ) |
Rectangular areas is equal to another rectangular area.
| bool Dragengine.Gui.RectArea.isInside | ( | int | x, |
| int | y | ||
| ) |
Point is inside rectangular area.
This excludes the row y2 and column x2. If the width or height is 0 the point is never inside.
| bool Dragengine.Gui.RectArea.isInsideX | ( | int | x | ) |
Point is inside rectangular area along X axis.
This excludes the column x2. If the width is 0 the point is never inside.
| bool Dragengine.Gui.RectArea.isInsideY | ( | int | y | ) |
Point is inside rectangular area along Y axis.
This excludes the row y2. If the height is 0 the point is never inside.
| bool Dragengine.Gui.RectArea.isOverlapping | ( | RectArea | rect | ) |
Rectangular areas overlap.
| bool Dragengine.Gui.RectArea.isOverlappingX | ( | RectArea | rect | ) |
Rectangular areas overlap in X direction.
| bool Dragengine.Gui.RectArea.isOverlappingY | ( | RectArea | rect | ) |
Rectangular areas overlap in Y direction.
| bool Dragengine.Gui.RectArea.isZeroHeight | ( | ) |
Height is 0 (y1=y2).
| bool Dragengine.Gui.RectArea.isZeroSize | ( | ) |
Size is 0 (x1=x2, y1=y2).
| bool Dragengine.Gui.RectArea.isZeroWidth | ( | ) |
Width is 0 (x1=x2).
| bool Dragengine.Gui.RectArea.isZeroWidthOrHeight | ( | ) |
Width or height is 0 (x1=x2 or y1=y2).
| 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.
| int Dragengine.Gui.RectArea.pX1 |