Main Page   Modules   Class Hierarchy   Compound List   Compound Members  

IpeBitmap Class Reference
[Ipe Base]

A bitmap. More...

List of all members.

Public Methods


Detailed Description

A bitmap.

Bitmaps are explicitely shared using reference-counting. Copying is cheap, so IpeBitmap objects are meant to be passed by value.

The bitmap can cache data to speed up rendering. This data can be set only once (as the bitmap is conceptually immutable).

The bitmap also provides a slot for short-term storage of an "object number". The PDF embedder, for instance, sets it to the PDF object number when embedding the bitmap, and can reuse it when "drawing" the bitmap.


Constructor & Destructor Documentation

IpeBitmap::IpeBitmap  
 

Default constructor constructs null bitmap.

IpeBitmap::IpeBitmap int    width,
int    height,
TColorSpace    colorSpace,
int    bitsPerComponent,
IpeBuffer    data,
TFilter    filter
 

Create a new image.

IpeBitmap::IpeBitmap const IpeXmlAttributes   attr,
IpeString    data,
bool    rawData
 

Create from XML stream.

IpeBitmap::IpeBitmap const IpeBitmap &    rhs
 

Copy constructor.

IpeBitmap::~IpeBitmap  
 

Destructor.


Member Function Documentation

IpeBitmap & IpeBitmap::operator= const IpeBitmap &    rhs
 

Assignment operator (takes care of reference counting).

void IpeBitmap::SaveAsXml IpeStream   stream,
int    id,
int    pdfObjNum = -1
const
 

Save bitmap in XML stream.

bool IpeBitmap::IsNull   [inline]
 

Is this a null bitmap?

IpeBitmap::TColorSpace IpeBitmap::ColorSpace   [inline]
 

Return the color space of the image.

IpeBitmap::TFilter IpeBitmap::Filter   [inline]
 

Return the data filter of the image data.

int IpeBitmap::Components   [inline]
 

Return number of components per pixel.

int IpeBitmap::BitsPerComponent   [inline]
 

Return the number of bits per component.

int IpeBitmap::Width   [inline]
 

Return width of pixel array.

int IpeBitmap::Height   [inline]
 

Return height of pixel array.

const char * IpeBitmap::Data   [inline]
 

Return a pointer to the image data (in PDF arrangement).

int IpeBitmap::Size   [inline]
 

Return size (number of bytes) of image data (in PDF arrangement).

int IpeBitmap::ObjNum   [inline]
 

Return object number of the bitmap.

void IpeBitmap::SetObjNum int    objNum const [inline]
 

Set object number of the bitmap.

void * IpeBitmap::RenderData   [inline]
 

Return cached bitmap for rendering.

void IpeBitmap::SetRenderData void *    data const
 

Set a cached bitmap for fast rendering.

bool IpeBitmap::operator== const IpeBitmap &    rhs const [inline]
 

Two bitmaps are equal if they share the same data.

bool IpeBitmap::operator!= const IpeBitmap &    rhs const [inline]
 

Two bitmaps are equal if they share the same data.

bool IpeBitmap::operator< const IpeBitmap &    rhs const [inline]
 

Less operator, to be able to sort bitmaps.

The checksum is used, when it is equal, the shared address. This guarantees that bitmaps that are == (share their implementation) are next to each other, and block of them are next to blocks that are identical in contents.


The documentation for this class was generated from the following files: