nux-0.9.48

nux::Rect Class Reference

#include <NuxCore/Rect.h>

Public Member Functions

 Rect ()
 Rect (int x_, int y_, int width_, int height_)
 ~Rect ()
 Rect (const Rect &r)
Rectoperator= (const Rect &r)
bool operator== (const Rect &p) const
bool operator!= (const Rect &p) const
bool IsNull () const
bool IsInside (const Point &p) const
Rect Intersect (const Rect &) const
void Expand (int factor_x, int factor_y)
int GetWidth () const
int GetHeight () const
Point GetCenter () const
 Returns a Point at the center of the Rectangle.
Point GetPosition ()
 Returns a Point at the center of the Rectangle.
void SetWidth (int w)
void SetHeight (int h)
void SetX (int px)
void SetY (int py)
void Set (int px, int py, int w, int h)
void SetPosition (int px, int py)
void SetSize (int px, int py)
void OffsetSize (int dw, int dh)
void OffsetPosition (int dx, int dy)
bool IsPointInside (int dx, int dy) const
Rect GetExpand (int dx, int dy) const

Data Fields

int x
int y
int width
int height

Constructor & Destructor Documentation

nux::Rect::Rect ( )
nux::Rect::Rect ( int  x_,
int  y_,
int  width_,
int  height_ 
)
nux::Rect::~Rect ( )
nux::Rect::Rect ( const Rect r)

Member Function Documentation

void nux::Rect::Expand ( int  factor_x,
int  factor_y 
)
Point nux::Rect::GetCenter ( ) const [inline]

Returns a Point at the center of the Rectangle.

References height, width, x, and y.

Rect nux::Rect::GetExpand ( int  dx,
int  dy 
) const
int nux::Rect::GetHeight ( ) const [inline]

References height.

Point nux::Rect::GetPosition ( ) [inline]

Returns a Point at the center of the Rectangle.

References x, and y.

int nux::Rect::GetWidth ( ) const [inline]

References width.

Rect nux::Rect::Intersect ( const Rect ) const
bool nux::Rect::IsInside ( const Point p) const
bool nux::Rect::IsNull ( ) const [inline]

References height, and width.

bool nux::Rect::IsPointInside ( int  dx,
int  dy 
) const
void nux::Rect::OffsetPosition ( int  dx,
int  dy 
) [inline]

References x, and y.

void nux::Rect::OffsetSize ( int  dw,
int  dh 
) [inline]

References height, and width.

bool nux::Rect::operator!= ( const Rect p) const
Rect& nux::Rect::operator= ( const Rect r)
bool nux::Rect::operator== ( const Rect p) const
void nux::Rect::Set ( int  px,
int  py,
int  w,
int  h 
)
void nux::Rect::SetHeight ( int  h) [inline]

References height.

void nux::Rect::SetPosition ( int  px,
int  py 
)
void nux::Rect::SetSize ( int  px,
int  py 
)
void nux::Rect::SetWidth ( int  w) [inline]

References width.

void nux::Rect::SetX ( int  px) [inline]

References x.

void nux::Rect::SetY ( int  py) [inline]

References y.


Field Documentation


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