27 #include "SDL_image.h" 44 Image(
bool autoconvert =
true);
45 Image(
const String & fname,
bool autoconvert =
true);
114 #endif // SDLTK_IMAGE_H GLuint textureHeight() const
Definition: image.h:81
Color pixel(const Point &pos)
Definition: image.h:73
void checkColorKey()
checks the surface for ColorKey
Definition: image.cpp:126
bool mAutoConvert
Definition: image.h:103
void * pixels()
Definition: image.h:75
Image to display either on an OpenGL- or plain SDL-Surface.
Definition: image.h:39
bool hasColorKey() const
has colorkey? RGB(255, 0, 255)
Definition: image.h:58
~Image()
Definition: image.cpp:48
Color mColorKey
Definition: image.h:97
bool hasTexture() const
Definition: image.h:78
void setColorKey(Color color)
Definition: image.h:71
SDL_Surface * mSurface
Definition: image.h:95
Image(bool autoconvert=true)
Constructor. Does some init.
Definition: image.cpp:26
void clearTexture()
Definition: image.cpp:75
unsigned char uchar
Definition: types.h:127
void calcTexSize()
Definition: image.cpp:91
GLuint mTextureWidth
Definition: image.h:107
bool hasAlpha() const
has alphachannel?
Definition: image.h:56
GLuint mTexNum
Definition: image.h:109
void clear()
Clears the Image and frees all resources.
Definition: image.cpp:53
GLuint textureWidth() const
Definition: image.h:80
void convert()
converts an Image to Screenformat
Definition: image.cpp:162
const Size & size() const
Definition: image.h:64
GLuint mTextureHeight
Definition: image.h:108
void load(const String &fname, bool autoconvert, uchar alpha=255)
loads an Image into a SDL_Surface
Definition: image.cpp:147
GLuint texNum() const
Definition: image.h:77
Uint16 width() const
Definition: image.h:60
void genTexture()
Definition: image.cpp:207
bool mHasColorKey
Definition: image.h:100
void setAutoConvert(bool autoconvert)
Definition: image.h:68
bool mHasAlpha
Definition: image.h:99
Uint16 height() const
Definition: image.h:62
Defines a 2D point (x, y)
Definition: point.h:28
Size mSize
Definition: image.h:105
defines a planar size (width, height)
Definition: size.h:30
Uint16 height() const
Definition: size.h:59
RGBA Color Type.
Definition: color.h:30
Uint16 width() const
Definition: size.h:57
Sint16 y
Definition: point.h:35
void setAlpha(uchar alpha=255)
Definition: image.h:70
SDL_Surface * surface()
Definition: image.h:74
std::string String
Definition: types.h:29
the SDL based Stuff
Definition: audio.cpp:22
void clearSurface()
Definition: image.cpp:65
bool mIsConverted
Definition: image.h:101
void checkAlpha()
checks the surface for Alpha
Definition: image.cpp:106