CCB * CreateLRFormCel (CCB *cel, Item screenItem, SRect *subRect)
If the cel pointer is NULL, a new cel is allocated for you. If non-NULL it must be an LRForm cel created by an earlier call to this function. Passing a non-NULL cel pointer allows you to repeatedly extract different subrectangles from the same screen without having to create a new cel each time.
If the subRect pointer is NULL, the cel is the same size as the source screen. If it is non-NULL, the cel accesses the sub-rectangle of pixels described by subRect.
You cannot pass a Bitmap item in place of the Screen item because the GetPixelAddress()
function used to locate the pixels in the screen does not accept a Bitmap item.
The cel created by this function uses the pixels in the screen's bitmap buffer as the cel source pixels. The pixels are not copied, and if you render new pixels into the screen, subsequent projections of the cel use the new pixels.
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 | CCB_BGND | PMODE_ONE
Use DeleteCel()
to release the resources allocated for the cel.
CreateSubrectCel
, DeleteCel