CCB * CloneCel (CCB *src, int32 options)
The options parameter is one or more of the following values, ORed together as necessary: CLONECEL_CCB_ONLY, CLONECEL_COPY_PIXELS, CLONECEL_COPY_PLUT.
When COPY_PIXELS is specified, a new cel data buffer is allocated, and the pixels in the source (src) cel's buffer are copied to the new buffer.
When COPY_PIXELS is not specified, the new cels ccb_SourcePtr field points to the source cel's data buffer.
When COPY_PLUT is specified, a new PLUT is allocated, and the values from the src cel's PLUT are copied to the new PLUT.
When COPY_PLUT is not specified, the new cels ccb_PLUTPtr field points to the source cel's PLUT. If the cel is uncoded, the COPY_PLUT option has no effect.
You may change any of the values in the CCB fields of the newly created cel. Be careful about changing preamble words when the CCB_CCBPRE flag is not set and the CLONECEL_COPY_PIXELS option was not used. In that situation, the preamble words you change would be those belonging to the original cel, not the copy.
Use DeleteCel()
to release all resources allocated for the clone.
CreateCel
, DeleteCel