libwiigui 1.07
libwiigui is a GUI library for the Wii
 
Loading...
Searching...
No Matches
gui_image.h
1#ifndef LIBWIIGUI_IMAGE_H
2#define LIBWIIGUI_IMAGE_H
3
4enum class IMAGE {
5 TEXTURE,
6 COLOR,
7 DATA
8};
9
11class GuiImage : public GuiElement
12{
13public:
15 GuiImage();
24 GuiImage(u8 * img, int w, int h);
30 GuiImage(int w, int h, GXColor c);
32 ~GuiImage();
35 void SetAngle(float a);
38 void SetTile(int t);
40 void Draw() override;
43 u8 * GetImage();
46 void SetImage(GuiImageData * img);
51 void SetImage(u8 * img, int w, int h);
55 GXColor GetPixel(int x, int y);
60 void SetPixel(int x, int y, GXColor color);
64 void ColorStripe(int s);
68 void SetStripe(int s);
69protected:
70 IMAGE imgType;
71 u8 * image;
73 int tile;
74 int stripe;
75};
76
77#endif
Primary GUI class. Most other classes inherit from this class.
Definition: gui_element.h:7
Converts image data into GX-useable RGBA8. Currently designed for use only with PNG files.
Definition: gui_imagedata.h:5
Display, manage, and manipulate images in the GUI.
Definition: gui_image.h:12
void ColorStripe(int s)
Definition: gui_image.cpp:158
int stripe
Alpha value (0-255) to apply a stripe effect to the texture.
Definition: gui_image.h:74
void SetImage(GuiImageData *img)
Definition: gui_image.cpp:95
IMAGE imgType
Type of image data (TEXTURE, COLOR, DATA)
Definition: gui_image.h:70
~GuiImage()
Destructor.
Definition: gui_image.cpp:84
void SetTile(int t)
Definition: gui_image.cpp:122
u8 * GetImage()
Definition: gui_image.cpp:90
u8 * image
Poiner to image data. May be shared with GuiImageData data.
Definition: gui_image.h:71
GuiImage()
Constructor.
Definition: gui_image.cpp:15
void Draw() override
Constantly called to draw the image.
Definition: gui_image.cpp:224
GXColor GetPixel(int x, int y)
Definition: gui_image.cpp:127
f32 imageangle
Angle to draw the image.
Definition: gui_image.h:72
void SetStripe(int s)
Definition: gui_image.cpp:153
void SetPixel(int x, int y, GXColor color)
Definition: gui_image.cpp:141
void SetAngle(float a)
Definition: gui_image.cpp:117
int tile
Number of times to draw (tile) the image horizontally.
Definition: gui_image.h:73