XRender Base Driver

This driver represents a basic driver for all system-dependent drivers implemented in the X-Windows system using the XRender extension. The implementation uses the XRender and Xft API functions.

The main motivation for the use of XRender was transparency for all the primitives. Beyond that we got other features like anti-aliasing, gradient filling and transformations.

This driver still does not completely replace the X-Windows base driver, because XRender does not have support for XOR and for line styles.

So we let the programmer to choose what to use. We created the function cdUseContextPlus that allows to activate or to deactivate the use of X-Render for the available X-Windows based drivers. This function affects only the cdCreateCanvas function call, once created the canvas will be always a XRender canvas. In fact the function affects primary the definitions CD_NATIVEWINDOW, CD_IMAGE and CD_DBUFFER, because they are function calls and not static defines.

Using XRender it is allowed to create more that one canvas at the same time for the same Window. And they can co-exist with a standard X-Windows canvas.

To enable the use of XRender based drivers you must call the initialization function cdInitContextPlus() once and link to the libraries "cdcontextplus", "Xrender" and "Xft". Also the libraries "Xrender" and "Xft" must be installed in your system. The XRender extension must be available in the X-Windows server for the driver to work.

Currently, pre-compiled binaries are available for Linux and BSD. It is not available for the systems we have with AIX, SunOS and IRIX.

In CDLua it is not necessary any additional initialization, but the application must still be linked with the cdcontextplus.lib library or a require"cdluacontextplus" can be used when using dynamic libraries.

Behavior of Functions

Control 

Coordinate System and Clipping

Primitives

Attributes

Colors

Client and Server Images

Exclusive Attributes