ScummVM API documentation
Titanic::Rect Class Reference
Inheritance diagram for Titanic::Rect:
Common::Rect

Public Member Functions

 Rect (int16 w, int16 h)
 
 Rect (int16 x1, int16 y1, int16 x2, int16 y2)
 
 operator Point ()
 
void clear ()
 
void combine (const Rect &r)
 
void constrain (const Rect &r)
 
Point getPoint (Quadrant quadrant)
 
- Public Member Functions inherited from Common::Rect
constexpr Rect (int16 w, int16 h)
 
 Rect (const Point &topLeft, const Point &bottomRight)
 
constexpr Rect (const Point &topLeft, int16 w, int16 h)
 
 Rect (int16 x1, int16 y1, int16 x2, int16 y2)
 
bool operator== (const Rect &rhs) const
 
bool operator!= (const Rect &rhs) const
 
int16 width () const
 
int16 height () const
 
void setWidth (int16 aWidth)
 
void setHeight (int16 aHeight)
 
bool contains (int16 x, int16 y) const
 
bool contains (const Point &p) const
 
bool contains (const Rect &r) const
 
bool equals (const Rect &r) const
 
bool intersects (const Rect &r) const
 
Rect findIntersectingRect (const Rect &r) const
 
void extend (const Rect &r)
 
void grow (int16 offset)
 
void clip (const Rect &r)
 
void clip (int16 maxw, int16 maxh)
 
bool isEmpty () const
 
bool isValidRect () const
 
void moveTo (int16 x, int16 y)
 
void translate (int16 dx, int16 dy)
 
void moveTo (const Point &p)
 
void debugPrint (int debuglevel=0, const char *caption="Rect:") const
 

Additional Inherited Members

- Static Public Member Functions inherited from Common::Rect
static Rect center (int16 cx, int16 cy, int16 w, int16 h)
 
static bool getBlitRect (Point &dst, Rect &rect, const Rect &clip)
 
- Public Attributes inherited from Common::Rect
int16 top
 
int16 left
 
int16 bottom
 
int16 right
 

Member Function Documentation

◆ operator Point()

Titanic::Rect::operator Point ( )
inline

Returns the top/left corner of the rect as a point

◆ clear()

void Titanic::Rect::clear ( )
inline

Clear the rect

◆ combine()

void Titanic::Rect::combine ( const Rect r)

Combine another rect into this one

◆ constrain()

void Titanic::Rect::constrain ( const Rect r)

Constrains/clips to the intersection area of the given rect

◆ getPoint()

Point Titanic::Rect::getPoint ( Quadrant  quadrant)

Returns a center point for a given edge or center of the rect


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