CD_IMAGE - Server Image Driver (cdimage.h)

This driver provides access to a Server Image, a memory-based high-performance image that corresponds to the attributes of the system's devices. It is used for offscreen drawings.

Use

The canvas is created by means of a call to function cdCreateCanvas(CD_IMAGE, Data), after which other functions in the CD library can be called as usual. The function creates a CD canvas based on an existing Server Image. The Data parameter must be a pointer to an image created with function  cdCreateImage.

Any amount of such canvases may exist simultaneously. It is important to note that a call to function cdKillCanvas is required to properly end the driver. You can call function cdKillImage only after calling cdKillCanvas.

For use with CDLUA, the Server Image passed as parameter must have been created with function cd.CreateImage in Lua.

Behavior of Functions

This driver is very platform-dependent.

For further detail, see the Behavior of Functions in each base driver: GDI, GDK and X-Win. To use this driver with a context plus base driver is necessary to call cdUseContextPlus(1) before creating the canvas, see the Direct2D,  GDI+Cairo and XRender base drivers.