GuiImage Class Reference

Display, manage, and manipulate images in the GUI. More...

#include <gui.h>

Inheritance diagram for GuiImage:

GuiElement

List of all members.

Public Member Functions

 GuiImage ()
 Constructor.
 GuiImage (GuiImageData *img)
 GuiImage (u8 *img, int w, int h)
 GuiImage (int w, int h, GXColor c)
 ~GuiImage ()
 Destructor.
void SetAngle (float a)
void SetTile (int t)
void Draw ()
 Constantly called to draw the image.
u8 * GetImage ()
void SetImage (GuiImageData *img)
void SetImage (u8 *img, int w, int h)
GXColor GetPixel (int x, int y)
void SetPixel (int x, int y, GXColor color)
void ColorStripe (int s)
void Grayscale ()
 Directly modifies the image data to change the image to grayscale.
void SetStripe (int s)

Protected Attributes

int imgType
 Type of image data (IMAGE_TEXTURE, IMAGE_COLOR, IMAGE_DATA).
u8 * image
 Poiner to image data. May be shared with GuiImageData data.
f32 imageangle
 Angle to draw the image.
int tile
 Number of times to draw (tile) the image horizontally.
int stripe
 Alpha value (0-255) to apply a stripe effect to the texture.


Detailed Description

Display, manage, and manipulate images in the GUI.

Constructor & Destructor Documentation

GuiImage::GuiImage (  ) 

Constructor.

Constructor for the GuiImage class.

GuiImage::GuiImage ( GuiImageData img  ) 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
img Pointer to GuiImageData element

GuiImage::GuiImage ( u8 *  img,
int  w,
int  h 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Sets up a new image from the image data specified

Parameters:
img 
w Image width
h Image height

GuiImage::GuiImage ( int  w,
int  h,
GXColor  c 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates an image filled with the specified color

Parameters:
w Image width
h Image height
c Image color

GuiImage::~GuiImage (  ) 

Destructor.

Destructor for the GuiImage class.


Member Function Documentation

void GuiImage::ColorStripe ( int  s  ) 

Directly modifies the image data to create a color-striped effect Alters the RGB values by the specified amount

Parameters:
s Amount to increment/decrement the RGB values in the image

void GuiImage::Draw (  )  [virtual]

Constantly called to draw the image.

Draw the button on screen

Reimplemented from GuiElement.

u8 * GuiImage::GetImage (  ) 

Gets the image data

Returns:
pointer to image data

GXColor GuiImage::GetPixel ( int  x,
int  y 
)

Gets the pixel color at the specified coordinates of the image

Parameters:
x X coordinate
y Y coordinate

void GuiImage::SetAngle ( float  a  ) 

Sets the image rotation angle for drawing

Parameters:
a Angle (in degrees)

void GuiImage::SetImage ( u8 *  img,
int  w,
int  h 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
img Pointer to image data
w Width
h Height

void GuiImage::SetImage ( GuiImageData img  ) 

Sets up a new image using the GuiImageData object specified

Parameters:
img Pointer to GuiImageData object

void GuiImage::SetPixel ( int  x,
int  y,
GXColor  color 
)

Sets the pixel color at the specified coordinates of the image

Parameters:
x X coordinate
y Y coordinate
color Pixel color

void GuiImage::SetStripe ( int  s  ) 

Sets a stripe effect on the image, overlaying alpha blended rectangles Does not alter the image data

Parameters:
s Alpha amount to draw over the image

void GuiImage::SetTile ( int  t  ) 

Sets the number of times to draw the image horizontally

Parameters:
t Number of times to draw the image


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

Generated on Fri Oct 16 17:57:37 2009 for libwiigui by  doxygen 1.5.8