PDG engine v0.9.5
 All Classes Namespaces Functions Variables Groups Pages
Public Member Functions | Public Attributes | List of all members
Rect Class Reference

Rectangle for 2D coordinate system. More...

Inheritance diagram for Rect:
Inheritance graph
[legend]

Public Member Functions

 Rect ()
 
 Rect (number w, number h)
 
 Rect (Point topLeft, number w, number h)
 
 Rect (Point leftTop, Point rightBottom)
 
 Rect (number left, number top, number right, number bottom)
 
Rect add (Rect r2)
 
Rect add (Point p)
 
Rect assign (Rect r2)
 
 center (Rect r)
 
 center (Point p)
 
Point centerPoint ()
 
boolean contains (Rect r)
 
boolean contains (Point p)
 
Rect div (Rect r2)
 
Rect div (Point p)
 
Rect dividedby (Rect r2)
 
Rect dividedby (Point p)
 
boolean empty ()
 
boolean equals (Rect r2)
 
 grow (number delta)
 
number height ()
 
 horzGrow (number delta)
 
 horzScale (number f)
 
 horzShrink (number delta)
 
Rect intersection (Rect r)
 
Point leftBottom ()
 
Point leftTop ()
 
Rect minus (Rect r2)
 
Rect minus (Point p)
 
 moveDown (number delta)
 
 moveLeft (number delta)
 
 moveRight (number delta)
 
 moveTo (number x, number y)
 
 moveTo (Point p)
 
 moveUp (number delta)
 
 moveXTo (number x)
 
 moveYTo (number y)
 
Rect mul (Rect r2)
 
Rect mul (Point p)
 
boolean notEquals (Rect r2)
 
boolean overlaps (Rect r)
 
Rect plus (Rect r2)
 
Rect plus (Point p)
 
Point rightBottom ()
 
Point rightTop ()
 
 round ()
 
 scale (number f)
 
 setHeight (number h)
 
 setSize (number n)
 
 setWidth (number w)
 
 shrink (number delta)
 
Rect sub (Rect r2)
 
Rect sub (Point p)
 
Rect times (Rect r2)
 
Rect times (Point p)
 
Quad toQuad ()
 
Rect unionWith (Rect r)
 
 vertGrow (number delta)
 
 vertScale (number f)
 
 vertShrink (number delta)
 
number width ()
 
number x1 ()
 
number x2 ()
 
number y1 ()
 
number y2 ()
 

Public Attributes

number bottom
 
number left
 
number right
 
number top
 

Detailed Description

Rectangle for 2D coordinate system.

Rect is a class that provides support for dealing with rectangles in 2 dimensional space. The PDG coordinate space starts with the top left corner of the drawing port at Point(0,0) and the bottom left corner at Point( width, height );

Constructor & Destructor Documentation

Rect ( )
Rect ( number  w,
number  h 
)
Rect ( Point  topLeft,
number  w,
number  h 
)
Rect ( Point  leftTop,
Point  rightBottom 
)
Rect ( number  left,
number  top,
number  right,
number  bottom 
)

Member Function Documentation

Rect add ( Rect  r2)
Rect add ( Point  p)
Rect assign ( Rect  r2)
center ( Rect  r)
center ( Point  p)
Point centerPoint ( )
boolean contains ( Rect  r)
boolean contains ( Point  p)
Rect div ( Rect  r2)
Rect div ( Point  p)
Rect dividedby ( Rect  r2)
Rect dividedby ( Point  p)
boolean empty ( )
boolean equals ( Rect  r2)
grow ( number  delta)
number height ( )
horzGrow ( number  delta)
horzScale ( number  f)
horzShrink ( number  delta)
Rect intersection ( Rect  r)
Point leftBottom ( )
Point leftTop ( )
Rect minus ( Rect  r2)
Rect minus ( Point  p)
moveDown ( number  delta)
moveLeft ( number  delta)
moveRight ( number  delta)
moveTo ( number  x,
number  y 
)
moveTo ( Point  p)
moveUp ( number  delta)
moveXTo ( number  x)
moveYTo ( number  y)
Rect mul ( Rect  r2)
Rect mul ( Point  p)
boolean notEquals ( Rect  r2)
boolean overlaps ( Rect  r)
Rect plus ( Rect  r2)
Rect plus ( Point  p)
Point rightBottom ( )
Point rightTop ( )
round ( )
scale ( number  f)
setHeight ( number  h)
setSize ( number  n)
setWidth ( number  w)
shrink ( number  delta)
Rect sub ( Rect  r2)
Rect sub ( Point  p)
Rect times ( Rect  r2)
Rect times ( Point  p)
Quad toQuad ( )
Rect unionWith ( Rect  r)
vertGrow ( number  delta)
vertScale ( number  f)
vertShrink ( number  delta)
number width ( )
number x1 ( )
number x2 ( )
number y1 ( )
number y2 ( )

Member Data Documentation

number bottom
number left
number right
number top

User Comments