![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Definition at line 22 of file PureImageImpl.h.
#include <PureImageImpl.h>
Public Member Functions | |
virtual | ~PureImageImpl () |
TPureUInt | getWidth () const |
TPureUInt | getHeight () const |
TPureUInt | getBitsPerPixels () const |
TPURE_PIXEL_COMPONENT_ORDER | getPixelComponentOrder () const |
TPURE_PIXEL_COMPONENT_ORDER | getOriginalPixelComponentOrder () const |
TPureBool | setPixelComponentOrder (TPURE_PIXEL_COMPONENT_ORDER corder) |
PureColor | getPixel (TPureUInt x, TPureUInt y) |
PureColor | getPixel (TPureUInt x, TPureUInt y) const |
TPureBool | setPixel (TPureUInt x, TPureUInt y, TPureUByte r, TPureUByte g, TPureUByte b, TPureUByte a=0) |
TPureBool | setPixel (TPureUInt x, TPureUInt y, PureColor clr) |
TPureBool | isChanged () const |
const TPureUByte * | getPixels () const |
TPureUByte * | getPixels () |
TPureUInt | getPixelsSize () const |
virtual void | FlushResources () |
virtual TPureUInt | getUsedSystemMemory () const |
TPureBool | cannibalize (PureImage &victim) |
Acquires the resources and properties of the given PureImage object, meaning that the given image will lose the pixels and other resources. | |
Private Member Functions | |
PureImageImpl (PureImage *parent) | |
Only Image or ImageManager can create it. | |
PureImageImpl (const PureImageImpl &) | |
PureImageImpl & | operator= (const PureImageImpl &) |
TPureUInt | getIndexToPixel (TPureUInt x, TPureUInt y) const |
Gets the index in pPixels to the pixel at the given (x,y) coordinate. | |
TPureBool | swapColors (TPURE_PIXEL_COMPONENT_ORDER from, TPURE_PIXEL_COMPONENT_ORDER to, TPureByte swapcount) |
Transforms the color component order of the image to another. | |
bool | initMembers (TPureUInt bits, TPureUInt w, TPureUInt h, TPIXCOMPORD clrCOrderOrig, TPIXCOMPORD clrCOrder, TPureBool upsDown, TPureBool chngd, TPureUByte *pxls, TPureUInt npxls) |
TPureBool | readBMP32pixels (HANDLE f) |
Used by readBMPpixels() for 32-bpp BMPs. | |
TPureBool | readBMP24pixels (HANDLE f) |
Used by readBMPpixels() for 24-bpp BMPs. | |
unsigned char * | readPaletteIndices (const HANDLE f) |
Reads palette indices from given file. | |
TPureBool | readBMP8pixels (HANDLE f, const RGBQUAD *palette) |
Used by readBMPpixels() for 8-bpp BMPs. | |
TPureBool | readBMP4pixels (HANDLE f, const RGBQUAD *palette) |
Used by readBMPpixels() for 4-bpp BMPs. | |
TPureBool | readBMP1pixels (HANDLE f, const RGBQUAD *palette) |
Used by readBMPpixels() for 1-bpp BMPs. | |
TPureBool | readBMPpixels (HANDLE f, const RGBQUAD *palette, WORD nBitCount) |
Reads pixels into memory in correct format. | |
Static Private Member Functions | |
static TPureBool | setColorComponentsIndices (TPureByte &r, TPureByte &g, TPureByte &b, TPureByte &a, TPIXCOMPORD pxcord) |
Saves indices of the color components to the given params [-1 - 3]. | |
static TPIXCOMPORD | getIntermediatePixelCompOrder (TPIXCOMPORD from, TPIXCOMPORD to) |
Returns a 1-step intermediate pixel component order between the given 2. | |
Private Attributes | |
PureImage * | _pOwner |
The owner public object who creates this pimpl object. | |
TPureUInt | nBits |
Bit depth (number of color bits per pixel). | |
TPureUInt | nWidth |
Width (pixel). | |
TPureUInt | nHeight |
Height (pixel). | |
TPIXCOMPORD | clrCompOrderOrig |
Original color component order: right after loading. | |
TPIXCOMPORD | clrCompOrder |
Actual color component order (swapColors(), setPixelComponentOrder() are changing it). | |
TPureBool | bUpsideDown |
True if the 1st row is the last row and the last row is the 1st row. | |
TPureBool | bChanged |
True if the pixel data has been changed since loading it from file. | |
TPureUByte * | pPixels |
Array of pixels. | |
TPureUInt | nSizePixels |
Size of array of pixels. | |
Static Private Attributes | |
static TPureUInt | nImagesTotal = 0 |
Friends | |
class | PureImage |
class | PureImageManager |
|
virtual |
Definition at line 28 of file PureImage.cpp.
|
explicitprivate |
Only Image or ImageManager can create it.
Only ImageManager can create it.
Sets default values to members.
Definition at line 329 of file PureImage.cpp.
|
private |
Definition at line 337 of file PureImage.cpp.
Acquires the resources and properties of the given PureImage object, meaning that the given image will lose the pixels and other resources.
This is a way of moving assets of an image to another image, MOVING, so no array copy is involved.
Definition at line 223 of file PureImage.cpp.
|
virtual |
Definition at line 199 of file PureImage.cpp.
TPureUInt PureImage::PureImageImpl::getBitsPerPixels | ( | ) | const |
Definition at line 50 of file PureImage.cpp.
TPureUInt PureImage::PureImageImpl::getHeight | ( | ) | const |
Definition at line 44 of file PureImage.cpp.
Gets the index in pPixels to the pixel at the given (x,y) coordinate.
Definition at line 360 of file PureImage.cpp.
|
staticprivate |
Returns a 1-step intermediate pixel component order between the given 2.
Useful if there is 2 steps between the given values. If there is less than 2 steps, the 2 given values will be returned.
Definition at line 293 of file PureImage.cpp.
TPURE_PIXEL_COMPONENT_ORDER PureImage::PureImageImpl::getOriginalPixelComponentOrder | ( | ) | const |
Definition at line 62 of file PureImage.cpp.
Definition at line 104 of file PureImage.cpp.
Definition at line 125 of file PureImage.cpp.
TPURE_PIXEL_COMPONENT_ORDER PureImage::PureImageImpl::getPixelComponentOrder | ( | ) | const |
Definition at line 56 of file PureImage.cpp.
TPureUByte * PureImage::PureImageImpl::getPixels | ( | ) |
Definition at line 187 of file PureImage.cpp.
const TPureUByte * PureImage::PureImageImpl::getPixels | ( | ) | const |
Definition at line 181 of file PureImage.cpp.
TPureUInt PureImage::PureImageImpl::getPixelsSize | ( | ) | const |
Definition at line 193 of file PureImage.cpp.
|
virtual |
Definition at line 210 of file PureImage.cpp.
TPureUInt PureImage::PureImageImpl::getWidth | ( | ) | const |
Definition at line 38 of file PureImage.cpp.
|
private |
Definition at line 439 of file PureImage.cpp.
TPureBool PureImage::PureImageImpl::isChanged | ( | ) | const |
Definition at line 175 of file PureImage.cpp.
|
private |
Definition at line 347 of file PureImage.cpp.
|
private |
Used by readBMPpixels() for 1-bpp BMPs.
Definition at line 617 of file PureImage.cpp.
|
private |
Used by readBMPpixels() for 24-bpp BMPs.
Definition at line 496 of file PureImage.cpp.
|
private |
Used by readBMPpixels() for 32-bpp BMPs.
Definition at line 480 of file PureImage.cpp.
|
private |
Used by readBMPpixels() for 4-bpp BMPs.
Definition at line 576 of file PureImage.cpp.
|
private |
Used by readBMPpixels() for 8-bpp BMPs.
Definition at line 541 of file PureImage.cpp.
|
private |
Reads pixels into memory in correct format.
Definition at line 653 of file PureImage.cpp.
|
private |
Reads palette indices from given file.
The buffer returned by this function should be freed by caller. Used by readBMPnpixels where n < 24, so where palette is available.
Definition at line 512 of file PureImage.cpp.
|
staticprivate |
Saves indices of the color components to the given params [-1 - 3].
Only the a(lpha) can become -1 if the image has no alpha. That is not an error scenario.
Definition at line 270 of file PureImage.cpp.
Definition at line 169 of file PureImage.cpp.
TPureBool PureImage::PureImageImpl::setPixel | ( | TPureUInt | x, |
TPureUInt | y, | ||
TPureUByte | r, | ||
TPureUByte | g, | ||
TPureUByte | b, | ||
TPureUByte | a = 0 ) |
Definition at line 146 of file PureImage.cpp.
TPureBool PureImage::PureImageImpl::setPixelComponentOrder | ( | TPURE_PIXEL_COMPONENT_ORDER | corder | ) |
Definition at line 68 of file PureImage.cpp.
|
private |
Transforms the color component order of the image to another.
Definition at line 374 of file PureImage.cpp.
|
friend |
Definition at line 138 of file PureImageImpl.h.
|
friend |
Definition at line 139 of file PureImageImpl.h.
|
private |
The owner public object who creates this pimpl object.
Definition at line 84 of file PureImageImpl.h.
|
private |
True if the pixel data has been changed since loading it from file.
Definition at line 91 of file PureImageImpl.h.
|
private |
True if the 1st row is the last row and the last row is the 1st row.
Definition at line 90 of file PureImageImpl.h.
|
private |
Actual color component order (swapColors(), setPixelComponentOrder() are changing it).
Definition at line 89 of file PureImageImpl.h.
|
private |
Original color component order: right after loading.
Definition at line 88 of file PureImageImpl.h.
|
private |
Bit depth (number of color bits per pixel).
Definition at line 85 of file PureImageImpl.h.
|
private |
Height (pixel).
Definition at line 87 of file PureImageImpl.h.
|
staticprivate |
Definition at line 67 of file PureImageImpl.h.
|
private |
Size of array of pixels.
Definition at line 93 of file PureImageImpl.h.
|
private |
Width (pixel).
Definition at line 86 of file PureImageImpl.h.
|
private |
Array of pixels.
Definition at line 92 of file PureImageImpl.h.