Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

IMG_PixmapRGBA32 Class Reference

Pixmap of kPixelTypeRGBA32 type. More...

#include <IMG_PixmapRGBA32.h>

Inheritance diagram for IMG_PixmapRGBA32:

IMG_Pixmap IMG_BrushRGBA32 IMG_CanvasRGBA32 List of all members.

Public Types

typedef TUns32 TPixelRGBA32
 The pixel type in this pixmap.

typedef TPixelRGBA32TPixelPtr
 The pixel pointer type of this pixmap.


Public Methods

 IMG_PixmapRGBA32 (TUns32 width,TUns32 height)
 Constructor. More...

 IMG_PixmapRGBA32 (void *image,TUns32 width,TUns32 height,TUns32 rowBytes)
 Constructor. More...

virtual void fillRect (const IMG_Rect &r,const IMG_ColorRGB &c)
 Fills the rectangle given with the color given. More...

virtual void fillRect (const IMG_Rect &r,const IMG_ColorRGBA &c)
 Fills the rectangle given with the color given. More...

virtual void setPixmap (const IMG_PixmapRGBA32 &src,const IMG_Rect &srcBnds,const IMG_Rect &destBnds)
 Pastes an area of a pixmap into this pixmap. More...

virtual void blendPixmap (const IMG_PixmapRGBA32 &src,const IMG_Rect &srcBnds,const IMG_Rect &destBnds)
 Blends an area of a pixmap into this pixmap. More...


Public Attributes

IMG_MemPtr<TPixelRGBA32m_mem
 "Save" memory pointer.


Protected Methods

TPixelPtr getPixelPtr (TUns32 x,TUns32 y)const
 Returns pointer to the pixel. More...

TPixelRGBA32 getPixelValue (const IMG_ColorRGBA &c)const
 Returns the pixel value of a color. More...

void getColor (TPixelRGBA32 p,IMG_ColorRGBA &c)const
 Returns the color of from a pixel value. More...


Detailed Description

Pixmap of kPixelTypeRGBA32 type.

A pixmap with 24 bits per pixel in ABGR format. Provides methods to fill rectangular areas in this image with a color. Provides methods to paste or blend other pixmaps into this pixmap.

Author(s):
Maarten Gribnau
Date:
March 6, 2001


Constructor & Destructor Documentation

IMG_PixmapRGBA32::IMG_PixmapRGBA32 ( TUns32 width,
TUns32 height )
 

Constructor.

Creates a new pixmap of the kPixelTypeRGBA32 type with the requested dimensions.

Exceptions:
IMG_MemPtr::Size   > when an invalid width and/or height is passed.
IMG_MemPtr::Memory   > when a there is not enough memory to allocate the image.
Parameters:
width   the width in pixels of the image.
height   the height in pixels of the image.

IMG_PixmapRGBA32::IMG_PixmapRGBA32 ( void * image,
TUns32 width,
TUns32 height,
TUns32 rowBytes )
 

Constructor.

Creates a new pixmap of the kPixelTypeRGBA32 from a pointer to image data. The image data will not be freed upon destruction of this object. The owner of this object is reponsible for that.

Exceptions:
Size   > when an invalid width and/or height is passed.
Parameters:
image   pointer to the image data.
width   the width in pixels of the image.
height   the height in pixels of the image.


Member Function Documentation

void IMG_PixmapRGBA32::blendPixmap ( const IMG_PixmapRGBA32 & src,
const IMG_Rect & srcBnds,
const IMG_Rect & destBnds ) [virtual]
 

Blends an area of a pixmap into this pixmap.

Blends an area of the given pixmap centered at the given coordinates into this pixmap. The alpha information in the given image is used to blend. Performs a bounds check.

Parameters:
src   the pixmap to paste.
srcBnds   the bounds of the area of the pixmap to paste.
destBnds   the destination area for the paste.

void IMG_PixmapRGBA32::fillRect ( const IMG_Rect & r,
const IMG_ColorRGBA & c ) [virtual]
 

Fills the rectangle given with the color given.

Sets the alpha values from the color. Performs a bounds check.

Parameters:
r   requested bounds rectangle in the image
c   color to use

void IMG_PixmapRGBA32::fillRect ( const IMG_Rect & r,
const IMG_ColorRGB & c ) [virtual]
 

Fills the rectangle given with the color given.

Retains the alpha values. Performs a bounds check.

Parameters:
r   requested bounds rectangle in the image
c   color to use

void IMG_PixmapRGBA32::getColor ( TPixelRGBA32 p,
IMG_ColorRGBA & c ) const [inline, protected]
 

Returns the color of from a pixel value.

Parameters:
p   the pixel value
c   the color calculated

IMG_PixmapRGBA32::TPixelPtr IMG_PixmapRGBA32::getPixelPtr ( TUns32 x,
TUns32 y ) const [inline, protected]
 

Returns pointer to the pixel.

Returns a pointer of TPixelPtr type to the pixel at the requested coordinates. Does not perform a bounds check!

Parameters:
x   column address of the pixel.
y   row address of the pixel.
Returns:
the pointer calculated.

IMG_PixmapRGBA32::TPixelRGBA32 IMG_PixmapRGBA32::getPixelValue ( const IMG_ColorRGBA & c ) const [inline, protected]
 

Returns the pixel value of a color.

Parameters:
c   the color to convert
Returns:
the pixel value calculated

void IMG_PixmapRGBA32::setPixmap ( const IMG_PixmapRGBA32 & src,
const IMG_Rect & srcBnds,
const IMG_Rect & destBnds ) [virtual]
 

Pastes an area of a pixmap into this pixmap.

Pastes an area of the given pixmap centered at the given coordinates into this pixmap. Ignores the alpha information, this is pasted as well. Performs a bounds check.

Parameters:
src   the pixmap to paste.
srcBnds   the bounds of the area of the pixmap to paste.
destBnds   the destination area for the paste.


The documentation for this class was generated from the following files:
Generated at Thu May 3 17:29:38 2001 for ImgLib by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000