wsp::Quad Class Reference

Capable of drawing a rectangle on screen. More...

#include <quad.h>

Inheritance diagram for wsp::Quad:

wsp::Layer

List of all members.

Public Member Functions

 Quad ()
 Constructor.
virtual ~Quad ()
 Destructor.
void SetRectangle (Rectangle *rect)
const RectangleGetRectangle ()
void SetWidth (u32 width)
void SetHeight (u32 height)
void SetRotation (f32 rotation)
f32 GetRotation () const
void SetBorderWidth (u16 width)
u16 GetBorderWidth () const
void SetBorder (bool border)
bool IsBorder () const
void SetFillColor (GXColor fillColor)
void SetBorderColor (GXColor borderColor)
void Draw (f32 offsetX=0, f32 offsetY=0) const
 Draws the quad.


Detailed Description

Capable of drawing a rectangle on screen.

Member Function Documentation

void wsp::Quad::SetRectangle ( Rectangle rect  ) 

Allows to apply data from a rectangle to this quad.

Parameters:
rect A pointer to the rectangle from which the data should be applied to this quad.

const Rectangle* wsp::Quad::GetRectangle (  ) 

Returns a rectangle with the data of the quad. X and Y aren't offsets, but actual coordinates of the quad.

Returns:
A rectangle with the current data.

void wsp::Quad::SetWidth ( u32  width  ) 

Sets the width of the quad.

Parameters:
width The new width of the quad.

void wsp::Quad::SetHeight ( u32  height  ) 

Seets the height of the quad.

Parameters:
height The new height of the quad.

void wsp::Quad::SetRotation ( f32  rotation  ) 

Sets the rotation angle of the quad.

Parameters:
rotation The new angle of the quad. It is measured in degrees/2, so if 90 degrees is wanted, 45 degrees should be the passed parameter.

f32 wsp::Quad::GetRotation (  )  const

Gets the rotation angle of the quad.

Returns:
The current angle of the quad.

void wsp::Quad::SetBorderWidth ( u16  width  ) 

Sets the border width of the quad.

Parameters:
width The new border width of the quad.

u16 wsp::Quad::GetBorderWidth (  )  const

Gets the border width of the quad.

Returns:
The current border width of the quad.

void wsp::Quad::SetBorder ( bool  border  ) 

Turns the border of the quad on or off.

Parameters:
border Set to true if the quad should have border, false if not.

bool wsp::Quad::IsBorder (  )  const

Returns the current state of the broder.

Returns:
True if there is a border set, false if not.

void wsp::Quad::SetFillColor ( GXColor  fillColor  ) 

Sets the color of the quad. Initial color is black.

Parameters:
fillColor A GXColor with the desired data.

void wsp::Quad::SetBorderColor ( GXColor  borderColor  ) 

Sets the color of the border of the quad. Initial color is black.

Parameters:
borderColor A GXColor with the desired data.


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

Generated on Wed Jun 18 01:50:00 2008 for libwiisprite by  doxygen 1.5.5