Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Bitmap data class. More...
#include <ilviews/bitmaps/data.h>
Public Member Functions | |
IlvRGBBitmapData (IlUInt width, IlUInt height) | |
Constructor. More... | |
void | activateChannels (Channel channels) |
Activates the given channels. More... | |
void | alphaCompose (const IlvRGBBitmapData *src, const IlvRect &srcrect, const IlvPoint &to, IlUChar blend=255) |
Blends from a source bitmap data. More... | |
void | alphaDivide () |
Un-alpha-premultiplies the bitmap data. | |
void | alphaMultiply () |
Alpha-premultiplies the bitmap data. | |
virtual void | blend (const IlvBitmapData *src, const IlvRect &srcrect, const IlvPoint &to, IlUChar blend) |
Blends from a source bitmap data. More... | |
virtual void | copy (const IlvBitmapData *src, const IlvRect &srcrect, const IlvPoint &to) |
Copies all components from a source bitmap data. More... | |
virtual void | copyA (const IlvRGBBitmapData *src, const IlvRect &srcrect, const IlvPoint &to) |
Copies the alpha component from a source bitmap data. More... | |
virtual void | copyRGB (const IlvRGBBitmapData *src, const IlvRect &srcrect, const IlvPoint &to) |
Copies the color component from a source bitmap data. More... | |
void | deactivateChannels (Channel channels) |
Deactivates the given channels. More... | |
void | fastCopyPixel (IlUInt xdst, IlUInt ydst, const IlvRGBBitmapData *src, IlUInt xsrc, IlUInt ysrc) |
Copies a pixel from a source bitmap data. More... | |
void | fastGetARGBPixel (IlUInt x, IlUInt y, IlUChar &a, 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... | |
void | fastGetRGBPixel (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... | |
void | fastSetRGBPixel (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... | |
virtual void | fill (const IlvRect &rect, IlUChar r, IlUChar g, IlUChar b, IlUChar alpha=255) |
Fills the bitmap data with a given color. More... | |
void | fillAlpha (const IlvRect &rect, IlUChar alpha) |
Fills the alpha channel of a given region. More... | |
Channel | getActiveChannels () const |
Returns the active channels. More... | |
IlUChar | getAlpha (IlUInt x, IlUInt y) const |
returns the alpha value of a given pixel. 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... | |
IlBoolean | isAlphaPremultiplied () const |
Return whether the image is alpha-premultiplied. More... | |
void | setAlpha (IlUInt x, IlUInt y, IlUChar alpha) |
Sets the alpha component of a given pixel. More... | |
void | setAlphaPremultiplied (IlBoolean) |
Forces the premultiplied state of the bitmap data. | |
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... | |
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 | stretch (const IlvBitmapData *srcdata, const IlvRect &srcrect, const IlvRect &dstrect) |
Stretches an image. More... | |
void | stretchSmooth (const IlvBitmapData *srcdata, const IlvRect &srcrect, const IlvRect &dstrect, IlvResampleFilter filter=IlvMitchellFilter, IlvResampleFunction func=0, IlFloat support=0) |
Stretches an image using resampling. More... | |
void | tile (IlvBitmapData *src, const IlvPoint &offset) |
Tiles an image. More... | |
void | tileCompose (IlvRGBBitmapData *src, const IlvPoint &offset, IlUChar blend=255) |
Tiles an image. 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 | 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 | copyPixel (IlUInt xdst, IlUInt ydst, const IlvBitmapData *src, IlUInt xsrc, IlUInt ysrc) |
Copies a pixel from another bitmap data. 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... | |
void | unLock () |
Unlocks the current instance. | |
Bitmap data class.
Library: display
The IlvRGBBitmapData
class lets you manipulate true color images. Each pixel in an RGB image is stored using 4 bytes, one for each color component.
IlvIndexedBitmapData
, IlvBWBitmapData
Constructor.
Initializes a new IlvRGBBitmapData
object.
width | The width of the bitmap data. |
height | The height of the bitmap data. |
void IlvRGBBitmapData::activateChannels | ( | Channel | channels | ) |
Activates the given channels.
channels | The channels to activate. |
void IlvRGBBitmapData::alphaCompose | ( | const IlvRGBBitmapData * | src, |
const IlvRect & | srcrect, | ||
const IlvPoint & | to, | ||
IlUChar | blend = 255 |
||
) |
Blends from a source bitmap data.
This method does make use of the alpha components of the source.
src | The source bitmap data. |
srcrect | The source rectangle. |
to | The destination position. |
blend | The blend factor. |
|
virtual |
Blends from a source bitmap data.
This method does not use the alpha components of the source.
src | The source bitmap data. |
srcrect | The source rectangle. |
to | The destination position. |
blend | The blend factor. |
Reimplemented from IlvBitmapData.
|
virtual |
Copies all components from a source bitmap data.
src | The source bitmap data. |
srcrect | The source rectangle. |
to | The destination position. |
Reimplemented from IlvBitmapData.
|
virtual |
Copies the alpha component from a source bitmap data.
src | The source bitmap data. |
srcrect | The source rectangle. |
to | The destination position. |
|
virtual |
Copies the color component from a source bitmap data.
src | The source bitmap data. |
srcrect | The source rectangle. |
to | The destination position. |
void IlvRGBBitmapData::deactivateChannels | ( | Channel | channels | ) |
Deactivates the given channels.
channels | The channels to deactivate. |
void IlvRGBBitmapData::fastCopyPixel | ( | IlUInt | xdst, |
IlUInt | ydst, | ||
const IlvRGBBitmapData * | src, | ||
IlUInt | xsrc, | ||
IlUInt | ysrc | ||
) |
Copies a pixel from a source bitmap data.
xdst | The destination x coordinate. |
ydst | The destination y coordinate. |
src | The source bitmap data. |
xsrc | The source x coordinate. |
ysrc | The source y coordinate. |
void IlvRGBBitmapData::fastGetARGBPixel | ( | IlUInt | x, |
IlUInt | y, | ||
IlUChar & | a, | ||
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.
This method is optimized for speed.
x | The x coordinate of the pixel. |
y | The y coordinate of the pixel. |
a | The alpha component of the pixel. |
g | The green component of the pixel. |
g | The green component of the pixel. |
b | The blue component of the pixel. |
void IlvRGBBitmapData::fastGetRGBPixel | ( | 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.
This method is optimized for speed.
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. |
Sets a pixel of the image stored in the instance to the given true color representation.
This method is optimized for speed.
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. |
|
virtual |
Fills the bitmap data with a given color.
rect | The region to fill. |
r | The red component of the color. |
g | The green component of the color. |
b | The blue component of the color. |
a | The alpha component of the color. |
Reimplemented from IlvBitmapData.
Fills the alpha channel of a given region.
rect | The region to fill. |
alpha | The alpha value to use. |
Channel IlvRGBBitmapData::getActiveChannels | ( | ) | const |
Returns the active channels.
returns the alpha value of a given pixel.
x | The x coordinate of the pixel. |
y | The y coordinate of the pixel. |
|
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 | The preallocated data. |
Reimplemented from IlvBitmapData.
|
virtual |
Returns the number of referenced colors in the bitmap data.
Implements IlvBitmapData.
IlBoolean IlvRGBBitmapData::isAlphaPremultiplied | ( | ) | const |
Return whether the image is alpha-premultiplied.
IlTrue
if the image is alpha-premultiplied. Sets the alpha component of a given pixel.
x | The x coordinate of the pixel. |
y | The y coordinate of the pixel. |
alpha | The new alpha value 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.
|
virtual |
Sets a region of the image stored in the instance to the given true color representation.
The format of the data is the same as the one returned by getRGBPixels
.
data | The true color representation of the source pixels. |
byteWidth | The width in bytes of the source. |
rect | The region of the source data. |
to | The position in the destination image |
Reimplemented from IlvBitmapData.
void IlvRGBBitmapData::stretch | ( | const IlvBitmapData * | srcdata, |
const IlvRect & | srcrect, | ||
const IlvRect & | dstrect | ||
) |
Stretches an image.
srcdata | The bitmap data to stretch. |
srcrect | The source rectangle in the source bitmap data. |
dstrect | The destination rectangle in the destination bitmap data. |
void IlvRGBBitmapData::stretchSmooth | ( | const IlvBitmapData * | srcdata, |
const IlvRect & | srcrect, | ||
const IlvRect & | dstrect, | ||
IlvResampleFilter | filter = IlvMitchellFilter , |
||
IlvResampleFunction | func = 0 , |
||
IlFloat | support = 0 |
||
) |
Stretches an image using resampling.
srcdata | The bitmap data to stretch. |
srcrect | The source rectangle in the source bitmap data. |
dstrect | The destination rectangle in the destination bitmap data. |
filter | The resampling filter to use. |
func | The resampling function. |
support | The resampling function width. |
void IlvRGBBitmapData::tile | ( | IlvBitmapData * | src, |
const IlvPoint & | offset | ||
) |
Tiles an image.
This method does not use the alpha channel of the source.
src | The bitmap data to tile. |
offset | The offset. |
void IlvRGBBitmapData::tileCompose | ( | IlvRGBBitmapData * | src, |
const IlvPoint & | offset, | ||
IlUChar | blend = 255 |
||
) |
Tiles an image.
This method uses the alpha channel of the source.
src | The bitmap data to tile. |
offset | The offset. |
blend | The blend factor. |
© Copyright 2012, 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.