Public Member Functions | Protected Attributes

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 SetColor (GXColor c)
void ColorStripe (int s)
void Grayscale ()
 Directly modifies the image data to change the image to grayscale.
void SetStripe (int s)
void SetDisplaySize (int w, int h)

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.
u16 displayWidth
u16 displayHeight

Detailed Description

Display, manage, and manipulate images in the GUI.

Definition at line 523 of file gui.h.


Constructor & Destructor Documentation

GuiImage::GuiImage (  ) 

Constructor.

Constructor for the GuiImage class.

Definition at line 15 of file gui_image.cpp.

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

Definition at line 26 of file gui_image.cpp.

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

Definition at line 43 of file gui_image.cpp.

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

Definition at line 54 of file gui_image.cpp.

GuiImage::~GuiImage (  ) 

Destructor.

Destructor for the GuiImage class.

Definition at line 84 of file gui_image.cpp.


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

Definition at line 171 of file gui_image.cpp.

void GuiImage::Draw (  )  [virtual]

Constantly called to draw the image.

Draw the button on screen

Reimplemented from GuiElement.

Definition at line 258 of file gui_image.cpp.

u8 * GuiImage::GetImage (  ) 

Gets the image data

Returns:
pointer to image data

Definition at line 90 of file gui_image.cpp.

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

Definition at line 127 of file gui_image.cpp.

void GuiImage::SetAngle ( float  a  ) 

Sets the image rotation angle for drawing

Parameters:
a Angle (in degrees)

Definition at line 117 of file gui_image.cpp.

void GuiImage::SetColor ( GXColor  c  ) 

Sets the image to the specified color

Parameters:
c Image color

Definition at line 153 of file gui_image.cpp.

void GuiImage::SetImage ( GuiImageData img  ) 

Sets up a new image using the GuiImageData object specified

Parameters:
img Pointer to GuiImageData object

Definition at line 95 of file gui_image.cpp.

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

Definition at line 109 of file gui_image.cpp.

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

Definition at line 141 of file gui_image.cpp.

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

Definition at line 166 of file gui_image.cpp.

void GuiImage::SetTile ( int  t  ) 

Sets the number of times to draw the image horizontally

Parameters:
t Number of times to draw the image

Definition at line 122 of file gui_image.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Defines