![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Image class. More...
Image class.
Definition at line 46 of file PureImageManager.h.
#include <PureImageManager.h>
Classes | |
class | PureImageImpl |
Public Member Functions | |
virtual | ~PureImage () |
CConsole & | getManagedConsole () const |
Returns access to console preset with logger module name as this class. | |
TPureUInt | getWidth () const |
Gets the width of the image. | |
TPureUInt | getHeight () const |
Gets the height of the image. | |
TPureUInt | getBitsPerPixels () const |
Gets the bit depth of the image. | |
TPURE_PIXEL_COMPONENT_ORDER | getPixelComponentOrder () const |
Gets the actual color component order. | |
TPURE_PIXEL_COMPONENT_ORDER | getOriginalPixelComponentOrder () const |
Gets the original color component order. | |
TPureBool | setPixelComponentOrder (TPURE_PIXEL_COMPONENT_ORDER corder) |
Transforms the color component order of the image to the given color component order. | |
PureColor | getPixel (TPureUInt x, TPureUInt y) |
Gets the color of the pixel at the given (x,y) coordinate. | |
PureColor | getPixel (TPureUInt x, TPureUInt y) const |
Gets the color of the pixel at the given (x,y) coordinate. | |
TPureBool | setPixel (TPureUInt x, TPureUInt y, TPureUByte r, TPureUByte g, TPureUByte b, TPureUByte a=0) |
Sets the color of the pixel at the given (x,y) coordinate. | |
TPureBool | setPixel (TPureUInt x, TPureUInt y, PureColor clr) |
Sets the color of the pixel at the given (x,y) coordinate. | |
TPureBool | isChanged () const |
True if the pixel data has been changed since loading it from file. | |
const TPureUByte * | getPixels () const |
Gets the pointer to the array of pixels, giving direct access to pixels. | |
TPureUByte * | getPixels () |
Gets the pointer to the array of pixels, giving direct access to pixels. | |
TPureUInt | getPixelsSize () const |
Gets the size of the array of pixels. | |
virtual void | FlushResources () |
This can be used if you don't need the pixels of the image to be in the system memory anymore. | |
virtual TPureUInt | getUsedSystemMemory () const |
Gets the amount of allocated system memory for this image. | |
![]() | |
PureFiledManaged () | |
virtual | ~PureFiledManaged () |
CConsole & | getManagedConsole () const |
Returns access to console preset with logger module name as this class. | |
const std::string & | getFilename () const |
Gets the filename. | |
![]() | |
PureManaged () | |
virtual | ~PureManaged () |
CConsole & | getManagedConsole () const |
Returns access to console preset with logger module name as this class. | |
const PureManaged * | getUtiliser () const |
Returns the managed that utilizes this managed. | |
PureManaged * | getUtiliser () |
Returns the managed that utilizes this managed. | |
void | SetUtiliser (PureManaged *pUtiliser) |
Sets the managed that utilizes this managed. | |
void | DetachFrom () |
Removes the managed from its manager. | |
PureManager * | getManager () const |
Gets the manager of the managed. | |
const std::string & | getName () const |
Gets the name. | |
void | SetName (const std::string &name) |
Sets the name. | |
Static Public Member Functions | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
![]() | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
![]() | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
Protected Member Functions | |
PureImage () | |
Only ImageManager can create it. | |
PureImage (const PureImage &) | |
PureImage & | operator= (const PureImage &) |
![]() | |
PureFiledManaged (const PureFiledManaged &other) | |
PureFiledManaged & | operator= (const PureFiledManaged &other) |
void | SetFilename (const std::string &filename) |
Sets the filename. | |
![]() | |
PureManaged (const PureManaged &other) | |
PureManaged & | operator= (const PureManaged &other) |
Private Attributes | |
PureImageImpl * | pImpl |
Friends | |
class | PureImageManager |
class | PureTextureManager |
|
virtual |
Definition at line 675 of file PureImage.cpp.
|
protected |
Only ImageManager can create it.
Sets default values to members.
std::bad_alloc | - This class or its ancestor dynamically allocates memory with operator new, in case of failure the exception is not handled but propagated to caller. |
Definition at line 895 of file PureImage.cpp.
|
protected |
std::bad_alloc | - This class or its ancestor dynamically allocates memory with operator new, in case of failure the exception is not handled but propagated to caller. |
Definition at line 906 of file PureImage.cpp.
|
virtual |
This can be used if you don't need the pixels of the image to be in the system memory anymore.
Reimplemented from PureManaged.
Definition at line 869 of file PureImage.cpp.
TPureUInt PureImage::getBitsPerPixels | ( | ) | const |
Gets the bit depth of the image.
For loaded BMP images:
Definition at line 735 of file PureImage.cpp.
TPureUInt PureImage::getHeight | ( | ) | const |
Gets the height of the image.
Definition at line 721 of file PureImage.cpp.
|
static |
Returns the logger module name of this class.
Intentionally not virtual, so derived class should hide this instead of overriding. Not even private, so user can also access this from outside, for any reason like controlling log filtering per logger module name.
Definition at line 701 of file PureImage.cpp.
CConsole & PureImage::getManagedConsole | ( | ) | const |
Returns access to console preset with logger module name as this class.
Intentionally not virtual, so the getConsole() in derived class should hide this instead of overriding.
Definition at line 688 of file PureImage.cpp.
TPURE_PIXEL_COMPONENT_ORDER PureImage::getOriginalPixelComponentOrder | ( | ) | const |
Gets the original color component order.
For loaded BMPs:
Definition at line 762 of file PureImage.cpp.
Gets the color of the pixel at the given (x,y) coordinate.
Definition at line 786 of file PureImage.cpp.
Gets the color of the pixel at the given (x,y) coordinate.
Definition at line 798 of file PureImage.cpp.
TPURE_PIXEL_COMPONENT_ORDER PureImage::getPixelComponentOrder | ( | ) | const |
Gets the actual color component order.
Same result as getOriginalPixelComponentOrder(), if the order hasn't been changed by swapColors() or setPixelComponentOrder() yet.
Definition at line 747 of file PureImage.cpp.
TPureUByte * PureImage::getPixels | ( | ) |
Gets the pointer to the array of pixels, giving direct access to pixels.
Gets the pointer to the array of pixels, providing direct access to pixels.
Definition at line 849 of file PureImage.cpp.
const TPureUByte * PureImage::getPixels | ( | ) | const |
Gets the pointer to the array of pixels, giving direct access to pixels.
Gets the pointer to the array of pixels, providing direct access to pixels.
Definition at line 839 of file PureImage.cpp.
TPureUInt PureImage::getPixelsSize | ( | ) | const |
Gets the size of the array of pixels.
Definition at line 860 of file PureImage.cpp.
|
virtual |
Gets the amount of allocated system memory for this image.
Reimplemented from PureFiledManaged.
Reimplemented in PureTexture.
Definition at line 880 of file PureImage.cpp.
TPureUInt PureImage::getWidth | ( | ) | const |
Gets the width of the image.
Definition at line 711 of file PureImage.cpp.
TPureBool PureImage::isChanged | ( | ) | const |
True if the pixel data has been changed since loading it from file.
Definition at line 829 of file PureImage.cpp.
Definition at line 916 of file PureImage.cpp.
Sets the color of the pixel at the given (x,y) coordinate.
Has no effect if the pixels are no longer in system memory (see FlushResources()). This is considered as an error.
Definition at line 820 of file PureImage.cpp.
TPureBool PureImage::setPixel | ( | TPureUInt | x, |
TPureUInt | y, | ||
TPureUByte | r, | ||
TPureUByte | g, | ||
TPureUByte | b, | ||
TPureUByte | a = 0 ) |
Sets the color of the pixel at the given (x,y) coordinate.
Has no effect if the pixels are no longer in system memory (see FlushResources()). This is considered as an error.
Definition at line 809 of file PureImage.cpp.
TPureBool PureImage::setPixelComponentOrder | ( | TPURE_PIXEL_COMPONENT_ORDER | cord | ) |
Transforms the color component order of the image to the given color component order.
Has no effect if the pixels are no longer in system memory (see FlushResources()).
Definition at line 774 of file PureImage.cpp.
|
friend |
Definition at line 108 of file PureImageManager.h.
|
friend |
Definition at line 109 of file PureImageManager.h.
|
private |
Definition at line 104 of file PureImageManager.h.