Size. More...

#include <rsize.h>

Collaboration diagram for RSize:
[legend]

Public Member Functions

 RSize (void)
 
 RSize (const tCoord w, const tCoord h)
 
 RSize (const RSize &size)
 
bool operator== (const RSize &size) const
 
bool operator!= (const RSize &size) const
 
RSizeoperator*= (double factor)
 
RSizeoperator+= (const RSize &size)
 
RSizeoperator-= (const RSize &size)
 
int Compare (const RSize &size) const
 
RSizeoperator= (const RSize &size)
 
tCoord GetWidth (void) const
 
tCoord GetHeight (void) const
 
bool IsValid (void) const
 
void Set (const tCoord w, const tCoord h)
 

Static Public Attributes

static RSize Null
 

Private Attributes

tCoord Width
 
tCoord Height
 

Detailed Description

Size.

This class represent a size.

Constructor & Destructor Documentation

RSize ( void  )

Construct a null size.

RSize ( const tCoord  w,
const tCoord  h 
)

Construct a given size.

RSize ( const RSize size)

Copy constructor.

Parameters
sizeSize.

Member Function Documentation

bool operator== ( const RSize size) const

The equal operator.

bool operator!= ( const RSize size) const

The non-equal operator.

RSize& operator*= ( double  factor)

Scale a size.

Parameters
sizeThe point representing the vector used.
RSize& operator+= ( const RSize size)

Make a translation of the point.

Parameters
sizeThe point representing the vector used.
RSize& operator-= ( const RSize size)

Make a translation of the point.

Parameters
sizeThe point representing the vector used.
int Compare ( const RSize size) const

Compare two points and return 0 if there are at the same position. This function is used with the class RContainer.

Parameters
sizePoint used for the comparison.
RSize& operator= ( const RSize size)

Assignment operator.

tCoord GetWidth ( void  ) const

Get the width.

tCoord GetHeight ( void  ) const

Get the height.

bool IsValid ( void  ) const

Test if the point is a valid one.

void Set ( const tCoord  w,
const tCoord  h 
)

Set the size.

Parameters
wWidth.
hHeight.

Field Documentation

tCoord Width
private

This is the width.

tCoord Height
private

This is the height.

RSize Null
static

Represent an invalid point.