|
Public Methods |
| | ZImage () |
| | Default Constructor.
|
| | ZImage (string filename) |
| | Constructor to Construct from File.
|
| | ZImage (SDL_Surface *surface) |
| | Constructor to Construct from SDL_Surface*.
|
| | ZImage (SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h) |
| | Constructor to Construct from part of an SDL_Surface*.
|
| | ~ZImage () |
| | Destructor, frees memory.
|
| void | Open (string filename) |
| | Opens a file.
|
| void | OpenFromImage (SDL_Surface *img, Sint16 x, Sint16 y, Sint16 w, Sint16 h) |
| | Cuts part of an existing image to create the new image.
|
| void | Attach (SDL_Surface *surface) |
| | Attach an existing surface to class.
|
| void | Reload () |
| | Reattach a preloaded texture that has been lost.
|
| void | Release () |
| | Releases image.
|
| void | SetColorKey (Uint8 red, Uint8 green, Uint8 blue) |
| | Set Color Key (transparent color) of Image.
|
| void | Flip (bool horizontal, bool vertical) |
| | Flip image over one or both axes.
|
| void | Stretch (float xFactor, float yFactor) |
| | Stretch the image by a certain X and Y factor.
|
| void | Resize (unsigned int width, unsigned int height) |
| | Resizes an image, stretching to new size.
|
| void | Bind () |
| | OpenGL related bind call.
|
| void | Draw (float x, float y) |
| | Draw Image to Screen.
|
| void | DrawRotated (int x, int y, float angle) |
| | Draw Image rotated to screen.
|
| bool | IsLoaded () |
| | Check if file is loaded.
|
| SDL_Surface * | Surface () |
| | Get SDL_Surface. Get SDL_Surface pointer to actual image data.
|
| int | Width () |
| | Get Width.
|
| int | Height () |
| | Get Height.
|
Protected Attributes |
|
GLfloat | rTexMinX |
| | Texture lower X, used internally for flip.
|
|
GLfloat | rTexMinY |
| | Texture lower Y, used internally for flip.
|
|
GLfloat | rTexMaxX |
| | Texture X width ratio, used internally by OpenGL.
|
|
GLfloat | rTexMaxY |
| | Texture Y width ratio, used internally by OpenGL.
|
|
SDL_Surface * | rImage |
| | Stored texture for future use.
|
|
unsigned int | rTexID |
| | Texture ID for OpenGL.
|
|
unsigned int | rWidth |
| | Current draw width of Texture.
|
|
unsigned int | rHeight |
| | Current draw height of Texture.
|