Drag[en]gine Script Module DragonScript  1.21
Dragengine.Gui.RectArea Class Reference

Immutable rectangular area. More...

Inheritance diagram for Dragengine.Gui.RectArea:

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...
 

Detailed Description

Immutable rectangular area.

Member Function Documentation

◆ clamp()

Point Dragengine.Gui.RectArea.clamp ( Point  point)

Point clamped to rectangular area.

◆ getBottomLeft()

Point Dragengine.Gui.RectArea.getBottomLeft ( )

Bottom-left corner (x1, y2).

Version
1.13

◆ getBottomRight()

Point Dragengine.Gui.RectArea.getBottomRight ( )

Bottom-right corner (x2, y2).

Version
1.13

◆ getHeight()

int Dragengine.Gui.RectArea.getHeight ( )

Height.

Version
1.13

◆ getPosition()

Point Dragengine.Gui.RectArea.getPosition ( )

Position.

◆ getSize()

Point Dragengine.Gui.RectArea.getSize ( )

Size.

◆ getTopLeft()

Point Dragengine.Gui.RectArea.getTopLeft ( )

Top-left corner (x1, y1).

Version
1.13

◆ getTopRight()

Point Dragengine.Gui.RectArea.getTopRight ( )

Top-right corner (x2, y1).

Version
1.13

◆ getWidth()

int Dragengine.Gui.RectArea.getWidth ( )

Width.

Version
1.13

◆ getX1()

int Dragengine.Gui.RectArea.getX1 ( )

X1-Coordinate.

◆ getX2()

int Dragengine.Gui.RectArea.getX2 ( )

X2-Coordinate.

◆ getY1()

int Dragengine.Gui.RectArea.getY1 ( )

Y1-Coordinate.

◆ getY2()

int Dragengine.Gui.RectArea.getY2 ( )

Y2-Coordinate.

◆ grow() [1/2]

RectArea Dragengine.Gui.RectArea.grow ( int  x,
int  y 
)

Rectangular area grown by size at bottom right.

◆ grow() [2/2]

RectArea Dragengine.Gui.RectArea.grow ( Point  size)

Rectangular area grown by size at bottom right.

◆ growInverse() [1/2]

RectArea Dragengine.Gui.RectArea.growInverse ( int  x,
int  y 
)

Rectangular area grown by size at top left.

◆ growInverse() [2/2]

RectArea Dragengine.Gui.RectArea.growInverse ( Point  size)

Rectangular area grown by size at top left.

◆ include()

RectArea Dragengine.Gui.RectArea.include ( RectArea  rect)

Rectangular area grown to include another rectangular area.

◆ intersect()

RectArea Dragengine.Gui.RectArea.intersect ( RectArea  rect)

Rectangular set to the intersection area between two rectangular areas.

◆ isEqual()

bool Dragengine.Gui.RectArea.isEqual ( RectArea  rect)

Rrectangular areas is equal to another rectangular area.

◆ isInside()

bool Dragengine.Gui.RectArea.isInside ( int  x,
int  y 
)

Point is inside rectangular area.

◆ move() [1/2]

RectArea Dragengine.Gui.RectArea.move ( int  x,
int  y 
)

Rectangular area moved by offset.

◆ move() [2/2]

RectArea Dragengine.Gui.RectArea.move ( Point  distance)

Rectangular area moved by offset.

◆ new() [1/4]

RectArea Dragengine.Gui.RectArea.new ( )

Create rectangular area with all coordinates set to 0.

◆ new() [2/4]

RectArea Dragengine.Gui.RectArea.new ( int  x1,
int  y1,
int  x2,
int  y2 
)

Create rectangular area with initial coordinates.

◆ new() [3/4]

RectArea Dragengine.Gui.RectArea.new ( Point  position,
Point  size 
)

Create recangular area from a point and size.

◆ new() [4/4]

RectArea Dragengine.Gui.RectArea.new ( RectArea  rect)

Create copy of rectangular area.

◆ orientate()

RectArea Dragengine.Gui.RectArea.orientate ( )

Orientate rectangular area placing (x1,y1) top-left and (x2,y2) bottom-right.

◆ readFromFile()

static RectArea Dragengine.Gui.RectArea.readFromFile ( FileReader  reader)
static

Read rectangular area from file reader.

◆ toString()

String Dragengine.Gui.RectArea.toString ( )

String representation.

◆ writeToFile()

void Dragengine.Gui.RectArea.writeToFile ( FileWriter  writer)

Write rectangular area to file writer.


The documentation for this class was generated from the following file: