#include <ImageBitmap.h>

Public Member Functions | |
| ImageBitmap () | |
| ImageBitmap (int width, int height, bool alpha=false, unsigned char fill=255) | |
| virtual | ~ImageBitmap () |
| void | clear () |
| virtual unsigned char * | getBits () |
| virtual int | getWidth () |
| virtual int | getHeight () |
| virtual int | getAlignment () |
| virtual int | getComponents () |
| virtual bool | getAlpha () |
| void | setBits (unsigned char *bits) |
| bool | loadFromFile (const char *filename, bool alpha=false) |
| bool | loadFromFile (const char *filename, const char *alphafilename, bool invert) |
| virtual void | removeOwnership () |
Protected Member Functions | |
| void | createBlankInternal (int width, int height, bool alpha=false, unsigned char fill=255) |
Protected Attributes | |
| bool | owner_ |
| unsigned char * | newbits_ |
| int | width_ |
| int | height_ |
| bool | alpha_ |
Private Member Functions | |
| ImageBitmap (ImageBitmap &other) | |
| ImageBitmap & | operator= (ImageBitmap &other) |
Definition at line 34 of file ImageBitmap.h.
| ImageBitmap::ImageBitmap | ( | ) |
Definition at line 28 of file ImageBitmap.cpp.
| ImageBitmap::ImageBitmap | ( | int | width, | |
| int | height, | |||
| bool | alpha = false, |
|||
| unsigned char | fill = 255 | |||
| ) |
| ImageBitmap::~ImageBitmap | ( | ) | [virtual] |
| ImageBitmap::ImageBitmap | ( | ImageBitmap & | other | ) | [private] |
| void ImageBitmap::clear | ( | ) |
Definition at line 47 of file ImageBitmap.cpp.
References height_, newbits_, owner_, and width_.
Referenced by createBlankInternal(), and ~ImageBitmap().
| virtual unsigned char* ImageBitmap::getBits | ( | ) | [inline, virtual] |
Implements Image.
Definition at line 43 of file ImageBitmap.h.
References newbits_.
Referenced by loadFromFile().
| virtual int ImageBitmap::getWidth | ( | ) | [inline, virtual] |
Implements Image.
Definition at line 44 of file ImageBitmap.h.
References width_.
Referenced by loadFromFile().
| virtual int ImageBitmap::getHeight | ( | ) | [inline, virtual] |
Implements Image.
Definition at line 45 of file ImageBitmap.h.
References height_.
Referenced by loadFromFile().
| virtual int ImageBitmap::getAlignment | ( | ) | [inline, virtual] |
| virtual int ImageBitmap::getComponents | ( | ) | [inline, virtual] |
Implements Image.
Definition at line 47 of file ImageBitmap.h.
References alpha_.
Referenced by createBlankInternal(), and loadFromFile().
| virtual bool ImageBitmap::getAlpha | ( | ) | [inline, virtual] |
| void ImageBitmap::setBits | ( | unsigned char * | bits | ) | [inline] |
| bool ImageBitmap::loadFromFile | ( | const char * | filename, | |
| bool | alpha = false | |||
| ) |
Overwrite the bitmap with the contents of the given file. If alpha is true then any black areas in the bitmap have full opacity. When creating an alpha bitmap the bitmap is created in RGBA format, otherwise in RGB format.
Definition at line 98 of file ImageBitmap.cpp.
References createBlankInternal(), S3D::dialogExit(), S3D::formatStringBuffer(), from, getComponents(), height_, newbits_, and width_.
Referenced by ImageFactory::loadAlphaImage(), loadFromFile(), and ImageFactory::loadImage().
| bool ImageBitmap::loadFromFile | ( | const char * | filename, | |
| const char * | alphafilename, | |||
| bool | invert | |||
| ) |
Definition at line 55 of file ImageBitmap.cpp.
References createBlankInternal(), getBits(), getHeight(), getWidth(), and loadFromFile().
| virtual void ImageBitmap::removeOwnership | ( | ) | [inline, virtual] |
| void ImageBitmap::createBlankInternal | ( | int | width, | |
| int | height, | |||
| bool | alpha = false, |
|||
| unsigned char | fill = 255 | |||
| ) | [protected] |
Definition at line 139 of file ImageBitmap.cpp.
References alpha_, clear(), getComponents(), height_, newbits_, and width_.
Referenced by ImageBitmap(), and loadFromFile().
| ImageBitmap& ImageBitmap::operator= | ( | ImageBitmap & | other | ) | [private] |
bool ImageBitmap::owner_ [protected] |
unsigned char* ImageBitmap::newbits_ [protected] |
Definition at line 65 of file ImageBitmap.h.
Referenced by clear(), createBlankInternal(), getBits(), loadFromFile(), and setBits().
int ImageBitmap::width_ [protected] |
Definition at line 66 of file ImageBitmap.h.
Referenced by clear(), createBlankInternal(), getWidth(), and loadFromFile().
int ImageBitmap::height_ [protected] |
Definition at line 67 of file ImageBitmap.h.
Referenced by clear(), createBlankInternal(), getHeight(), and loadFromFile().
bool ImageBitmap::alpha_ [protected] |
Definition at line 68 of file ImageBitmap.h.
Referenced by createBlankInternal(), getAlpha(), and getComponents().
1.5.3