ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Member Functions | Public Attributes | List of all members
Rect Class Reference

#include <rect.h>

Inheritance diagram for Rect:

Public Member Functions

 Rect () ROLAND_DEFAULT Rect(const Point &origin
 Standard Constructor. More...
 
 Rect (Sint16 x, Sint16 y, Uint16 w, Uint16 h)
 
 Rect (Sint16 x, Sint16 y, const Size &size)
 
 Rect (SDL_Rect *rect)
 
 Rect (const Rect &rect)
 
 ~Rect () ROLAND_DEFAULT void set(Sint16 x
 Standard Destructor. Does nothing. More...
 
void set (const Point &pos)
 
void set (const Size &size)
 
void set (const Point &pos, const Size &size)
 
void setOrigin (Sint16 x, Sint16 y)
 
void setOrigin (const Point &origin)
 
void setPos (Sint16 x, Sint16 y)
 
void setPos (const Point &pos)
 
void setSize (Uint16 w, Uint16 h)
 
void setSize (const Size &size)
 
void setX (Sint16 x)
 
void setY (Sint16 y)
 
void setWidth (Uint16 w)
 
void setHeight (Uint16 h)
 
Point origin () const
 
Point pos () const
 
Size size () const
 
Sint16 x () const
 
Sint16 y () const
 
Uint16 width () const
 
Uint16 height () const
 
Sint16 x2 () const
 
Sint16 y2 () const
 
bool inside (const Point &p) const
 
bool inside (Uint16 x, Uint16 y) const
 

Public Attributes

const Sizesize { SDL_Rect::x = origin.x()
 
Sint16 y
 
Sint16 Uint16 w
 
Sint16 Uint16 Uint16 h {SDL_Rect::x = x
 

Detailed Description

Defines a rect (x, y, width, height) author Fred Klaus

Constructor & Destructor Documentation

Rect ( ) const

Standard Constructor.

Rect ( Sint16  x,
Sint16  y,
Uint16  w,
Uint16  h 
)
inline

References Rect::h, Rect::w, x, Rect::x(), y, and Rect::y().

Rect ( Sint16  x,
Sint16  y,
const Size size 
)
inline
Rect ( SDL_Rect *  rect)
inline

References x, and y.

Rect ( const Rect rect)
inline

Copyconstructor. A deep copy will done, so it's save to init Rect with itself.

References Rect::height(), ROLAND_DEFAULT, Rect::width(), x, Rect::x(), y, Rect::y, and Rect::~Rect().

~Rect ( )

Standard Destructor. Does nothing.

Referenced by Rect::Rect().

Member Function Documentation

Uint16 height ( ) const
inline
bool inside ( const Point p) const
inline

References x, Point::y, and y.

Referenced by CanvasStd::line(), List::reposition(), and Rect::y2().

bool inside ( Uint16  x,
Uint16  y 
) const
inline

References x, and y.

Point origin ( ) const
inline

References x, and y.

Point pos ( ) const
inline
void set ( const Point pos)
inline
void set ( const Size size)
inline

References Size::height(), and Size::width().

void set ( const Point pos,
const Size size 
)
inline

References Size::height(), Size::width(), x, and y.

void setHeight ( Uint16  h)
inline
void setOrigin ( Sint16  x,
Sint16  y 
)
inline

References x, Rect::x(), y, and Rect::y().

void setOrigin ( const Point origin)
inline

References x, Point::y, and y.

void setPos ( Sint16  x,
Sint16  y 
)
inline

References x, Rect::x(), y, and Rect::y().

Referenced by ImageFont::ImageFont(), and ListItem::reset().

void setPos ( const Point pos)
inline

References x, Point::y, and y.

void setSize ( Uint16  w,
Uint16  h 
)
inline

References Rect::h, and Rect::w.

Referenced by Label::setImage().

void setSize ( const Size size)
inline

References Size::height(), and Size::width().

void setWidth ( Uint16  w)
inline
void setX ( Sint16  x)
inline
void setY ( Sint16  y)
inline
Size size ( ) const
inline
Uint16 width ( ) const
inline
Sint16 x ( ) const
inline
Sint16 x2 ( ) const
inline

References x.

Sint16 y ( ) const
inline

References y.

Referenced by Rect::Rect(), Rect::setOrigin(), Rect::setPos(), and Rect::setY().

Sint16 y2 ( ) const
inline

References Rect::inside(), and y.

Member Data Documentation

Sint16 Uint16 Uint16 h {SDL_Rect::x = x
const Size& size { SDL_Rect::x = origin.x()

Referenced by Widget::size(), and Canvas::write().

Sint16 Uint16 w
Sint16 y

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