CCB * CreateCel (int32 width, int32 height, int32 bitsPerPixel,
int32 options, void *dataBuf)
If you pass a NULL dataBuf pointer, an appropriately-sized buffer is allocated when the cel is created. If you pass a non-NULL dataBuf pointer, it is stored into the ccb_SourcePtr field instead of allocating a buffer internally.
The options parameter is one or more of the following values, ORed together as necessary:
CREATECEL_CODED-Create a coded cel. bitsPerPixel must be <= 8.
CREATECEL_UNCODED-Create an uncoded cel. bitsPerPixel must be 8 or 16.
If bitsPerPixel is less than 8, a PLUT is always allocated when the cel is created. If bitsPerPixel is 8 or 16, a PLUT is allocated only if the CREATECEL_CODED option is set. If a PLUT is allocated all its entries are initialized to zero.
The cel is created with a position of 0,0 and size and perspective values for a 1:1 mapping. The Preamble Word 1 Blue LSB handling is set to PRE1_TLLSB_PDC0. The PIXC word is set for standard opaque, 0x1F001F00. The cel flags are set to: CCB_LAST | CCB_NPABS | CCB_SPABS | CCB_PPABS | CCB_LDSIZE | CCB_LDPRS | CCB_LDPPMP | CCB_CCBPRE | CCB_YOXY | CCB_USEAV | CCB_NOBLK | CCB_ACE | CCB_ACW | CCB_ACCW
Use DeleteCel()
to release all resources allocated for the
cel. The cel data buffer and PLUT are released only if they were allocated
by CreateCel()
. If you provided your own dataBuf pointer, you
must free the buffer yourself.
CreateBackdropCel
, DeleteCel