31 void drawIcon(
int idx,
float dx1,
float dy1,
float dx2,
float dy2);
38 void drawIconAsBorderImage(
int idx,
float dx1,
float dy1,
float dx2,
float dy2,
float borderWidth,
float borderHeight);
43 bool addIcons(
const char* filename,
int width,
int height);
58 std::vector<View2DTexture*> _icons;
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
Defines and implements a class to store multiple images and draw them via OpenGL.
bool addIcons(const char *filename, int width, int height)
add icons from file by splitting the file into width x height blocks
void drawIcon(int idx, float dx1, float dy1, float dx2, float dy2)
draw the icon at index i
View2DTexture * getIcon(int index)
get icon at index
void drawIconAsBorderImage(int idx, float dx1, float dy1, float dx2, float dy2, float borderWidth, float borderHeight)
draws the given icon from dx1,dy1 to dx2,dy2 using 3x3 quads (the corners/border regions defined by b...
void removeIcon(int index)
remove an icon
void clearIcons()
clear all icons
int numIcons()
get number of icons
bool addIcon(const char *filename)
add icon from file
View2DIcons()
Constructor and destructor.
A class to render images as OpenGL Textures.