MeVisLab Toolbox Reference
|
Defines and implements a class to store multiple images and draw them via OpenGL. More...
#include <View2DIcons.h>
Public Member Functions | |
View2DIcons () | |
Constructor and destructor. | |
~View2DIcons () | |
void | drawIcon (int idx, float dx1, float dy1, float dx2, float dy2) |
draw the icon at index i | |
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 borderWidth and borderHeight (in texels) are not stretched while the rest of the image is stretched to fill the box) For example usages, google for "css border-image". | |
bool | addIcon (const char *filename) |
add icon from file | |
bool | addIcons (const char *filename, int width, int height) |
add icons from file by splitting the file into width x height blocks | |
View2DTexture * | getIcon (int index) |
get icon at index | |
int | numIcons () |
get number of icons | |
void | removeIcon (int index) |
remove an icon | |
void | clearIcons () |
clear all icons | |
Defines and implements a class to store multiple images and draw them via OpenGL.
Defines and implements a class to store multiple images and draw them via OpenGL.
Definition at line 23 of file View2DIcons.h.
View2DIcons::View2DIcons | ( | ) |
Constructor and destructor.
View2DIcons::~View2DIcons | ( | ) |
add icons from file by splitting the file into width x height blocks
void View2DIcons::clearIcons | ( | ) |
clear all icons
draw the icon at index i
void View2DIcons::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 borderWidth and borderHeight (in texels) are not stretched while the rest of the image is stretched to fill the box) For example usages, google for "css border-image".
NOTE: This method only supports textures that are smaller than the maximum GL texture size.
View2DTexture * View2DIcons::getIcon | ( | int | index | ) |
get icon at index
int View2DIcons::numIcons | ( | ) |
get number of icons