Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Bitmap data class. More...
#include <ilviews/bitmaps/data.h>
Public Member Functions | |
IlvBWBitmapData (IlUInt width, IlUInt height) | |
Constructor. More... | |
virtual void | getRGBPixel (IlUInt x, IlUInt y, IlUChar &r, IlUChar &g, IlUChar &b) const |
Returns a true color representation of a pixel located in the image at the x and y coordinates. More... | |
virtual IlUChar * | getRGBPixels (const IlvRect &rect, IlUInt &size, IlUChar *data=0) const |
Returns a true color representation of a region of the image stored in the instance. More... | |
virtual IlUInt | getUsedColorNum () |
Returns the number of referenced colors in the bitmap data. More... | |
void | setPixel (IlUInt x, IlUInt y, IlUChar pixel) |
Sets the internal representation of a pixel to the given value. More... | |
virtual void | setRGBPixel (IlUInt x, IlUInt y, IlUChar r, IlUChar g, IlUChar b) |
Sets a pixel of the image stored in the instance to the given true color representation. More... | |
Public Member Functions inherited from IlvBitmapData | |
IlvBitmapData (IlUInt width, IlUInt height, IlUShort depth, IlUInt padding=32) | |
Constructor. More... | |
virtual | ~IlvBitmapData () |
Destructor. More... | |
virtual void | blend (const IlvBitmapData *src, const IlvRect &srcrect, const IlvPoint &to, IlUChar blend) |
Blends a rectangle from another bitmap data to the given position. More... | |
virtual void | blendPixel (IlUInt xdst, IlUInt ydst, const IlvBitmapData *src, IlUInt xsrc, IlUInt ysrc, IlUChar blend) |
Blends a pixel from another bitmap data to the given position. More... | |
virtual void | copy (const IlvBitmapData *src, const IlvRect &srcrect, const IlvPoint &to) |
Copies a rectangle from another bitmap data to the given position. More... | |
virtual void | copyPixel (IlUInt xdst, IlUInt ydst, const IlvBitmapData *src, IlUInt xsrc, IlUInt ysrc) |
Copies a pixel from another bitmap data. More... | |
virtual void | fill (const IlvRect &rect, IlUChar r, IlUChar g, IlUChar b, IlUChar a=255) |
Fills a rectangular area of the bitmap data with the specified color. More... | |
IlUInt | getByteWidth () const |
Returns the size in bytes of a row of the image stored in the instance. More... | |
IlUInt | getCount () const |
Returns the reference count for this instance. | |
IlUChar * | getData () const |
Returns a pointer to the internal storage memory of the instance. More... | |
IlUShort | getDepth () const |
Returns the number of bits needed to describe a pixel of the image stored in the instance. More... | |
IlUInt | getHeight () const |
Returns the height in pixels of the image stored in the instance. More... | |
IlvBitmapInformation * | getInformation () const |
Returns the bitmap information. More... | |
virtual IlvBWBitmapData * | getMask () const |
Returns the mask bitmap data of the instance. More... | |
IlUInt | getPadding () const |
Returns the padding used by the instance. More... | |
IlUChar * | getRowStartData (IlUInt idx) const |
Returns a pointer to the storage memory of a given row of the image in the instance. More... | |
IlUInt | getWidth () const |
Returns the width in pixels of the image stored in the instance. More... | |
IlBoolean | hasMask () const |
Returns whether the instance has a mask. More... | |
void | lock () |
Locks the current instance. | |
void | setInformation (IlvBitmapInformation *info) |
Sets the bitmap information. More... | |
virtual void | setMask (IlvBWBitmapData *mask) |
Sets the mask of the current instance. More... | |
virtual void | setRGBPixels (IlUChar *data, IlUInt byteWidth, const IlvRect &rect, const IlvPoint &to) |
Sets a region of the image stored in the instance to the given true color representation. More... | |
void | unLock () |
Unlocks the current instance. | |
Bitmap data class.
Library: xviews or winviews or mviews (mutually exclusive)
The IlvBWBitmapData
class lets you manipulate black and white images. The value of each pixel in the image can be either 0
or 1
.
Each pixel uses one bit. One byte stores up to 8 pixels. The internal representation for one byte is MSB.
Constructor.
width | The width of the image. |
height | The height of the image. |
|
virtual |
Returns a true color representation of a pixel located in the image at the x and y coordinates.
x | The x coordinate of the pixel. |
y | The y coordinate of the pixel. |
r | The red component of the pixel. |
g | The green component of the pixel. |
b | The blue component of the pixel. |
Implements IlvBitmapData.
|
virtual |
Returns a true color representation of a region of the image stored in the instance.
Each pixel uses 4 bytes of storage; the first byte is not used, the second byte represents the red component of the pixel color, the third byte represents the green component of the pixel color, and the fourth byte represents the blue component of the pixel color. The array of memory returned has size bytes. If the data parameter is given, this method does not allocate memory and writes the data to data. The array must be deleted by the application.
rect | The region of the image. |
size | The size of the returned data. |
data | 0 or a valid pointer of allocated memory where to store the resulting data. |
Reimplemented from IlvBitmapData.
|
virtual |
Returns the number of referenced colors in the bitmap data.
Implements IlvBitmapData.
Sets the internal representation of a pixel to the given value.
Advanced use only. This method sets directly the internal data. The pixel value can be 0
or 1
.
x | The x position of the pixel. |
y | The y position of the pixel. |
pixel | The index of the pixel. |
|
virtual |
Sets a pixel of the image stored in the instance to the given true color representation.
x | The x position of the pixel. |
y | The y position of the pixel. |
r | The red component of the pixel. |
g | The green component of the pixel. |
b | The blue component of the pixel. |
Implements IlvBitmapData.
© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.