rectangle ADT, defined by x, y, width and height.
![]() | ZERO |
![]() | x the left x-coordinate of the rectangle |
![]() | y the top y coordinate of the rectangle |
![]() | width the width of the rectangle |
![]() | height the height of the rectangle |
![]() | Rectangle (int a = 0, int b = 0, int w = 0, int h=0) Construct and initialize new rectangle. |
![]() | Rectangle (int w, int h) Construct and initialize new rectangle. |
![]() | Rectangle (int d) Construct and initialize new rectangle. |
![]() | Rectangle (Point origin, Point extent) Construct and initialize new rectangle. |
![]() | Set (int a, int b, int w, int h) Reshape rectangle. |
![]() | SetPosition (int a, int b) Set rectangle position. |
![]() | Move (int a, int b) Move rectangle position. |
![]() | Inside (Point p) const Return if point (a,b) is inside rectangle. |
![]() | Inside (int a, int b) const Return if point (a,b) is inside rectangle. |
![]() | Intersects (Rectangle* r) const Return if rectangle r intersects with 'this'. |
![]() | operator== (const Rectangle &x, const Rectangle &y) Return whether rectangles are equal. |
![]() | operator!= (const Rectangle &x, const Rectangle &y) Return whether rectangles are unequal. |
![]() | operator<< (ostream &s, const Rectangle r) Write string representation to ostream. |
![]() | operator>> (istream &s, Rectangle &r) Read string representation from istream. |
rectangle ADT, defined by x, y, width and height.
Rectangle(int a = 0, int b = 0, int w = 0, int h=0)
Rectangle(int w, int h)
Rectangle(int d)
Rectangle(Point origin, Point extent)
void Set(int a, int b, int w, int h)
void SetPosition(int a, int b)
void Move(int a, int b)
bool Inside(Point p) const
bool Inside(int a, int b) const
bool Intersects(Rectangle* r) const
friend bool operator==(const Rectangle &x, const Rectangle &y)
friend bool operator!=(const Rectangle &x, const Rectangle &y)
friend ostream& operator<<(ostream &s, const Rectangle r)
friend istream& operator>>(istream &s, Rectangle &r)
int x
int y
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de