diff options
author | scuri <scuri> | 2010-05-21 04:51:07 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-05-21 04:51:07 +0000 |
commit | cc487d4de29a48d8e20a9a8492957a5950d5c181 (patch) | |
tree | ed854e4264ab307be3bd37419359bd48a39f776e /html/en/drv/cairo.html | |
parent | 2aec4aa2e0451fd1257fd562a58e29635f979521 (diff) |
*** empty log message ***
Diffstat (limited to 'html/en/drv/cairo.html')
-rw-r--r-- | html/en/drv/cairo.html | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/html/en/drv/cairo.html b/html/en/drv/cairo.html index 4977258..c0ad80f 100644 --- a/html/en/drv/cairo.html +++ b/html/en/drv/cairo.html @@ -6,6 +6,11 @@ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>CAIRO</title> <link rel="stylesheet" type="text/css" href="../../style.css"> +<style type="text/css"> +.style1 { + font-family: Courier; +} +</style> </head> <body> @@ -15,8 +20,9 @@ <p>This driver represents a basic driver for all system-dependent drivers implemented in the X-Windows and MS-Windows systems. The implementation uses the <a href="http://library.gnome.org/devel/pango/">Cairo</a> API - functions and some GTK functions to support Unicode text. This driver can be - compiled and used in all systems Cairo is supported.</p> + functions and Pango functions to support Unicode text. This driver can be + compiled and used in all systems Cairo is supported. The drivers <b>Native Window</b>, + <b>Image</b>, <b>Printer</b> and <b>Double Buffer</b> were implemented.</p> <p>The main motivation for the use of Cairo was transparency for all the primitives. Beyond that we got other features like anti-aliasing, gradient filling, transformations and back-ends (support to rendering: PDF, PS, SVG and @@ -24,6 +30,25 @@ PNG surfaces).</p> <p>This driver still does not completely replace the X-Windows and GDI Windows base drivers, because Cairo does not have support for bitwise XOR operations and for complex clipping regions.</p> + <p>So we let the programmer to choose what to use. We created the function <font face="Courier"><strong> + cdUseContextPlus</strong></font> that allows to activate or to deactivate the use of + Cairo for the available GDK, Win32 or X-Windows based drivers. + This function affects only the <font face="Courier"><strong>cdCreateCanvas</strong></font> function call, once created + the canvas will be always a Cairo canvas. In fact the function affects primary the definitions + <font face="Courier"><strong>CD_NATIVEWINDOW</strong></font>, + <strong><span style="font-family: Courier">CD_IMAGE</span></strong> and <strong> + <span style="font-family: Courier">CD_DBUFFER</span></strong>, because they are + function calls and not static defines.</p> + <p>Using Cairo 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 GD, Win32 or X-Windows canvas.</p> + <p>To enable the use of Cairo based drivers you must call the initialization function <font face="Courier"><strong> + cdInitContextPlus()</strong></font> once and link to the libraries "<strong>cdcairo</strong>" and "<strong>cairo</strong>". + When using the GDK base driver you do not need to link with the "<strong>cdcairo</strong>" + library. Also the Cairo library must be installed in your system.</p> + <p>In CDLua it is not necessary any additional initialization, but the + application must still be linked with the <strong>cdcontextplus.lib</strong> + library or a <strong>require"cdluacontextplus"</strong> can be used when + using dynamic libraries.</p> <h3>Behavior of Functions</h3> <h4>Control </h4> @@ -39,6 +64,13 @@ for complex clipping regions.</p> <font face="Courier"><strong>UpdateYAxis</strong></font></a>: the orientation of axis Y is the opposite to its orientation in the CD library.</li> </ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt>CD_PATH</tt></strong> + is supported.</li> + <li>Floating point primitives are supported.</li> +</ul> <h4>Attributes </h4> <ul> <li> @@ -104,6 +136,12 @@ for complex clipping regions.</p> </ul> <ul> + <li>"<span class="style1"><strong>PATTERNIMAGE</strong></span>": defines + a filled interior style using a server image as pattern. Data must be a server + image handle created with he Cairo base driver.</li> +</ul> + +<ul> <li>"<b><font face="Courier">POLYHOLE</font></b>": defines the index of the vertex where there is a hole in a closed polygon. It will affect the next <strong>cdEnd</strong>. Can be called several times between <strong>cdBegin</strong> |