Drag[en]gine Script Module DragonScript Script API
1.0

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 () 
X1Coordinate. More...  
int  getY1 () 
Y1Coordinate. More...  
int  getX2 () 
X2Coordinate. More...  
int  getY2 () 
Y2Coordinate. More...  
RectArea  orientate () 
Orientate rectangular area placing (x1,y1) topleft and (x2,y2) bottomright. More...  
Point  getSize () 
Size. 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...  
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 getSize  (  ) 
Size.
int getX1  (  ) 
X1Coordinate.
int getX2  (  ) 
X2Coordinate.
int getY1  (  ) 
Y1Coordinate.
int getY2  (  ) 
Y2Coordinate.
RectArea grow  (  int  x, 
int  y  
) 
Rectangular area grown by size at bottom right.
RectArea growInverse  (  int  x, 
int  y  
) 
Rectangular area grown by size at top left.
Rectangular set to the intersection area between two rectangular areas.
bool isEqual  (  RectArea  rect  ) 
Rrectangular areas is equal to another rectangular area.
bool isInside  (  int  x, 
int  y  
) 
Point is inside rectangular area.
RectArea move  (  int  x, 
int  y  
) 
Rectangular area moved by offset.
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 orientate  (  ) 
Orientate rectangular area placing (x1,y1) topleft and (x2,y2) bottomright.

static 
Read rectangular area from file reader.
void writeToFile  (  FileWriter  writer  ) 
Write rectangular area to file writer.