rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvBWBitmapData Class Reference

Bitmap data class. More...

#include <ilviews/bitmaps/data.h>

Inheritance diagram for IlvBWBitmapData:
IlvBitmapData

List of all members.

Public Member Functions

 IlvBWBitmapData (IlUInt width, IlUInt height)
 Constructor.
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.
virtual IlUChargetRGBPixels (const IlvRect &rect, IlUInt &size, IlUChar *data=0) const
 Returns a true color representation of a region of the image stored in the instance.
virtual IlUInt getUsedColorNum ()
 Returns the number of referenced colors in the bitmap data.
void setPixel (IlUInt x, IlUInt y, IlUChar pixel)
 Sets the internal representation of a pixel to the given value.
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.

Detailed Description

Bitmap data class.

Library: display

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.

See also:
IlvIndexedBitmapData, IlvRGBBitmapData, IlvBitmap, IlvQuantizer, IlvQuickQuantizer, IlvWUQuantizer.

Constructor & Destructor Documentation

IlvBWBitmapData::IlvBWBitmapData ( IlUInt  width,
IlUInt  height 
)

Constructor.

Parameters:
width The width of the image.
height The height of the image.

Member Function Documentation

virtual void IlvBWBitmapData::getRGBPixel ( IlUInt  x,
IlUInt  y,
IlUChar r,
IlUChar g,
IlUChar b 
) const [virtual]

Returns a true color representation of a pixel located in the image at the x and y coordinates.

Parameters:
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 IlUChar* IlvBWBitmapData::getRGBPixels ( const IlvRect rect,
IlUInt size,
IlUChar data = 0 
) const [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.

Parameters:
rect The region of the image.
size The size of the returned data.
Returns:
The pointer to the data.

Reimplemented from IlvBitmapData.

virtual IlUInt IlvBWBitmapData::getUsedColorNum (  )  [virtual]

Returns the number of referenced colors in the bitmap data.

Returns:
The number of colors used in the bitmap data.

Implements IlvBitmapData.

void IlvBWBitmapData::setPixel ( IlUInt  x,
IlUInt  y,
IlUChar  pixel 
)

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.

Parameters:
x The x position of the pixel.
y The y position of the pixel.
pixel The index of the pixel.
virtual void IlvBWBitmapData::setRGBPixel ( IlUInt  x,
IlUInt  y,
IlUChar  r,
IlUChar  g,
IlUChar  b 
) [virtual]

Sets a pixel of the image stored in the instance to the given true color representation.

Parameters:
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.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.