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.

To use this driver in Windows using GDI+ is necessary to call cdUseContextPlus(1) before creating the canvas.

Behavior of Functions

This driver is greatly platform-dependent. For further detail, see the Behavior of Functions in each platform: Microsoft Windows (GDI), Windows Using GDI+, X-Windows (XLIB), GDK. However, it should be noted that some functions behave differently from the basic functions of each platform.