|
VizKit
3.3.7
|
Bitmap raster image. More...
#include <VisualImage.h>
Classes | |
| struct | VisualImageHistogramPixelColors |
| Exchange data type for histogram creation. More... | |
Public Member Functions | |
| VisualImage () | |
| The constructor. | |
| ~VisualImage () | |
| The destructor. | |
| VisualImage (const VisualImage &other) | |
| Copy constructor. | |
| VisualImage & | operator= (const VisualImage &other) |
| Assignment operator. | |
| virtual VisualImage * | clone (void) const |
| Copies the current VisualImage and returns a pointer to a new VisualImage. | |
| bool | initWithFile (VisualFile &aFile) |
| Initializes the image with a file. | |
| bool | initWithARGBPixelData (PixelColor *argbPixels, size_t width, size_t height) |
| Initializes the image with a buffer of ARGB pixel data. | |
| bool | initWithEncodedData (const char *const bufferData, size_t size) |
| Initializes the image with a data pointer to encoded image data. | |
| bool | initWithStyledString (VisualStyledString &styledString) |
| Initializes the image with a styled string. | |
| bool | initWithURL (VisualString &anURL, VisualItemIdentifier &anId) |
| Initializes the image with an URL. | |
| bool | initWithLoadedEncodedData (void) |
| Initializes the image with loaded encoded image data. | |
| bool | initWithFramebuffer (const BottomLeftPositionedPixelRect &clipRect) |
| Initializes the image with contents of the current screen (framebuffer). | |
| bool | writeToPNGFile (VisualFile &aVisualFile) const |
| Writes the image as PNG encoded data to a file on disk. | |
| void | writeToPNGFileAsync (VisualFile &aVisualFile) |
| Writes the image as PNG encoded data to a file on disk asynchronously. | |
| void | writeToPNGFileAsyncAndDelete (VisualFile &aVisualFile) |
| Writes the image as PNG encoded data to a file on disk asynchronously and deletes the VisualImage afterwards. | |
| void | applyConvolutionFilter (const VisualConvolutionFilter &aConvolutionFilter) |
| Applies a convolution filter to the image. | |
| size_t | getWidth (void) const |
| Returns the width of the bitmap image (in pixels). | |
| size_t | getHeight (void) const |
| Returns the height of the bitmap image (in pixels). | |
| double | getLogicalWidth (void) const |
| Returns the logical width of the texture. | |
| double | getLogicalHeight (void) const |
| Returns the logical height of the texture. | |
| void | draw (const VertexChain *const aVertexChain, bool debug=false) |
| Draws the image. | |
| bool | isEmpty (void) const |
| Answers the question whether the image is empty or set. | |
| BlendMode | getBlendMode (void) const |
| Returns the blend mode of the image. | |
| void | setBlendMode (BlendMode aBlendMode) |
| Sets the blend mode of the image. | |
| void | resample (const PixelRect &pixelRect) |
| Resamples the pixel data of the texture to the given dimensions of the pixelRect. | |
| VisualTextureContainer * | getTextureContainer (void) const |
| Returns a pointer to the texture container of the image. | |
| virtual void | dataLoadDidEnd (const VisualItemIdentifier &identifier) |
| Notification that the loading of data ended. | |
| void | createHistogram (void) |
| Creates a histogram of RGB pixel color values. | |
| VisualHistogram::PixelColorHistogram * | getHistogram (void) |
| Returns the internal histogram. | |
Static Public Member Functions | |
| static VisualImage * | createWithFile (VisualFile &aFile) |
| Creates an image with a file. | |
| static VisualImage * | createWithARGBPixelData (PixelColor *argbPixels, size_t width, size_t height) |
| Creates an image with a buffer of ARGB pixel data. | |
| static VisualImage * | createWithEncodedData (const char *const bufferData, uint32 size) |
| Creates an image with a data pointer to encoded image data. | |
| static VisualImage * | createWithStyledString (VisualStyledString &styledString) |
| Creates an image with a styled string. | |
| static VisualImage * | createWithURL (VisualString &anURL, VisualItemIdentifier &anId) |
| Creates an image with an URL. | |
| static VisualImage * | createWithFramebuffer (const BottomLeftPositionedPixelRect &clipRect) |
| Creates an image with contents of the current screen (framebuffer). | |
Private Member Functions | |
| void | copy (const VisualImage &other) |
| Copy method for assignment operator and copy constructor. | |
| void | getRGBHistogramInputPixels (std::vector< PixelColor > &inputValues) const |
| Returns the array of RGB color pixels as required to create a histogram. | |
Private Attributes | |
| VisualTextureContainer * | visualTextureContainer |
| Pointer to the VisualTextureContainer. | |
| bool | isSet |
| True if image has been set. | |
| BlendMode | blendMode |
| The blend mode of the image. | |
| VisualHistogram::PixelColorHistogram * | histogram |
| Creates a histogram of RGB pixel color values. | |
Bitmap raster image.
The constructor.
The destructor.
| VisualImage::VisualImage | ( | const VisualImage & | other | ) |
Copy constructor.
| other | Reference to another VisualImage. |
| void VisualImage::applyConvolutionFilter | ( | const VisualConvolutionFilter & | aConvolutionFilter | ) |
Applies a convolution filter to the image.
| aConvolutionFilter | The convolution filter to apply to the image. |
| VisualImage * VisualImage::clone | ( | void | ) | const [virtual] |
Copies the current VisualImage and returns a pointer to a new VisualImage.
Implements VizKit::VisualObject.
| void VisualImage::copy | ( | const VisualImage & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
| other | Another VisualImage. |
| void VisualImage::createHistogram | ( | void | ) |
Creates a histogram of RGB pixel color values.
A histogram contains the salient color values of the image.
| VisualImage * VisualImage::createWithARGBPixelData | ( | PixelColor * | argbPixels, |
| size_t | width, | ||
| size_t | height | ||
| ) | [static] |
Creates an image with a buffer of ARGB pixel data.
| argbPixels | Pointer to ARGB pixel data. |
| width | The width of the pixel data. |
| height | The height of the pixel data. |
| VisualImage * VisualImage::createWithEncodedData | ( | const char *const | bufferData, |
| uint32 | size | ||
| ) | [static] |
Creates an image with a data pointer to encoded image data.
| bufferData | A pointer to the data. |
| size | The size of the data pointed to in bytes. |
| VisualImage * VisualImage::createWithFile | ( | VisualFile & | aFile | ) | [static] |
Creates an image with a file.
| aFile | Reference to a file. |
| VisualImage * VisualImage::createWithFramebuffer | ( | const BottomLeftPositionedPixelRect & | clipRect | ) | [static] |
Creates an image with contents of the current screen (framebuffer).
| clipRect | The dimensions and position of the clip rect. |
| VisualImage * VisualImage::createWithStyledString | ( | VisualStyledString & | styledString | ) | [static] |
Creates an image with a styled string.
| styledString | The styled string to convert into bitmap image. |
| VisualImage * VisualImage::createWithURL | ( | VisualString & | anURL, |
| VisualItemIdentifier & | anId | ||
| ) | [static] |
Creates an image with an URL.
| anURL | URL of the image. |
| anId | Identifier that can be queried to track the progress of this asynchronous creation. |
| void VisualImage::dataLoadDidEnd | ( | const VisualItemIdentifier & | identifier | ) | [virtual] |
Notification that the loading of data ended.
| identifier | The identifier of the data load request. |
Reimplemented from VizKit::VisualObject.
| void VisualImage::draw | ( | const VertexChain *const | aVertexChain, |
| bool | debug = false |
||
| ) |
Draws the image.
| aVertexChain | The chain of vertices with which the image is drawn. |
| debug | If true, details of the drawing operation can be traced for diagnostical purposes. |
| BlendMode VisualImage::getBlendMode | ( | void | ) | const |
Returns the blend mode of the image.
| size_t VisualImage::getHeight | ( | void | ) | const |
Returns the height of the bitmap image (in pixels).
Returns the internal histogram.
| double VisualImage::getLogicalHeight | ( | void | ) | const |
Returns the logical height of the texture.
| double VisualImage::getLogicalWidth | ( | void | ) | const |
Returns the logical width of the texture.
| void VisualImage::getRGBHistogramInputPixels | ( | std::vector< PixelColor > & | inputValues | ) | const [private] |
Returns the array of RGB color pixels as required to create a histogram.
| [out] | inputValues | The pixels that can be used as input for histogram creation. |
| VisualTextureContainer * VisualImage::getTextureContainer | ( | void | ) | const |
Returns a pointer to the texture container of the image.
| size_t VisualImage::getWidth | ( | void | ) | const |
Returns the width of the bitmap image (in pixels).
| bool VisualImage::initWithARGBPixelData | ( | PixelColor * | argbPixels, |
| size_t | width, | ||
| size_t | height | ||
| ) |
Initializes the image with a buffer of ARGB pixel data.
| argbPixels | Pointer to ARGB pixel data. |
| width | The width of the pixel data. |
| height | The height of the pixel data. |
| bool VisualImage::initWithEncodedData | ( | const char *const | bufferData, |
| size_t | size | ||
| ) |
Initializes the image with a data pointer to encoded image data.
| bufferData | A pointer to the data. |
| size | The size of the data pointed to in bytes. |
| bool VisualImage::initWithFile | ( | VisualFile & | aFile | ) |
Initializes the image with a file.
| aFile | Reference to a file. |
| bool VisualImage::initWithFramebuffer | ( | const BottomLeftPositionedPixelRect & | clipRect | ) |
Initializes the image with contents of the current screen (framebuffer).
| clipRect | The dimensions and position of the clip rect. |
| bool VisualImage::initWithLoadedEncodedData | ( | void | ) |
Initializes the image with loaded encoded image data.
| bool VisualImage::initWithStyledString | ( | VisualStyledString & | styledString | ) |
Initializes the image with a styled string.
| styledString | The styled string to convert into bitmap image. |
| bool VisualImage::initWithURL | ( | VisualString & | anURL, |
| VisualItemIdentifier & | anId | ||
| ) |
Initializes the image with an URL.
| anURL | URL of the image. |
| anId | Identifier that can be queried to track the progress of this asynchronous initialization. |
| bool VisualImage::isEmpty | ( | void | ) | const |
Answers the question whether the image is empty or set.
| VisualImage & VisualImage::operator= | ( | const VisualImage & | other | ) |
Assignment operator.
| other | Reference to another VisualImage. |
| void VisualImage::resample | ( | const PixelRect & | pixelRect | ) |
Resamples the pixel data of the texture to the given dimensions of the pixelRect.
| pixelRect | The resampling dimensions. |
| void VisualImage::setBlendMode | ( | BlendMode | aBlendMode | ) |
Sets the blend mode of the image.
| aBlendMode | The blend mode of the image. |
| bool VisualImage::writeToPNGFile | ( | VisualFile & | aVisualFile | ) | const |
Writes the image as PNG encoded data to a file on disk.
| aVisualFile | Access to file the image is to be written into. |
| void VisualImage::writeToPNGFileAsync | ( | VisualFile & | aVisualFile | ) |
Writes the image as PNG encoded data to a file on disk asynchronously.
| aVisualFile | Access to file the image is to be written into. |
| void VisualImage::writeToPNGFileAsyncAndDelete | ( | VisualFile & | aVisualFile | ) |
Writes the image as PNG encoded data to a file on disk asynchronously and deletes the VisualImage afterwards.
| aVisualFile | Access to file the image is to be written into. |
BlendMode VizKit::VisualImage::blendMode [private] |
The blend mode of the image.
Creates a histogram of RGB pixel color values.
| visualImageHistogramPixelColors | Pixel color values and pointer to image. Histogram. |
bool VizKit::VisualImage::isSet [private] |
True if image has been set.
False if image is not valid or has not been set yet.
Pointer to the VisualTextureContainer.