|
ROLAND
0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
|
Image to display either on an OpenGL- or plain SDL-Surface. More...
#include <image.h>
Public Member Functions | |
| Image (bool autoconvert=true) | |
| Constructor. Does some init. More... | |
| Image (const String &fname, bool autoconvert=true) | |
| ~Image () | |
| void | clear () |
| Clears the Image and frees all resources. More... | |
| void | load (const String &fname, bool autoconvert, uchar alpha=255) |
| loads an Image into a SDL_Surface More... | |
| void | load (const String &fname, uchar alpha=255) |
| void | convert () |
| converts an Image to Screenformat More... | |
| bool | hasAlpha () const |
| has alphachannel? More... | |
| bool | hasColorKey () const |
| has colorkey? RGB(255, 0, 255) More... | |
| Uint16 | width () const |
| Uint16 | height () const |
| const Size & | size () const |
| void | setAutoConvert (bool autoconvert) |
| void | setAlpha (uchar alpha=255) |
| void | setColorKey (Color color) |
| Color | pixel (const Point &pos) |
| SDL_Surface * | surface () |
| void * | pixels () |
| GLuint | texNum () const |
| bool | hasTexture () const |
| GLuint | textureWidth () const |
| GLuint | textureHeight () const |
Protected Member Functions | |
| void | checkAlpha () |
| checks the surface for Alpha More... | |
| void | checkColorKey () |
| checks the surface for ColorKey More... | |
| void | genTexture () |
| void | calcTexSize () |
| void | clearTexture () |
| void | clearSurface () |
Private Attributes | |
| SDL_Surface * | mSurface |
| Color | mColorKey |
| bool | mHasAlpha |
| bool | mHasColorKey |
| bool | mIsConverted |
| bool | mAutoConvert |
| Size | mSize |
| GLuint | mTextureWidth |
| GLuint | mTextureHeight |
| GLuint | mTexNum |
Image to display either on an OpenGL- or plain SDL-Surface.
| Image | ( | bool | autoconvert = true | ) |
Constructor. Does some init.
References Image::clear(), Image::mAutoConvert, Image::mSurface, and Image::mTexNum.
References Image::clear(), Image::load(), Image::mAutoConvert, Image::mSurface, and Image::mTexNum.
| ~Image | ( | ) |
References Image::clear().
|
protected |
References EXCGL, Size::height(), Image::mSize, Image::mTextureHeight, Image::mTextureWidth, and Size::width().
Referenced by Image::convert(), and Image::textureHeight().
|
protected |
checks the surface for Alpha
References Color::a(), Size::height(), Image::mHasAlpha, Image::mSize, Image::mSurface, Size::width(), x, and y.
Referenced by Image::convert(), and Image::textureHeight().
|
protected |
checks the surface for ColorKey
References Color::b(), Color::g(), Size::height(), Image::mColorKey, Image::mHasColorKey, Image::mSize, Image::mSurface, Color::r(), Size::width(), x, and y.
Referenced by Image::convert(), and Image::textureHeight().
| void clear | ( | ) |
Clears the Image and frees all resources.
References Image::clearSurface(), Image::clearTexture(), Image::mColorKey, Image::mHasAlpha, Image::mHasColorKey, Image::mIsConverted, and Color::set().
Referenced by ImageFont::clear(), Image::Image(), and Image::~Image().
|
protected |
References Image::mSurface.
Referenced by Image::clear(), Image::convert(), Image::genTexture(), and Image::textureHeight().
|
protected |
References EXCSDL, Image::hasTexture(), Image::mSize, Image::mTexNum, Image::mTextureHeight, Image::mTextureWidth, and Size::set().
Referenced by Image::clear(), and Image::textureHeight().
| void convert | ( | ) |
converts an Image to Screenformat
References Image::calcTexSize(), Image::checkAlpha(), Image::checkColorKey(), Image::clearSurface(), EXCSDL, Image::genTexture(), Image::mHasAlpha, Image::mHasColorKey, Image::mIsConverted, Image::mSize, Image::mSurface, Size::set(), and Image::surface().
Referenced by Image::load(), and ImageFont::load().
|
protected |
References Color::b(), Image::clearSurface(), EXCSDL, Image::hasTexture(), Size::height(), Image::mHasAlpha, Image::mHasColorKey, Image::mSize, Image::mSurface, Image::mTexNum, Image::mTextureHeight, Image::mTextureWidth, Pixel::put(), Color::r(), Color::setA(), Size::width(), x, and y.
Referenced by Image::convert(), and Image::textureHeight().
|
inline |
has alphachannel?
References Image::mHasAlpha.
Referenced by CanvasGL::image().
|
inline |
|
inline |
References Image::mTexNum.
Referenced by Image::clearTexture(), and Image::genTexture().
|
inline |
References Size::height(), and Image::mSize.
Referenced by ImageFont::ImageFont().
loads an Image into a SDL_Surface
| fname | the filename to lo:ad |
References Image::convert(), EXCSDL, Image::mAutoConvert, Image::mSize, Image::mSurface, and Size::set().
Referenced by Image::Image(), ImageFont::load(), and Image::load().
References Image::load(), and Image::mAutoConvert.
References Image::mSurface, and Point::y.
Referenced by ImageFont::ImageFont().
|
inline |
References Image::mSurface.
|
inline |
References Image::mSurface.
|
inline |
sets whether or not autoconvert to screenformat
| autoconvert | = should be converted automatically? |
References Image::mAutoConvert.
|
inline |
References Image::mColorKey.
|
inline |
|
inline |
References Image::mSurface.
Referenced by Image::convert(), and CanvasStd::image().
|
inline |
References Image::mTexNum.
Referenced by CanvasGL::image().
|
inline |
References Image::calcTexSize(), Image::checkAlpha(), Image::checkColorKey(), Image::clearSurface(), Image::clearTexture(), Image::genTexture(), and Image::mTextureHeight.
Referenced by CanvasGL::image().
|
inline |
References Image::mTextureWidth.
Referenced by CanvasGL::image().
|
inline |
|
private |
Referenced by Image::Image(), Image::load(), and Image::setAutoConvert().
|
private |
Referenced by Image::checkColorKey(), Image::clear(), and Image::setColorKey().
|
private |
Referenced by Image::checkAlpha(), Image::clear(), Image::convert(), Image::genTexture(), and Image::hasAlpha().
|
private |
Referenced by Image::checkColorKey(), Image::clear(), Image::convert(), Image::genTexture(), and Image::hasColorKey().
|
private |
Referenced by Image::clear(), and Image::convert().
|
private |
|
private |
|
private |
Referenced by Image::clearTexture(), Image::genTexture(), Image::hasTexture(), Image::Image(), and Image::texNum().
|
private |
Referenced by Image::calcTexSize(), Image::clearTexture(), Image::genTexture(), and Image::textureHeight().
|
private |
Referenced by Image::calcTexSize(), Image::clearTexture(), Image::genTexture(), and Image::textureWidth().
1.8.11