CD - Canvas Draw

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 is a pointer to an image created with function  cdCreateImage (cdImage*).

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 cdCreateImage or cdCreateImageEx in Lua.


Behavior of Functions

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