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

defines a planar size (width, height) More...

#include <size.h>

Public Member Functions

 Size ()
 Standard Constructor. Initializes everything to 0. More...
 
 Size (Uint16 w, Uint16 h)
 Constructor. Initializes everything to 0. More...
 
 Size (const Size &s)
 Copyconstructor. A deep copy will done, so it's save to init Size with itself. More...
 
 ~Size ()
 Standard Destructor. Does nothing. More...
 
Sizeoperator= (const Size &s)
 overloaded operator = A deep copy will done, so it's save to assign Size to itself. More...
 
bool operator== (const Size &s) const
 overloaded operator == true, if width and height are the same More...
 
bool operator!= (const Size &s) const
 overloaded operator != true, if width and height are different More...
 
void clear ()
 initializes everything to 0. More...
 
Uint16 width () const
 
Uint16 height () const
 
void setWidth (Uint16 w)
 
void setHeight (Uint16 h)
 
void set (const Size &s)
 
void set (Uint16 w, Uint16 h)
 
void set (const SDL_Surface *surface)
 

Private Attributes

Uint16 mWidth
 
Uint16 mHeight
 

Detailed Description

defines a planar size (width, height)

Author
Fred Klaus devel.nosp@m.opme.nosp@m.nt@fk.nosp@m.web..nosp@m.de

Constructor & Destructor Documentation

Size ( )
inline

Standard Constructor. Initializes everything to 0.

Size ( Uint16  w,
Uint16  h 
)
inline

Constructor. Initializes everything to 0.

Parameters
w= width
h= height

References Size::mHeight, and Size::mWidth.

Size ( const Size s)
inline

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

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

~Size ( )
inline

Standard Destructor. Does nothing.

Member Function Documentation

void clear ( )
inline

initializes everything to 0.

References Size::mHeight, and Size::mWidth.

Referenced by Canvas::textSize().

Uint16 height ( ) const
inline
bool operator!= ( const Size s) const
inline

overloaded operator != true, if width and height are different

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

Size& operator= ( const Size s)
inline

overloaded operator = A deep copy will done, so it's save to assign Size to itself.

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

bool operator== ( const Size s) const
inline

overloaded operator == true, if width and height are the same

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

void set ( const Size s)
inline
void set ( Uint16  w,
Uint16  h 
)
inline

References Size::mHeight, and Size::mWidth.

void set ( const SDL_Surface *  surface)
inline

References Size::mHeight, and Size::mWidth.

void setHeight ( Uint16  h)
inline

References Size::mHeight.

Referenced by Canvas::textSize().

void setWidth ( Uint16  w)
inline

References Size::mWidth.

Referenced by Canvas::textSize().

Uint16 width ( ) const
inline

Member Data Documentation

Uint16 mHeight
private
Uint16 mWidth
private

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