Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Bitmap Class Reference

Manages a platform native bitmap/pixmap format.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_Bitmap (PixMapHandle inPixMap, bool inOwnsPixmap=false)
virtual ~CP_Bitmap ()
 Destructor.
Getters
SInt16 GetColorDepth ()
CP_PaletteGetPalette ()
SInt32 GetRowBytes ()
char * GetPixelsPtr ()
CP_RGBColor GetPixelColor (SInt16 inCol, SInt16 inRow)
SInt16 Width ()
SInt16 Height ()
SInt16 GetNumberBitPlanes ()
SInt16 GetPixelSize ()
PixMapHandle GetPixMapHandle ()
Lockers
void Lock ()
void Unlock ()
Setters
void SetPixel (SInt16 inCol, SInt16 inRow, SInt16 inPaletteIndex)
void SetPixel (SInt16 inCol, SInt16 inRow, SInt32 inColor)
void SetPixelColor (SInt16 inCol, SInt16 inRow, CP_RGBColor &inColor)
void SetPalette (CP_Palette *inPalette)

Protected Attributes

CP_PalettefBitmapPalette
bool fOwnsPixmap
PixMapHandle fPixMap


Constructor & Destructor Documentation

CP_Bitmap::CP_Bitmap PixMapHandle  inPixMap,
bool  inOwnsPixmap = false
 

MacOS - Constructor. This will construct the bitmap from the passed in MacOS PixMap.

Parameters:
inPixMap The PixMapHandle to associate with this bitmap object.
inOwnsPixmap If true, this object is responsible for the disposal of the pixmap.
Exceptions:
none 

CPLAT_Begin_Namespace_CPLAT CP_Bitmap::~CP_Bitmap  )  [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

SInt16 CP_Bitmap::GetColorDepth  ) 
 

Returns the color depth of the bitmap.

Exceptions:
none 
Returns:
SInt16 The color depth of the bitmap.

CP_Palette * CP_Bitmap::GetPalette  ) 
 

Returns any palette associated with this bitmap.

Exceptions:
none 
Returns:
CP_Palette * The palette if any, associated with this bitmap.

SInt32 CP_Bitmap::GetRowBytes  ) 
 

Returns the number of row bytes of the bitmap.

Exceptions:
none 
Returns:
SInt32 The rowbytes of the bitmap.

char * CP_Bitmap::GetPixelsPtr  ) 
 

Returns a pointer to the first bit of the image data.

Exceptions:
none 
Returns:
char * The first bit of the image data.

CP_RGBColor CP_Bitmap::GetPixelColor SInt16  inCol,
SInt16  inRow
 

Returns the color of the pixel as the passed in row and column coordinates.

Parameters:
inCol The column we are after.
inRow The row we are after.
Exceptions:
none 
Returns:
CP_RGBColor The color fo the bit at the passed in coordinates.

SInt16 CP_Bitmap::Width  ) 
 

The width of the bitmap.

Exceptions:
none 
Returns:
SInt16 The width of the bitmap.

SInt16 CP_Bitmap::Height  ) 
 

The height of the bitmap.

Exceptions:
none 
Returns:
SInt16 The height of the bitmap.

SInt16 CP_Bitmap::GetNumberBitPlanes  ) 
 

Returns the number of bit planes that make up th bitmap.

Exceptions:
none 
Returns:
SInt16 The number of bit planes of the bitmap.

SInt16 CP_Bitmap::GetPixelSize  ) 
 

Returns the number of bits in a color component.

Exceptions:
none 
Returns:
SInt16 The numbe rof bits in a color component.

PixMapHandle CP_Bitmap::GetPixMapHandle  ) 
 

Returns the MacOS pix map that is used to represent this object.

Exceptions:
none 
Returns:
PixMapHandle MacOS PixMapHandle for this bitmap.

void CP_Bitmap::Lock  ) 
 

Locks the bitmap for direct pixel access. If the underlying OS doesn't require this, then nothing is done.

Exceptions:
none 
Returns:
void

void CP_Bitmap::Unlock  ) 
 

Unlocks the bitmap. If the underlying OS doesn't require this, then nothing is done. This call must be preceded by a Lock() call.

Exceptions:
none 
Returns:
void

void CP_Bitmap::SetPixel SInt16  inCol,
SInt16  inRow,
SInt16  inColor
 

Sets the color of the pixel at the passed in coordinates.

Parameters:
inCol The column to of the pixel to set.
inRow The row to of the pixel to set.
inColor An SInt16 representing the actual color value.
Exceptions:
none 
Returns:
void

void CP_Bitmap::SetPixel SInt16  inCol,
SInt16  inRow,
SInt32  inPaletteIndex
 

Sets the color of the pixel at the passed in coordinates.

Parameters:
inCol The column to of the pixel to set.
inRow The row to of the pixel to set.
inPaletteIndex The index of the color of the palette associated with this bitmap. This is used for a bit depth of 8 or less.
Exceptions:
none 
Returns:
void

void CP_Bitmap::SetPixelColor SInt16  inCol,
SInt16  inRow,
CP_RGBColor inColor
 

Sets the color of the pixel at the passed in coordinates using a CP_RGBColor.

Parameters:
inCol The column to of the pixel to set.
inRow The row to of the pixel to set.
inColor A CP_RGBColor for the pixel to be set.
Exceptions:
none 
Returns:
void

void CP_Bitmap::SetPalette CP_Palette inPalette  ) 
 

Sets the palette associated with this bitmap. Note: palettes are only used if the bit depth is 8 or less.

Parameters:
inPalette The palette to associate with this bitmap.
Exceptions:
none 
Returns:
void


Member Data Documentation

CP_Palette* CP_Bitmap::fBitmapPalette [protected]
 

bool CP_Bitmap::fOwnsPixmap [protected]
 

Palette used to represent the colors of this bitmap.

PixMapHandle CP_Bitmap::fPixMap [protected]
 

Flag to indicate if this object owns the underlying OS bitmap/pixmap.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:34 2005 for CPLAT_MacOS by  doxygen 1.4.0