diff options
Diffstat (limited to 'doc/public')
38 files changed, 882 insertions, 676 deletions
diff --git a/doc/public/Makefile.in b/doc/public/Makefile.in index 3f46fb1..b68c747 100644 --- a/doc/public/Makefile.in +++ b/doc/public/Makefile.in @@ -505,6 +505,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mesa_DIR = @mesa_DIR@ mkdir_p = @mkdir_p@ @@ -731,12 +732,13 @@ cairo_drm_headers = cairo-drm.h cairo_drm_private = drm/cairo-drm-private.h \ drm/cairo-drm-ioctl-private.h \ drm/cairo-drm-intel-private.h \ - drm/cairo-drm-intel-ioctl-private.h \ - drm/cairo-drm-i915-private.h \ - drm/cairo-drm-i965-private.h \ drm/cairo-drm-intel-brw-defines.h \ drm/cairo-drm-intel-brw-structs.h \ drm/cairo-drm-intel-brw-eu.h \ + drm/cairo-drm-intel-command-private.h \ + drm/cairo-drm-intel-ioctl-private.h \ + drm/cairo-drm-i915-private.h \ + drm/cairo-drm-i965-private.h \ drm/cairo-drm-radeon-private.h cairo_drm_sources = drm/cairo-drm.c \ diff --git a/doc/public/cairo-docs.xml b/doc/public/cairo-docs.xml index 2351f47..c2ffead 100644 --- a/doc/public/cairo-docs.xml +++ b/doc/public/cairo-docs.xml @@ -36,6 +36,7 @@ <xi:include href="xml/cairo-pdf.xml"/> <xi:include href="xml/cairo-png.xml"/> <xi:include href="xml/cairo-ps.xml"/> + <xi:include href="xml/cairo-recording.xml"/> <xi:include href="xml/cairo-win32.xml"/> <!--xi:include href="xml/cairo-beos.xml"/--> <xi:include href="xml/cairo-svg.xml"/> diff --git a/doc/public/cairo-sections.txt b/doc/public/cairo-sections.txt index 8757366..88debec 100644 --- a/doc/public/cairo-sections.txt +++ b/doc/public/cairo-sections.txt @@ -102,6 +102,13 @@ cairo_ps_surface_dsc_comment </SECTION> <SECTION> +<FILE>cairo-recording</FILE> +CAIRO_HAS_RECORDING_SURFACE +cairo_recording_surface_create +cairo_recording_surface_ink_extents +</SECTION> + +<SECTION> <FILE>cairo-win32</FILE> CAIRO_HAS_WIN32_SURFACE cairo_win32_surface_create diff --git a/doc/public/html/cairo-FreeType-Fonts.html b/doc/public/html/cairo-FreeType-Fonts.html index 4f37859..186f988 100644 --- a/doc/public/html/cairo-FreeType-Fonts.html +++ b/doc/public/html/cairo-FreeType-Fonts.html @@ -103,35 +103,18 @@ the FreeType face object to the <a class="link" href="cairo-cairo-font-face-t.ht </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">cairo_user_data_key_t</span><span class="normal"> key</span><span class="symbol">;</span> - -<span class="normal">font_face </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-ft-face">cairo_ft_font_face_create_for_ft_face</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">ft_face</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span> -<span class="normal">status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html#cairo-font-face-set-user-data">cairo_font_face_set_user_data</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">font_face</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">key</span><span class="symbol">,</span> -<span class="normal"> ft_face</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/cairo/cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a></span><span class="symbol">)</span><span class="normal"> FT_Done_Face</span><span class="symbol">);</span> -<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">status</span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html#cairo-font-face-destroy">cairo_font_face_destroy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">font_face</span><span class="symbol">);</span> -<span class="normal"> </span><span class="function">FT_Done_Face</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">ft_face</span><span class="symbol">);</span> -<span class="normal"> </span><span class="keyword">return</span><span class="normal"> ERROR</span><span class="symbol">;</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> +<div class="informalexample"><pre class="programlisting"> +static const cairo_user_data_key_t key; +font_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0); +status = cairo_font_face_set_user_data (font_face, &key, + ft_face, (cairo_destroy_func_t) FT_Done_Face); +if (status) { + cairo_font_face_destroy (font_face); + FT_Done_Face (ft_face); + return ERROR; +} +</pre></div> <p> </p> <div class="variablelist"><table border="0"> diff --git a/doc/public/html/cairo-Image-Surfaces.html b/doc/public/html/cairo-Image-Surfaces.html index 5120a97..0de66a3 100644 --- a/doc/public/html/cairo-Image-Surfaces.html +++ b/doc/public/html/cairo-Image-Surfaces.html @@ -160,33 +160,17 @@ within cairo. Typical usage will be of the form: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="type">int</span><span class="normal"> stride</span><span class="symbol">;</span> -<span class="type">unsigned</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">data</span><span class="symbol">;</span> -<span class="symbol"><</span><span class="usertype">a</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"link"</span><span class="normal"> href</span><span class="symbol">=</span><span class="string">"cairo-cairo-surface-t.html#cairo-surface-t"</span><span class="normal"> title</span><span class="symbol">=</span><span class="string">"cairo_surface_t"</span><span class="symbol">></span><span class="usertype">cairo_surface_t</a></span><span class="normal"> </span><span class="symbol">*</span><span class="normal">surface</span><span class="symbol">;</span> - -<span class="normal">stride </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-format-stride-for-width">cairo_format_stride_for_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">format</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">);</span> -<span class="normal">data </span><span class="symbol">=</span><span class="normal"> </span><span class="function">malloc</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stride </span><span class="symbol">*</span><span class="normal"> height</span><span class="symbol">);</span> -<span class="normal">surface </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-create-for-data">cairo_image_surface_create_for_data</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">,</span><span class="normal"> format</span><span class="symbol">,</span> -<span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">,</span> -<span class="normal"> stride</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> +<div class="informalexample"><pre class="programlisting"> +int stride; +unsigned char *data; +<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface; +stride = cairo_format_stride_for_width (format, width); +data = malloc (stride * height); +surface = cairo_image_surface_create_for_data (data, format, + width, height, + stride); +</pre></div> <p> </p> <div class="variablelist"><table border="0"> diff --git a/doc/public/html/cairo-Paths.html b/doc/public/html/cairo-Paths.html index d2bcd26..8c8ee8a 100644 --- a/doc/public/html/cairo-Paths.html +++ b/doc/public/html/cairo-Paths.html @@ -201,67 +201,34 @@ Here is sample code for iterating through a <a class="link" href="cairo-Paths.ht </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="type">int</span><span class="normal"> i</span><span class="symbol">;</span> -<span class="usertype">cairo_path_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">path</span><span class="symbol">;</span> -<span class="usertype">cairo_path_data_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">data</span><span class="symbol">;</span> -<span class="normal"> </span> -<span class="normal">path </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-copy-path">cairo_copy_path</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="normal"> </span> -<span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">i</span><span class="symbol">=</span><span class="number">0</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol"><</span><span class="normal"> path</span><span class="symbol">-></span><span class="normal">num_data</span><span class="symbol">;</span><span class="normal"> i </span><span class="symbol">+=</span><span class="normal"> path</span><span class="symbol">-></span><span class="normal">data</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">].</span><span class="normal">header</span><span class="symbol">.</span><span class="normal">length</span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> data </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">path</span><span class="symbol">-></span><span class="normal">data</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">];</span> -<span class="normal"> </span><span class="keyword">switch</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">-></span><span class="normal">header</span><span class="symbol">.</span><span class="normal">type</span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="keyword">case</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#CAIRO-PATH-MOVE-TO:CAPS">CAIRO_PATH_MOVE_TO</a></span><span class="symbol">:</span> -<span class="normal"> </span><span class="function">do_move_to_things</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">);</span> -<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span> -<span class="normal"> </span><span class="keyword">case</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#CAIRO-PATH-LINE-TO:CAPS">CAIRO_PATH_LINE_TO</a></span><span class="symbol">:</span> -<span class="normal"> </span><span class="function">do_line_to_things</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">);</span> -<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span> -<span class="normal"> </span><span class="keyword">case</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#CAIRO-PATH-CURVE-TO:CAPS">CAIRO_PATH_CURVE_TO</a></span><span class="symbol">:</span> -<span class="normal"> </span><span class="function">do_curve_to_things</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> data</span><span class="symbol">[</span><span class="number">1</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span> -<span class="normal"> data</span><span class="symbol">[</span><span class="number">2</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> data</span><span class="symbol">[</span><span class="number">2</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span> -<span class="normal"> data</span><span class="symbol">[</span><span class="number">3</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> data</span><span class="symbol">[</span><span class="number">3</span><span class="symbol">].</span><span class="normal">point</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">);</span> -<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span> -<span class="normal"> </span><span class="keyword">case</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#CAIRO-PATH-CLOSE-PATH:CAPS">CAIRO_PATH_CLOSE_PATH</a></span><span class="symbol">:</span> -<span class="normal"> </span><span class="function">do_close_path_things</span><span class="normal"> </span><span class="symbol">();</span> -<span class="normal"> </span><span class="keyword">break</span><span class="symbol">;</span> -<span class="normal"> </span><span class="cbracket">}</span> -<span class="cbracket">}</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-path-destroy">cairo_path_destroy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> + int i; + cairo_path_t *path; + cairo_path_data_t *data; + + path = cairo_copy_path (cr); + + for (i=0; i < path->num_data; i += path->data[i].header.length) { + data = &path->data[i]; + switch (data->header.type) { + case CAIRO_PATH_MOVE_TO: + do_move_to_things (data[1].point.x, data[1].point.y); + break; + case CAIRO_PATH_LINE_TO: + do_line_to_things (data[1].point.x, data[1].point.y); + break; + case CAIRO_PATH_CURVE_TO: + do_curve_to_things (data[1].point.x, data[1].point.y, + data[2].point.x, data[2].point.y, + data[3].point.x, data[3].point.y); + break; + case CAIRO_PATH_CLOSE_PATH: + do_close_path_things (); + break; + } + } + cairo_path_destroy (path); +</pre></div> <p> </p> <p> @@ -681,25 +648,13 @@ in the box given by <em class="parameter"><code>x</code></em>, <em class="parame </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-save">cairo_save</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-translate">cairo_translate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> x </span><span class="symbol">+</span><span class="normal"> width </span><span class="symbol">/</span><span class="normal"> </span><span class="number">2</span><span class="symbol">.,</span><span class="normal"> y </span><span class="symbol">+</span><span class="normal"> height </span><span class="symbol">/</span><span class="normal"> </span><span class="number">2</span><span class="symbol">.);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-scale">cairo_scale</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> width </span><span class="symbol">/</span><span class="normal"> </span><span class="number">2</span><span class="symbol">.,</span><span class="normal"> height </span><span class="symbol">/</span><span class="normal"> </span><span class="number">2</span><span class="symbol">.);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-arc">cairo_arc</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">.,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">.,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">.,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">.,</span><span class="normal"> </span><span class="number">2</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> M_PI</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-restore">cairo_restore</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +cairo_save (cr); +cairo_translate (cr, x + width / 2., y + height / 2.); +cairo_scale (cr, width / 2., height / 2.); +cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI); +cairo_restore (cr); +</pre></div> <p> </p> <div class="variablelist"><table border="0"> @@ -938,25 +893,13 @@ path at position (<em class="parameter"><code>x</code></em>, <em class="paramete <p> This function is logically equivalent to: </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-rel-line-to">cairo_rel_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-rel-line-to">cairo_rel_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-rel-line-to">cairo_rel_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-close-path">cairo_close_path</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +cairo_move_to (cr, x, y); +cairo_rel_line_to (cr, width, 0); +cairo_rel_line_to (cr, 0, height); +cairo_rel_line_to (cr, -width, 0); +cairo_close_path (cr); +</pre></div> <p> </p> <div class="variablelist"><table border="0"> diff --git a/doc/public/html/cairo-PostScript-Surfaces.html b/doc/public/html/cairo-PostScript-Surfaces.html index 18ff361..630f66a 100644 --- a/doc/public/html/cairo-PostScript-Surfaces.html +++ b/doc/public/html/cairo-PostScript-Surfaces.html @@ -7,7 +7,7 @@ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library"> <link rel="up" href="cairo-surfaces.html" title="Surfaces"> <link rel="prev" href="cairo-PNG-Support.html" title="PNG Support"> -<link rel="next" href="cairo-Win32-Surfaces.html" title="Win32 Surfaces"> +<link rel="next" href="cairo-Recording-Surfaces.html" title="Recording Surfaces"> <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> @@ -18,7 +18,7 @@ <td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> <th width="100%" align="center">Cairo: A Vector Graphics Library</th> -<td><a accesskey="n" href="cairo-Win32-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> +<td><a accesskey="n" href="cairo-Recording-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> <tr><td colspan="5" class="shortcuts"> <a href="#cairo-PostScript-Surfaces.synopsis" class="shortcut">Top</a> @@ -545,51 +545,26 @@ Here is an example sequence showing how this function might be used: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="symbol"><</span><span class="usertype">a</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"link"</span><span class="normal"> href</span><span class="symbol">=</span><span class="string">"cairo-cairo-surface-t.html#cairo-surface-t"</span><span class="normal"> title</span><span class="symbol">=</span><span class="string">"cairo_surface_t"</span><span class="symbol">></span><span class="usertype">cairo_surface_t</a></span><span class="normal"> </span><span class="symbol">*</span><span class="normal">surface </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-create">cairo_ps_surface_create</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">filename</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">);</span> -<span class="symbol">...</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%Title: My excellent document"</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%Copyright: Copyright (C) 2006 Cairo Lover"</span><span class="symbol">)</span> -<span class="symbol">...</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-setup">cairo_ps_surface_dsc_begin_setup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%IncludeFeature: *MediaColor White"</span><span class="symbol">);</span> -<span class="symbol">...</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-page-setup">cairo_ps_surface_dsc_begin_page_setup</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%IncludeFeature: *PageSize A3"</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%IncludeFeature: *InputSlot LargeCapacity"</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%IncludeFeature: *MediaType Glossy"</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%IncludeFeature: *MediaColor Blue"</span><span class="symbol">);</span> -<span class="symbol">...</span><span class="normal"> draw to first </span><span class="usertype">page</span><span class="normal"> here </span><span class="symbol">..</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-show-page">cairo_show_page</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="symbol">...</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment">cairo_ps_surface_dsc_comment</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"%%IncludeFeature: *PageSize A5"</span><span class="symbol">);</span> -<span class="symbol">...</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a> *surface = cairo_ps_surface_create (filename, width, height); +... +cairo_ps_surface_dsc_comment (surface, "%%Title: My excellent document"); +cairo_ps_surface_dsc_comment (surface, "%%Copyright: Copyright (C) 2006 Cairo Lover") +... +cairo_ps_surface_dsc_begin_setup (surface); +cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaColor White"); +... +cairo_ps_surface_dsc_begin_page_setup (surface); +cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A3"); +cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *InputSlot LargeCapacity"); +cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaType Glossy"); +cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaColor Blue"); +... draw to first page here .. +cairo_show_page (cr); +... +cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A5"); +... +</pre></div> <p> </p> <div class="variablelist"><table border="0"> diff --git a/doc/public/html/cairo-Quartz-(CGFont)-Fonts.html b/doc/public/html/cairo-Quartz-(CGFont)-Fonts.html index 3d2fc0b..c8f0b80 100644 --- a/doc/public/html/cairo-Quartz-(CGFont)-Fonts.html +++ b/doc/public/html/cairo-Quartz-(CGFont)-Fonts.html @@ -56,8 +56,7 @@ implementation of the font backend methods. <a name="cairo-Quartz-(CGFont)-Fonts.details"></a><h2>Details</h2> <div class="refsect2" title="CAIRO_HAS_QUARTZ_FONT"> <a name="CAIRO-HAS-QUARTZ-FONT:CAPS"></a><h3>CAIRO_HAS_QUARTZ_FONT</h3> -<pre class="programlisting">#define CAIRO_HAS_QUARTZ_FONT 1 -</pre> +<pre class="programlisting">#define CAIRO_HAS_QUARTZ_FONT</pre> <p> Defined if the Quartz font backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/html/cairo-Quartz-Surfaces.html b/doc/public/html/cairo-Quartz-Surfaces.html index 747e903..7c91850 100644 --- a/doc/public/html/cairo-Quartz-Surfaces.html +++ b/doc/public/html/cairo-Quartz-Surfaces.html @@ -59,8 +59,7 @@ Apple OS X Quartz rendering system. <a name="cairo-Quartz-Surfaces.details"></a><h2>Details</h2> <div class="refsect2" title="CAIRO_HAS_QUARTZ_SURFACE"> <a name="CAIRO-HAS-QUARTZ-SURFACE:CAPS"></a><h3>CAIRO_HAS_QUARTZ_SURFACE</h3> -<pre class="programlisting">#define CAIRO_HAS_QUARTZ_SURFACE 1 -</pre> +<pre class="programlisting">#define CAIRO_HAS_QUARTZ_SURFACE</pre> <p> Defined if the Quartz surface backend is available. This macro can be used to conditionally compile backend-specific code. @@ -124,19 +123,10 @@ using a translate and a scale; for example: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="function">CGContextTranslateCTM</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cgContext</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.0</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">);</span> -<span class="function">CGContextScaleCTM</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cgContext</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1.0</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1.0</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +CGContextTranslateCTM (cgContext, 0.0, height); +CGContextScaleCTM (cgContext, 1.0, -1.0); +</pre></div> <p> </p> <p> diff --git a/doc/public/html/cairo-Recording-Surfaces.html b/doc/public/html/cairo-Recording-Surfaces.html new file mode 100644 index 0000000..53d61e1 --- /dev/null +++ b/doc/public/html/cairo-Recording-Surfaces.html @@ -0,0 +1,201 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Recording Surfaces</title> +<meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> +<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library"> +<link rel="up" href="cairo-surfaces.html" title="Surfaces"> +<link rel="prev" href="cairo-PostScript-Surfaces.html" title="PostScript Surfaces"> +<link rel="next" href="cairo-Win32-Surfaces.html" title="Win32 Surfaces"> +<meta name="generator" content="GTK-Doc V1.15 (XML mode)"> +<link rel="stylesheet" href="style.css" type="text/css"> +</head> +<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> +<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> +<tr valign="middle"> +<td><a accesskey="p" href="cairo-PostScript-Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> +<td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> +<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> +<th width="100%" align="center">Cairo: A Vector Graphics Library</th> +<td><a accesskey="n" href="cairo-Win32-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> +</tr> +<tr><td colspan="5" class="shortcuts"> +<a href="#cairo-Recording-Surfaces.synopsis" class="shortcut">Top</a> + | + <a href="#cairo-Recording-Surfaces.description" class="shortcut">Description</a> +</td></tr> +</table> +<div class="refentry" title="Recording Surfaces"> +<a name="cairo-Recording-Surfaces"></a><div class="titlepage"></div> +<div class="refnamediv"><table width="100%"><tr> +<td valign="top"> +<h2><span class="refentrytitle"><a name="cairo-Recording-Surfaces.top_of_page"></a>Recording Surfaces</span></h2> +<p>Recording Surfaces — Records all drawing operations</p> +</td> +<td valign="top" align="right"></td> +</tr></table></div> +<div class="refsynopsisdiv" title="Synopsis"> +<a name="cairo-Recording-Surfaces.synopsis"></a><h2>Synopsis</h2> +<pre class="synopsis">#define <a class="link" href="cairo-Recording-Surfaces.html#CAIRO-HAS-RECORDING-SURFACE:CAPS" title="CAIRO_HAS_RECORDING_SURFACE">CAIRO_HAS_RECORDING_SURFACE</a> +<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * <a class="link" href="cairo-Recording-Surfaces.html#cairo-recording-surface-create" title="cairo_recording_surface_create ()">cairo_recording_surface_create</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>, + <em class="parameter"><code>const <a class="link" href="cairo-cairo-t.html#cairo-rectangle-t" title="cairo_rectangle_t"><span class="type">cairo_rectangle_t</span></a> *extents</code></em>); +<span class="returnvalue">void</span> <a class="link" href="cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents" title="cairo_recording_surface_ink_extents ()">cairo_recording_surface_ink_extents</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>, + <em class="parameter"><code><span class="type">double</span> *x0</code></em>, + <em class="parameter"><code><span class="type">double</span> *y0</code></em>, + <em class="parameter"><code><span class="type">double</span> *width</code></em>, + <em class="parameter"><code><span class="type">double</span> *height</code></em>); +</pre> +</div> +<div class="refsect1" title="Description"> +<a name="cairo-Recording-Surfaces.description"></a><h2>Description</h2> +<p> +A recording surface is a surface that records all drawing operations at +the highest level of the surface backend interface, (that is, the +level of paint, mask, stroke, fill, and show_text_glyphs). The recording +surface can then be "replayed" against any target surface by using it +as a source surface. +</p> +<p> +If you want to replay a surface so that the results in target will be +identical to the results that would have been obtained if the original +operations applied to the recording surface had instead been applied to the +target surface, you can use code like this: +</p> +<div class="informalexample"><pre class="programlisting"> + cairo_t *cr; + +cr = cairo_create (target); +cairo_set_source_surface (cr, recording_surface, 0.0, 0.0); +cairo_paint (cr); +cairo_destroy (cr); +</pre></div> +<p> +</p> +<p> +A recording surface is logically unbounded, i.e. it has no implicit constraint +on the size of the drawing surface. However, in practice this is rarely +useful as you wish to replay against a particular target surface with +known bounds. For this case, it is more efficient to specify the target +extents to the recording surface upon creation. +</p> +<p> +The recording phase of the recording surface is careful to snapshot all +necessary objects (paths, patterns, etc.), in order to achieve +accurate replay. The efficiency of the recording surface could be +improved by improving the implementation of snapshot for the +various objects. For example, it would be nice to have a +copy-on-write implementation for _cairo_surface_snapshot. +</p> +</div> +<div class="refsect1" title="Details"> +<a name="cairo-Recording-Surfaces.details"></a><h2>Details</h2> +<div class="refsect2" title="CAIRO_HAS_RECORDING_SURFACE"> +<a name="CAIRO-HAS-RECORDING-SURFACE:CAPS"></a><h3>CAIRO_HAS_RECORDING_SURFACE</h3> +<pre class="programlisting">#define CAIRO_HAS_RECORDING_SURFACE 1 +</pre> +<p> +Defined if the recording surface backend is available. +The recording surface backend is always built in. +This macro was added for completeness in cairo 1.10. +</p> +<p class="since">Since 1.10</p> +</div> +<hr> +<div class="refsect2" title="cairo_recording_surface_create ()"> +<a name="cairo-recording-surface-create"></a><h3>cairo_recording_surface_create ()</h3> +<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * cairo_recording_surface_create (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>, + <em class="parameter"><code>const <a class="link" href="cairo-cairo-t.html#cairo-rectangle-t" title="cairo_rectangle_t"><span class="type">cairo_rectangle_t</span></a> *extents</code></em>);</pre> +<p> +Creates a recording-surface which can be used to record all drawing operations +at the highest level (that is, the level of paint, mask, stroke, fill +and show_text_glyphs). The recording surface can then be "replayed" against +any target surface by using it as a source to drawing operations. +</p> +<p> +The recording phase of the recording surface is careful to snapshot all +necessary objects (paths, patterns, etc.), in order to achieve +accurate replay. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td> +<td>the content of the recording surface +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>extents</code></em> :</span></p></td> +<td>the extents to record in pixels, can be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to record + unbounded operations. +</td> +</tr> +<tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td> a pointer to the newly created surface. The caller +owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done +with it. + +</td> +</tr> +</tbody> +</table></div> +<p class="since">Since 1.10</p> +</div> +<hr> +<div class="refsect2" title="cairo_recording_surface_ink_extents ()"> +<a name="cairo-recording-surface-ink-extents"></a><h3>cairo_recording_surface_ink_extents ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> cairo_recording_surface_ink_extents (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>, + <em class="parameter"><code><span class="type">double</span> *x0</code></em>, + <em class="parameter"><code><span class="type">double</span> *y0</code></em>, + <em class="parameter"><code><span class="type">double</span> *width</code></em>, + <em class="parameter"><code><span class="type">double</span> *height</code></em>);</pre> +<p> +Measures the extents of the operations stored within the recording-surface. +This is useful to compute the required size of an image surface (or +equivalent) into which to replay the full sequence of drawing operations. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td> +<td>a <span class="type">cairo_recording_surface_t</span> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>x0</code></em> :</span></p></td> +<td>the x-coordinate of the top-left of the ink bounding box +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>y0</code></em> :</span></p></td> +<td>the y-coordinate of the top-left of the ink bounding box +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td> +<td>the width of the ink bounding box +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td> +<td>the height of the ink bounding box +</td> +</tr> +</tbody> +</table></div> +<p class="since">Since 1.10</p> +</div> +</div> +<div class="refsect1" title="See Also"> +<a name="cairo-Recording-Surfaces.see-also"></a><h2>See Also</h2> +<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> +</div> +</div> +<div class="footer"> +<hr> + Generated by GTK-Doc V1.15</div> +</body> +</html>
\ No newline at end of file diff --git a/doc/public/html/cairo-Types.html b/doc/public/html/cairo-Types.html index d654e5d..5a0a2bb 100644 --- a/doc/public/html/cairo-Types.html +++ b/doc/public/html/cairo-Types.html @@ -63,21 +63,11 @@ value as a boolean condition. </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-in-stroke">cairo_in_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="comment">/* do something */</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> + if (cairo_in_stroke (cr, x, y)) { + /* do something */ + } +</pre></div> <p> </p> </div> diff --git a/doc/public/html/cairo-Version-Information.html b/doc/public/html/cairo-Version-Information.html index 2e51677..a39f326 100644 --- a/doc/public/html/cairo-Version-Information.html +++ b/doc/public/html/cairo-Version-Information.html @@ -62,71 +62,38 @@ or as a "snapshot" tar file as opposed to a "release" tar file). </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="normal">_____ Major</span><span class="symbol">.</span><span class="normal"> Always </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> until we invent a </span><span class="usertype">new</span><span class="normal"> scheme</span><span class="symbol">.</span> -<span class="symbol">/</span><span class="normal"> ___ Minor</span><span class="symbol">.</span><span class="normal"> Even</span><span class="symbol">/</span><span class="normal">Odd </span><span class="symbol">=</span><span class="normal"> Release</span><span class="symbol">/</span><span class="function">Snapshot</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">tar</span><span class="normal"> files</span><span class="symbol">)</span><span class="normal"> </span><span class="usertype">or</span><span class="normal"> Branch</span><span class="symbol">/</span><span class="function">Head</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">git</span><span class="symbol">)</span> -<span class="symbol">|</span><span class="normal"> </span><span class="symbol">/</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-I18N.html#gettext-macro">_</a> Micro</span><span class="symbol">.</span><span class="normal"> Even</span><span class="symbol">/</span><span class="normal">Odd </span><span class="symbol">=</span><span class="normal"> Tar</span><span class="symbol">-</span><span class="normal">file</span><span class="symbol">/</span><span class="normal">git</span> -<span class="symbol">|</span><span class="normal"> </span><span class="symbol">|</span><span class="normal"> </span><span class="symbol">/</span> -<span class="number">1.0</span><span class="symbol">.</span><span class="number">0</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> + _____ Major. Always 1, until we invent a new scheme. +/ ___ Minor. Even/Odd = Release/Snapshot (tar files) or Branch/Head (git) +| / _ Micro. Even/Odd = Tar-file/git +| | / +1.0.0 +</pre></div> <p> </p> <p> Here are a few examples of versions that one might see. </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="normal">Releases</span> -<span class="symbol">--------</span> -<span class="number">1.0</span><span class="symbol">.</span><span class="number">0</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> A major release</span> -<span class="number">1.0</span><span class="symbol">.</span><span class="number">2</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> A subsequent maintenance release</span> -<span class="number">1.2</span><span class="symbol">.</span><span class="number">0</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> Another major release</span> +<div class="informalexample"><pre class="programlisting"> +Releases +-------- +1.0.0 - A major release +1.0.2 - A subsequent maintenance release +1.2.0 - Another major release -<span class="normal">Snapshots</span> -<span class="symbol">---------</span> -<span class="number">1.1</span><span class="symbol">.</span><span class="number">2</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> </span><span class="usertype">A</span><span class="normal"> </span><span class="function">snapshot</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">working toward the </span><span class="number">1.2</span><span class="symbol">.</span><span class="number">0</span><span class="normal"> release</span><span class="symbol">)</span> - -<span class="normal">In</span><span class="symbol">-</span><span class="usertype">progress</span><span class="normal"> </span><span class="function">development</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">eg</span><span class="symbol">.</span><span class="normal"> </span><span class="usertype">from</span><span class="normal"> git</span><span class="symbol">)</span> -<span class="symbol">--------------------------------------</span> -<span class="number">1.0</span><span class="symbol">.</span><span class="number">1</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> Development on a </span><span class="usertype">maintenance</span><span class="normal"> </span><span class="function">branch</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toward </span><span class="number">1.0</span><span class="symbol">.</span><span class="number">2</span><span class="normal"> release</span><span class="symbol">)</span> -<span class="number">1.1</span><span class="symbol">.</span><span class="number">1</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> Development </span><span class="usertype">on</span><span class="normal"> </span><span class="function">head</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">toward </span><span class="number">1.1</span><span class="symbol">.</span><span class="number">2</span><span class="normal"> snapshot and </span><span class="number">1.2</span><span class="symbol">.</span><span class="number">0</span><span class="normal"> release</span><span class="symbol">)</span></pre></td> - </tr> - </tbody> - </table> -</div> +Snapshots +--------- +1.1.2 - A snapshot (working toward the 1.2.0 release) +In-progress development (eg. from git) +-------------------------------------- +1.0.1 - Development on a maintenance branch (toward 1.0.2 release) +1.1.1 - Development on head (toward 1.1.2 snapshot and 1.2.0 release) +</pre></div> <p> </p> <div class="refsect2" title="Compatibility"> -<a name="id3076756"></a><h3>Compatibility</h3> +<a name="id2765635"></a><h3>Compatibility</h3> <p> The API/ABI compatibility guarantees for various versions are as follows. First, let's assume some cairo-using application code that is @@ -154,7 +121,7 @@ rather the many states between snapshots and releases. </div> <hr> <div class="refsect2" title="Examining the version"> -<a name="id3076795"></a><h3>Examining the version</h3> +<a name="id2765673"></a><h3>Examining the version</h3> <p> Cairo provides the ability to examine the version at either compile-time or run-time and in both a human-readable form as well as @@ -163,33 +130,17 @@ macro <a class="link" href="cairo-Version-Information.html#CAIRO-VERSION-ENCODE: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="normal">Compile</span><span class="symbol">-</span><span class="normal">time</span> -<span class="symbol">------------</span> -<span class="usertype">CAIRO_VERSION_STRING</span><span class="normal"> Human</span><span class="symbol">-</span><span class="normal">readable</span> -<span class="usertype">CAIRO_VERSION</span><span class="normal"> Encoded</span><span class="symbol">,</span><span class="normal"> suitable </span><span class="keyword">for</span><span class="normal"> comparison</span> - -<span class="normal">Run</span><span class="symbol">-</span><span class="normal">time</span> -<span class="symbol">--------</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#cairo-version-string">cairo_version_string</a></span><span class="symbol">()</span><span class="normal"> Human</span><span class="symbol">-</span><span class="normal">readable</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#cairo-version">cairo_version</a></span><span class="symbol">()</span><span class="normal"> Encoded</span><span class="symbol">,</span><span class="normal"> suitable </span><span class="keyword">for</span><span class="normal"> comparison</span></pre></td> - </tr> - </tbody> - </table> -</div> +<div class="informalexample"><pre class="programlisting"> +Compile-time +------------ +CAIRO_VERSION_STRING Human-readable +CAIRO_VERSION Encoded, suitable for comparison +Run-time +-------- +cairo_version_string() Human-readable +cairo_version() Encoded, suitable for comparison +</pre></div> <p> </p> <p> @@ -198,27 +149,14 @@ to 1.0.0 could be achieved at compile-time or run-time as follows: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="preproc">#</span><span class="normal">#</span><span class="usertype">if</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#CAIRO-VERSION:CAPS">CAIRO_VERSION</a> </span><span class="symbol">>=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#CAIRO-VERSION-ENCODE:CAPS">CAIRO_VERSION_ENCODE</a></span><span class="symbol">(</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span> -<span class="function">printf</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Compiling with suitable cairo version: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">%</span><span class="normal"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#CAIRO-VERSION-STRING:CAPS">CAIRO_VERSION_STRING</a></span><span class="symbol">);</span> -<span class="preproc">#</span><span class="normal">#endif</span> - -<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#cairo-version">cairo_version</a></span><span class="symbol">()</span><span class="normal"> </span><span class="symbol">>=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#CAIRO-VERSION-ENCODE:CAPS">CAIRO_VERSION_ENCODE</a></span><span class="symbol">(</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">))</span> -<span class="normal"> </span><span class="function">printf</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Running with suitable cairo version: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#cairo-version-string">cairo_version_string</a></span><span class="normal"> </span><span class="symbol">());</span></pre></td> - </tr> - </tbody> - </table> -</div> +<div class="informalexample"><pre class="programlisting"> +##if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 0, 0) +printf ("Compiling with suitable cairo version: %s\n", %CAIRO_VERSION_STRING); +##endif +if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 0, 0)) + printf ("Running with suitable cairo version: %s\n", cairo_version_string ()); +</pre></div> <p> </p> </div> @@ -354,17 +292,9 @@ or equal to version X.Y.Z could be performed as follows: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#cairo-version">cairo_version</a></span><span class="symbol">()</span><span class="normal"> </span><span class="symbol">>=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Version-Information.html#CAIRO-VERSION-ENCODE:CAPS">CAIRO_VERSION_ENCODE</a></span><span class="symbol">(</span><span class="normal">X</span><span class="symbol">,</span><span class="normal">Y</span><span class="symbol">,</span><span class="normal">Z</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span><span class="symbol">...</span><span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +if (cairo_version() >= CAIRO_VERSION_ENCODE(X,Y,Z)) {...} +</pre></div> <p> </p> <p> diff --git a/doc/public/html/cairo-Win32-Fonts.html b/doc/public/html/cairo-Win32-Fonts.html index 89b3a2b..a38191e 100644 --- a/doc/public/html/cairo-Win32-Fonts.html +++ b/doc/public/html/cairo-Win32-Fonts.html @@ -69,8 +69,7 @@ Microsoft Windows systems. <a name="cairo-Win32-Fonts.details"></a><h2>Details</h2> <div class="refsect2" title="CAIRO_HAS_WIN32_FONT"> <a name="CAIRO-HAS-WIN32-FONT:CAPS"></a><h3>CAIRO_HAS_WIN32_FONT</h3> -<pre class="programlisting">#define CAIRO_HAS_WIN32_FONT 1 -</pre> +<pre class="programlisting">#define CAIRO_HAS_WIN32_FONT</pre> <p> Defined if the Microsoft Windows font backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/html/cairo-Win32-Surfaces.html b/doc/public/html/cairo-Win32-Surfaces.html index 280e35c..dc75d19 100644 --- a/doc/public/html/cairo-Win32-Surfaces.html +++ b/doc/public/html/cairo-Win32-Surfaces.html @@ -6,7 +6,7 @@ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library"> <link rel="up" href="cairo-surfaces.html" title="Surfaces"> -<link rel="prev" href="cairo-PostScript-Surfaces.html" title="PostScript Surfaces"> +<link rel="prev" href="cairo-Recording-Surfaces.html" title="Recording Surfaces"> <link rel="next" href="cairo-SVG-Surfaces.html" title="SVG Surfaces"> <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> @@ -14,7 +14,7 @@ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> <tr valign="middle"> -<td><a accesskey="p" href="cairo-PostScript-Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> +<td><a accesskey="p" href="cairo-Recording-Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> <td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> <th width="100%" align="center">Cairo: A Vector Graphics Library</th> @@ -71,8 +71,7 @@ The surface returned by the other win32 constructors is of surface type <a name="cairo-Win32-Surfaces.details"></a><h2>Details</h2> <div class="refsect2" title="CAIRO_HAS_WIN32_SURFACE"> <a name="CAIRO-HAS-WIN32-SURFACE:CAPS"></a><h3>CAIRO_HAS_WIN32_SURFACE</h3> -<pre class="programlisting">#define CAIRO_HAS_WIN32_SURFACE 1 -</pre> +<pre class="programlisting">#define CAIRO_HAS_WIN32_SURFACE</pre> <p> Defined if the Microsoft Windows surface backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/html/cairo-cairo-device-t.html b/doc/public/html/cairo-cairo-device-t.html index cd79a7a..9238333 100644 --- a/doc/public/html/cairo-cairo-device-t.html +++ b/doc/public/html/cairo-cairo-device-t.html @@ -85,55 +85,28 @@ be used by applications. Putting this all together, a function that works with devices should look something like this: </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="type">void</span> -<span class="function">my_device_modifying_function</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">cairo_device_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">device</span><span class="symbol">)</span> -<span class="cbracket">{</span> -<span class="normal"> </span><span class="usertype">cairo_status_t</span><span class="normal"> status</span><span class="symbol">;</span> +<div class="informalexample"><pre class="programlisting"> +void +my_device_modifying_function (cairo_device_t *device) +{ + cairo_status_t status; -<span class="normal"> </span><span class="comment">// Ensure the device is properly reset</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-device-t.html#cairo-device-flush">cairo_device_flush</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">device</span><span class="symbol">);</span> -<span class="normal"> </span><span class="comment">// Try to acquire the device</span> -<span class="normal"> status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-device-t.html#cairo-device-acquire">cairo_device_acquire</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">device</span><span class="symbol">);</span> -<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">status </span><span class="symbol">!=</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS">CAIRO_STATUS_SUCCESS</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="function">printf</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Failed to acquire the device: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Error-handling.html#cairo-status-to-string">cairo_status_to_string</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">status</span><span class="symbol">));</span> -<span class="normal"> </span><span class="keyword">return</span><span class="symbol">;</span> -<span class="normal"> </span><span class="cbracket">}</span> - -<span class="normal"> </span><span class="comment">// Do the custom operations on the device here.</span> -<span class="normal"> </span><span class="comment">// But do not call any Cairo functions that might acquire devices.</span> -<span class="normal"> </span> -<span class="normal"> </span><span class="comment">// Release the device when done.</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-device-t.html#cairo-device-release">cairo_device_release</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">device</span><span class="symbol">);</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> + // Ensure the device is properly reset + cairo_device_flush (device); + // Try to acquire the device + status = cairo_device_acquire (device); + if (status != CAIRO_STATUS_SUCCESS) { + printf ("Failed to acquire the device: %s\n", cairo_status_to_string (status)); + return; + } + // Do the custom operations on the device here. + // But do not call any Cairo functions that might acquire devices. + + // Release the device when done. + cairo_device_release (device); +} +</pre></div> <p> </p> <p> @@ -315,7 +288,7 @@ This function may acquire devices. CAIRO_DEVICE_TYPE_SCRIPT, CAIRO_DEVICE_TYPE_XCB, CAIRO_DEVICE_TYPE_XLIB, - CAIRO_DEVICE_TYPE_XML, + CAIRO_DEVICE_TYPE_XML } cairo_device_type_t; </pre> <p> diff --git a/doc/public/html/cairo-cairo-pattern-t.html b/doc/public/html/cairo-cairo-pattern-t.html index fb97831..d1f1be5 100644 --- a/doc/public/html/cairo-cairo-pattern-t.html +++ b/doc/public/html/cairo-cairo-pattern-t.html @@ -1101,19 +1101,10 @@ creates implicitly. For example: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source-surface">cairo_set_source_surface</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> image</span><span class="symbol">,</span><span class="normal"> x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-set-filter">cairo_pattern_set_filter</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-get-source">cairo_get_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">),</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#CAIRO-FILTER-NEAREST:CAPS">CAIRO_FILTER_NEAREST</a></span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +cairo_set_source_surface (cr, image, x, y); +cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST); +</pre></div> <p> </p> <div class="variablelist"><table border="0"> @@ -1184,19 +1175,10 @@ it does by default the correct code to use is: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html#cairo-matrix-init-scale">cairo_matrix_init_scale</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">matrix</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-set-matrix">cairo_pattern_set_matrix</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pattern</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">matrix</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +cairo_matrix_init_scale (&matrix, 0.5, 0.5); +cairo_pattern_set_matrix (pattern, &matrix); +</pre></div> <p> </p> <p> diff --git a/doc/public/html/cairo-cairo-scaled-font-t.html b/doc/public/html/cairo-cairo-scaled-font-t.html index 54f1919..83c974b 100644 --- a/doc/public/html/cairo-cairo-scaled-font-t.html +++ b/doc/public/html/cairo-cairo-scaled-font-t.html @@ -544,176 +544,89 @@ array was large enough. In the simplest case, <em class="parameter"><code>glyphs</code></em> and <em class="parameter"><code>clusters</code></em> can point to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> initially and a suitable array will be allocated. In code: </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="usertype">cairo_status_t</span><span class="normal"> status</span><span class="symbol">;</span> +<div class="informalexample"><pre class="programlisting"> +cairo_status_t status; -<span class="usertype">cairo_glyph_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">glyphs </span><span class="symbol">=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span> -<span class="type">int</span><span class="normal"> num_glyphs</span><span class="symbol">;</span> -<span class="usertype">cairo_text_cluster_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">clusters </span><span class="symbol">=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span> -<span class="type">int</span><span class="normal"> num_clusters</span><span class="symbol">;</span> -<span class="usertype">cairo_text_cluster_flags_t</span><span class="normal"> cluster_flags</span><span class="symbol">;</span> +cairo_glyph_t *glyphs = NULL; +int num_glyphs; +cairo_text_cluster_t *clusters = NULL; +int num_clusters; +cairo_text_cluster_flags_t cluster_flags; -<span class="normal">status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs">cairo_scaled_font_text_to_glyphs</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">scaled_font</span><span class="symbol">,</span> -<span class="normal"> x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">,</span> -<span class="normal"> utf8</span><span class="symbol">,</span><span class="normal"> utf8_len</span><span class="symbol">,</span> -<span class="normal"> </span><span class="symbol">&</span><span class="normal">glyphs</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">num_glyphs</span><span class="symbol">,</span> -<span class="normal"> </span><span class="symbol">&</span><span class="normal">clusters</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">num_clusters</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">cluster_flags</span><span class="symbol">);</span> +status = cairo_scaled_font_text_to_glyphs (scaled_font, + x, y, + utf8, utf8_len, + &glyphs, &num_glyphs, + &clusters, &num_clusters, &cluster_flags); -<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">status </span><span class="symbol">==</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS">CAIRO_STATUS_SUCCESS</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-show-text-glyphs">cairo_show_text_glyphs</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span> -<span class="normal"> utf8</span><span class="symbol">,</span><span class="normal"> utf8_len</span><span class="symbol">,</span> -<span class="normal"> glyphs</span><span class="symbol">,</span><span class="normal"> num_glyphs</span><span class="symbol">,</span> -<span class="normal"> clusters</span><span class="symbol">,</span><span class="normal"> num_clusters</span><span class="symbol">,</span><span class="normal"> cluster_flags</span><span class="symbol">);</span> - -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-glyph-free">cairo_glyph_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">glyphs</span><span class="symbol">);</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-text-cluster-free">cairo_text_cluster_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">clusters</span><span class="symbol">);</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> +if (status == CAIRO_STATUS_SUCCESS) { + cairo_show_text_glyphs (cr, + utf8, utf8_len, + glyphs, num_glyphs, + clusters, num_clusters, cluster_flags); + cairo_glyph_free (glyphs); + cairo_text_cluster_free (clusters); +} +</pre></div> <p> </p> <p> If no cluster mapping is needed: </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="usertype">cairo_status_t</span><span class="normal"> status</span><span class="symbol">;</span> - -<span class="usertype">cairo_glyph_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">glyphs </span><span class="symbol">=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span> -<span class="type">int</span><span class="normal"> num_glyphs</span><span class="symbol">;</span> +<div class="informalexample"><pre class="programlisting"> +cairo_status_t status; -<span class="normal">status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs">cairo_scaled_font_text_to_glyphs</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">scaled_font</span><span class="symbol">,</span> -<span class="normal"> x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">,</span> -<span class="normal"> utf8</span><span class="symbol">,</span><span class="normal"> utf8_len</span><span class="symbol">,</span> -<span class="normal"> </span><span class="symbol">&</span><span class="normal">glyphs</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">num_glyphs</span><span class="symbol">,</span> -<span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span> -<span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span> +cairo_glyph_t *glyphs = NULL; +int num_glyphs; -<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">status </span><span class="symbol">==</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS">CAIRO_STATUS_SUCCESS</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-show-glyphs">cairo_show_glyphs</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> glyphs</span><span class="symbol">,</span><span class="normal"> num_glyphs</span><span class="symbol">);</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-glyph-free">cairo_glyph_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">glyphs</span><span class="symbol">);</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> +status = cairo_scaled_font_text_to_glyphs (scaled_font, + x, y, + utf8, utf8_len, + &glyphs, &num_glyphs, + NULL, NULL, + NULL); +if (status == CAIRO_STATUS_SUCCESS) { + cairo_show_glyphs (cr, glyphs, num_glyphs); + cairo_glyph_free (glyphs); +} +</pre></div> <p> </p> <p> If stack-based glyph and cluster arrays are to be used for small arrays: </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="usertype">cairo_status_t</span><span class="normal"> status</span><span class="symbol">;</span> - -<span class="usertype">cairo_glyph_t</span><span class="normal"> stack_glyphs</span><span class="symbol">[</span><span class="number">40</span><span class="symbol">];</span> -<span class="usertype">cairo_glyph_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">glyphs </span><span class="symbol">=</span><span class="normal"> stack_glyphs</span><span class="symbol">;</span> -<span class="type">int</span><span class="normal"> num_glyphs </span><span class="symbol">=</span><span class="normal"> </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stack_glyphs</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">/</span><span class="normal"> </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stack_glyphs</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">]);</span> -<span class="usertype">cairo_text_cluster_t</span><span class="normal"> stack_clusters</span><span class="symbol">[</span><span class="number">40</span><span class="symbol">];</span> -<span class="usertype">cairo_text_cluster_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">clusters </span><span class="symbol">=</span><span class="normal"> stack_clusters</span><span class="symbol">;</span> -<span class="type">int</span><span class="normal"> num_clusters </span><span class="symbol">=</span><span class="normal"> </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stack_clusters</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">/</span><span class="normal"> </span><span class="keyword">sizeof</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stack_clusters</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">]);</span> -<span class="usertype">cairo_text_cluster_flags_t</span><span class="normal"> cluster_flags</span><span class="symbol">;</span> +<div class="informalexample"><pre class="programlisting"> +cairo_status_t status; -<span class="normal">status </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs">cairo_scaled_font_text_to_glyphs</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">scaled_font</span><span class="symbol">,</span> -<span class="normal"> x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">,</span> -<span class="normal"> utf8</span><span class="symbol">,</span><span class="normal"> utf8_len</span><span class="symbol">,</span> -<span class="normal"> </span><span class="symbol">&</span><span class="normal">glyphs</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">num_glyphs</span><span class="symbol">,</span> -<span class="normal"> </span><span class="symbol">&</span><span class="normal">clusters</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">num_clusters</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">cluster_flags</span><span class="symbol">);</span> +cairo_glyph_t stack_glyphs[40]; +cairo_glyph_t *glyphs = stack_glyphs; +int num_glyphs = sizeof (stack_glyphs) / sizeof (stack_glyphs[0]); +cairo_text_cluster_t stack_clusters[40]; +cairo_text_cluster_t *clusters = stack_clusters; +int num_clusters = sizeof (stack_clusters) / sizeof (stack_clusters[0]); +cairo_text_cluster_flags_t cluster_flags; -<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">status </span><span class="symbol">==</span><span class="normal"> <a href="/usr/share/gtk-doc/html/cairo/cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS">CAIRO_STATUS_SUCCESS</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-show-text-glyphs">cairo_show_text_glyphs</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span> -<span class="normal"> utf8</span><span class="symbol">,</span><span class="normal"> utf8_len</span><span class="symbol">,</span> -<span class="normal"> glyphs</span><span class="symbol">,</span><span class="normal"> num_glyphs</span><span class="symbol">,</span> -<span class="normal"> clusters</span><span class="symbol">,</span><span class="normal"> num_clusters</span><span class="symbol">,</span><span class="normal"> cluster_flags</span><span class="symbol">);</span> +status = cairo_scaled_font_text_to_glyphs (scaled_font, + x, y, + utf8, utf8_len, + &glyphs, &num_glyphs, + &clusters, &num_clusters, &cluster_flags); -<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">glyphs </span><span class="symbol">!=</span><span class="normal"> stack_glyphs</span><span class="symbol">)</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-glyph-free">cairo_glyph_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">glyphs</span><span class="symbol">);</span> -<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">clusters </span><span class="symbol">!=</span><span class="normal"> stack_clusters</span><span class="symbol">)</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-text.html#cairo-text-cluster-free">cairo_text_cluster_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">clusters</span><span class="symbol">);</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> +if (status == CAIRO_STATUS_SUCCESS) { + cairo_show_text_glyphs (cr, + utf8, utf8_len, + glyphs, num_glyphs, + clusters, num_clusters, cluster_flags); + if (glyphs != stack_glyphs) + cairo_glyph_free (glyphs); + if (clusters != stack_clusters) + cairo_text_cluster_free (clusters); +} +</pre></div> <p> </p> <p> diff --git a/doc/public/html/cairo-cairo-surface-t.html b/doc/public/html/cairo-cairo-surface-t.html index 4231110..9501f75 100644 --- a/doc/public/html/cairo-cairo-surface-t.html +++ b/doc/public/html/cairo-cairo-surface-t.html @@ -124,54 +124,28 @@ functions. If you do this, keep in mind that it is mandatory that you call you must use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty" title="cairo_surface_mark_dirty ()"><code class="function">cairo_surface_mark_dirty()</code></a> after modifying it. </p> <div class="example"> -<a name="id3054006"></a><p class="title"><b>Example 1. Directly modifying an image surface</b></p> -<div class="example-contents"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="type">void</span> -<span class="function">modify_image_surface</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">cairo_surface_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">surface</span><span class="symbol">)</span> -<span class="cbracket">{</span> -<span class="normal"> </span><span class="type">unsigned</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">data</span><span class="symbol">;</span> -<span class="normal"> </span><span class="type">int</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">,</span><span class="normal"> stride</span><span class="symbol">;</span> +<a name="id2748408"></a><p class="title"><b>Example 1. Directly modifying an image surface</b></p> +<div class="example-contents"><pre class="programlisting"> +void +modify_image_surface (cairo_surface_t *surface) +{ + unsigned char *data; + int width, height, stride; -<span class="normal"> </span><span class="comment">// flush to ensure all writing to the image was done</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-flush">cairo_surface_flush</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> + // flush to ensure all writing to the image was done + cairo_surface_flush (surface); -<span class="normal"> </span><span class="comment">// modify the image</span> -<span class="normal"> data </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-data">cairo_image_surface_get_data</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="normal"> width </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-width">cairo_image_surface_get_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="normal"> height </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-height">cairo_image_surface_get_height</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="normal"> stride </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-stride">cairo_image_surface_get_stride</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="normal"> </span><span class="function">modify_image_data</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">,</span><span class="normal"> stride</span><span class="symbol">);</span> - -<span class="normal"> </span><span class="comment">// mark the image dirty so Cairo clears its caches.</span> -<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-mark-dirty">cairo_surface_mark_dirty</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span> -<span class="cbracket">}</span></pre></td> - </tr> - </tbody> - </table> -</div> + // modify the image + data = cairo_image_surface_get_data (surface); + width = cairo_image_surface_get_width (surface); + height = cairo_image_surface_get_height (surface); + stride = cairo_image_surface_get_stride (surface); + modify_image_data (data, width, height, stride); + // mark the image dirty so Cairo clears its caches. + cairo_surface_mark_dirty (surface); +} +</pre></div> </div> <p><br class="example-break"> Note that for other surface types it might be necessary to acquire the diff --git a/doc/public/html/cairo-cairo-t.html b/doc/public/html/cairo-cairo-t.html index 426fbd5..9df54c7 100644 --- a/doc/public/html/cairo-cairo-t.html +++ b/doc/public/html/cairo-cairo-t.html @@ -420,29 +420,15 @@ under the stroke: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3 -4 -5 -6 -7</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-push-group">cairo_push_group</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source">cairo_set_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> fill_pattern</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-fill-preserve">cairo_fill_preserve</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source">cairo_set_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> stroke_pattern</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-pop-group-to-source">cairo_pop_group_to_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-paint-with-alpha">cairo_paint_with_alpha</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> alpha</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +cairo_push_group (cr); +cairo_set_source (cr, fill_pattern); +cairo_fill_preserve (cr); +cairo_set_source (cr, stroke_pattern); +cairo_stroke (cr); +cairo_pop_group_to_source (cr); +cairo_paint_with_alpha (cr, alpha); +</pre></div> <p> </p> <div class="variablelist"><table border="0"> @@ -543,21 +529,11 @@ operations: </p> <p> </p> -<div class="informalexample"> - <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> - <tbody> - <tr> - <td class="listing_lines" align="right"><pre>1 -2 -3</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="symbol"><</span><span class="usertype">a</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"link"</span><span class="normal"> href</span><span class="symbol">=</span><span class="string">"cairo-cairo-pattern-t.html#cairo-pattern-t"</span><span class="normal"> title</span><span class="symbol">=</span><span class="string">"cairo_pattern_t"</span><span class="symbol">></span><span class="usertype">cairo_pattern_t</a></span><span class="normal"> </span><span class="symbol">*</span><span class="normal">group </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-pop-group">cairo_pop_group</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source">cairo_set_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> group</span><span class="symbol">);</span> -<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-destroy">cairo_pattern_destroy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">group</span><span class="symbol">);</span></pre></td> - </tr> - </tbody> - </table> -</div> - +<div class="informalexample"><pre class="programlisting"> +<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t">cairo_pattern_t</a> *group = cairo_pop_group (cr); +cairo_set_source (cr, group); +cairo_pattern_destroy (group); +</pre></div> <p> </p> <p> @@ -769,7 +745,7 @@ and setting it as the source in <em class="parameter"><code>cr</code></em> with The <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters give the user-space coordinate at which the surface origin should appear. (The surface origin is its upper-left corner before any transformation has been applied.) The -<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> patterns are negated and then set as translation values +<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters are negated and then set as translation values in the pattern matrix. </p> <p> diff --git a/doc/public/html/cairo-surfaces.html b/doc/public/html/cairo-surfaces.html index b2ef6ed..62c2497 100644 --- a/doc/public/html/cairo-surfaces.html +++ b/doc/public/html/cairo-surfaces.html @@ -42,6 +42,9 @@ <span class="refentrytitle"><a href="cairo-PostScript-Surfaces.html">PostScript Surfaces</a></span><span class="refpurpose"> — Rendering PostScript documents</span> </dt> <dt> +<span class="refentrytitle"><a href="cairo-Recording-Surfaces.html">Recording Surfaces</a></span><span class="refpurpose"> — Records all drawing operations</span> +</dt> +<dt> <span class="refentrytitle"><a href="cairo-Win32-Surfaces.html">Win32 Surfaces</a></span><span class="refpurpose"> — Microsoft Windows surface support</span> </dt> <dt> diff --git a/doc/public/html/cairo.devhelp b/doc/public/html/cairo.devhelp index fc3b6cd..c78a57a 100644 --- a/doc/public/html/cairo.devhelp +++ b/doc/public/html/cairo.devhelp @@ -26,6 +26,7 @@ <sub name="PDF Surfaces" link="cairo-PDF-Surfaces.html"/> <sub name="PNG Support" link="cairo-PNG-Support.html"/> <sub name="PostScript Surfaces" link="cairo-PostScript-Surfaces.html"/> + <sub name="Recording Surfaces" link="cairo-Recording-Surfaces.html"/> <sub name="Win32 Surfaces" link="cairo-Win32-Surfaces.html"/> <sub name="SVG Surfaces" link="cairo-SVG-Surfaces.html"/> <sub name="Quartz Surfaces" link="cairo-Quartz-Surfaces.html"/> @@ -408,6 +409,9 @@ <function name="cairo_ps_surface_dsc_begin_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-setup"/> <function name="cairo_ps_surface_dsc_begin_page_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-page-setup"/> <function name="cairo_ps_surface_dsc_comment ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment"/> + <function name="CAIRO_HAS_RECORDING_SURFACE" link="cairo-Recording-Surfaces.html#CAIRO-HAS-RECORDING-SURFACE:CAPS"/> + <function name="cairo_recording_surface_create ()" link="cairo-Recording-Surfaces.html#cairo-recording-surface-create"/> + <function name="cairo_recording_surface_ink_extents ()" link="cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents"/> <function name="CAIRO_HAS_WIN32_SURFACE" link="cairo-Win32-Surfaces.html#CAIRO-HAS-WIN32-SURFACE:CAPS"/> <function name="cairo_win32_surface_create ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create"/> <function name="cairo_win32_surface_create_with_dib ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-dib"/> @@ -454,8 +458,8 @@ <function name="enum cairo_status_t" link="cairo-Error-handling.html#cairo-status-t"/> <function name="cairo_status_to_string ()" link="cairo-Error-handling.html#cairo-status-to-string"/> <function name="cairo_debug_reset_static_data ()" link="cairo-Error-handling.html#cairo-debug-reset-static-data"/> - <function name="Compatibility" link="cairo-Version-Information.html#id3076756"/> - <function name="Examining the version" link="cairo-Version-Information.html#id3076795"/> + <function name="Compatibility" link="cairo-Version-Information.html#id2765635"/> + <function name="Examining the version" link="cairo-Version-Information.html#id2765673"/> <function name="CAIRO_VERSION" link="cairo-Version-Information.html#CAIRO-VERSION:CAPS"/> <function name="CAIRO_VERSION_MAJOR" link="cairo-Version-Information.html#CAIRO-VERSION-MAJOR:CAPS"/> <function name="CAIRO_VERSION_MINOR" link="cairo-Version-Information.html#CAIRO-VERSION-MINOR:CAPS"/> diff --git a/doc/public/html/cairo.devhelp2 b/doc/public/html/cairo.devhelp2 index 5047e51..44cbd82 100644 --- a/doc/public/html/cairo.devhelp2 +++ b/doc/public/html/cairo.devhelp2 @@ -26,6 +26,7 @@ <sub name="PDF Surfaces" link="cairo-PDF-Surfaces.html"/> <sub name="PNG Support" link="cairo-PNG-Support.html"/> <sub name="PostScript Surfaces" link="cairo-PostScript-Surfaces.html"/> + <sub name="Recording Surfaces" link="cairo-Recording-Surfaces.html"/> <sub name="Win32 Surfaces" link="cairo-Win32-Surfaces.html"/> <sub name="SVG Surfaces" link="cairo-SVG-Surfaces.html"/> <sub name="Quartz Surfaces" link="cairo-Quartz-Surfaces.html"/> @@ -408,6 +409,9 @@ <keyword type="function" name="cairo_ps_surface_dsc_begin_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-setup" since="1.2"/> <keyword type="function" name="cairo_ps_surface_dsc_begin_page_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-page-setup" since="1.2"/> <keyword type="function" name="cairo_ps_surface_dsc_comment ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment" since="1.2"/> + <keyword type="macro" name="CAIRO_HAS_RECORDING_SURFACE" link="cairo-Recording-Surfaces.html#CAIRO-HAS-RECORDING-SURFACE:CAPS" since="1.10"/> + <keyword type="function" name="cairo_recording_surface_create ()" link="cairo-Recording-Surfaces.html#cairo-recording-surface-create" since="1.10"/> + <keyword type="function" name="cairo_recording_surface_ink_extents ()" link="cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents" since="1.10"/> <keyword type="macro" name="CAIRO_HAS_WIN32_SURFACE" link="cairo-Win32-Surfaces.html#CAIRO-HAS-WIN32-SURFACE:CAPS"/> <keyword type="function" name="cairo_win32_surface_create ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create"/> <keyword type="function" name="cairo_win32_surface_create_with_dib ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-dib" since="1.2"/> @@ -454,8 +458,8 @@ <keyword type="enum" name="enum cairo_status_t" link="cairo-Error-handling.html#cairo-status-t"/> <keyword type="function" name="cairo_status_to_string ()" link="cairo-Error-handling.html#cairo-status-to-string"/> <keyword type="function" name="cairo_debug_reset_static_data ()" link="cairo-Error-handling.html#cairo-debug-reset-static-data"/> - <keyword type="" name="Compatibility" link="cairo-Version-Information.html#id3076756"/> - <keyword type="" name="Examining the version" link="cairo-Version-Information.html#id3076795"/> + <keyword type="" name="Compatibility" link="cairo-Version-Information.html#id2765635"/> + <keyword type="" name="Examining the version" link="cairo-Version-Information.html#id2765673"/> <keyword type="macro" name="CAIRO_VERSION" link="cairo-Version-Information.html#CAIRO-VERSION:CAPS"/> <keyword type="macro" name="CAIRO_VERSION_MAJOR" link="cairo-Version-Information.html#CAIRO-VERSION-MAJOR:CAPS"/> <keyword type="macro" name="CAIRO_VERSION_MINOR" link="cairo-Version-Information.html#CAIRO-VERSION-MINOR:CAPS"/> diff --git a/doc/public/html/index-1.10.html b/doc/public/html/index-1.10.html index 2234e2b..3260de9 100644 --- a/doc/public/html/index-1.10.html +++ b/doc/public/html/index-1.10.html @@ -55,6 +55,11 @@ </dl> </div> <div class="indexdiv"> +<h3>H</h3> +<dl><dt>CAIRO_HAS_RECORDING_SURFACE, <a class="indexterm" href="cairo-Recording-Surfaces.html#CAIRO-HAS-RECORDING-SURFACE:CAPS">CAIRO_HAS_RECORDING_SURFACE</a> +</dt></dl> +</div> +<div class="indexdiv"> <h3>I</h3> <dl><dt>cairo_in_clip, <a class="indexterm" href="cairo-cairo-t.html#cairo-in-clip">cairo_in_clip ()</a> </dt></dl> @@ -73,6 +78,10 @@ <div class="indexdiv"> <h3>R</h3> <dl> +<dt>cairo_recording_surface_create, <a class="indexterm" href="cairo-Recording-Surfaces.html#cairo-recording-surface-create">cairo_recording_surface_create ()</a> +</dt> +<dt>cairo_recording_surface_ink_extents, <a class="indexterm" href="cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents">cairo_recording_surface_ink_extents ()</a> +</dt> <dt>cairo_rectangle_int_t, <a class="indexterm" href="cairo-Types.html#cairo-rectangle-int-t">cairo_rectangle_int_t</a> </dt> <dt>cairo_region_contains_point, <a class="indexterm" href="cairo-Regions.html#cairo-region-contains-point">cairo_region_contains_point ()</a> diff --git a/doc/public/html/index-all.html b/doc/public/html/index-all.html index af7f545..164f87c 100644 --- a/doc/public/html/index-all.html +++ b/doc/public/html/index-all.html @@ -279,6 +279,8 @@ </dt> <dt>CAIRO_HAS_QUARTZ_SURFACE, <a class="indexterm" href="cairo-Quartz-Surfaces.html#CAIRO-HAS-QUARTZ-SURFACE:CAPS">CAIRO_HAS_QUARTZ_SURFACE</a> </dt> +<dt>CAIRO_HAS_RECORDING_SURFACE, <a class="indexterm" href="cairo-Recording-Surfaces.html#CAIRO-HAS-RECORDING-SURFACE:CAPS">CAIRO_HAS_RECORDING_SURFACE</a> +</dt> <dt>CAIRO_HAS_SVG_SURFACE, <a class="indexterm" href="cairo-SVG-Surfaces.html#CAIRO-HAS-SVG-SURFACE:CAPS">CAIRO_HAS_SVG_SURFACE</a> </dt> <dt>CAIRO_HAS_USER_FONT, <a class="indexterm" href="cairo-User-Fonts.html#CAIRO-HAS-USER-FONT:CAPS">CAIRO_HAS_USER_FONT</a> @@ -537,6 +539,10 @@ <dl> <dt>cairo_read_func_t, <a class="indexterm" href="cairo-PNG-Support.html#cairo-read-func-t">cairo_read_func_t ()</a> </dt> +<dt>cairo_recording_surface_create, <a class="indexterm" href="cairo-Recording-Surfaces.html#cairo-recording-surface-create">cairo_recording_surface_create ()</a> +</dt> +<dt>cairo_recording_surface_ink_extents, <a class="indexterm" href="cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents">cairo_recording_surface_ink_extents ()</a> +</dt> <dt>cairo_rectangle, <a class="indexterm" href="cairo-Paths.html#cairo-rectangle">cairo_rectangle ()</a> </dt> <dt>cairo_rectangle_int_t, <a class="indexterm" href="cairo-Types.html#cairo-rectangle-int-t">cairo_rectangle_int_t</a> diff --git a/doc/public/html/index.html b/doc/public/html/index.html index ba85107..8463e0e 100644 --- a/doc/public/html/index.html +++ b/doc/public/html/index.html @@ -14,7 +14,7 @@ <div class="titlepage"> <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Cairo: A Vector Graphics Library</p></th></tr></table></div> -<div><p class="releaseinfo">for Cairo 1.10.0 +<div><p class="releaseinfo">for Cairo 1.10.2 </p></div> </div> <hr> @@ -86,6 +86,9 @@ <span class="refentrytitle"><a href="cairo-PostScript-Surfaces.html">PostScript Surfaces</a></span><span class="refpurpose"> — Rendering PostScript documents</span> </dt> <dt> +<span class="refentrytitle"><a href="cairo-Recording-Surfaces.html">Recording Surfaces</a></span><span class="refpurpose"> — Records all drawing operations</span> +</dt> +<dt> <span class="refentrytitle"><a href="cairo-Win32-Surfaces.html">Win32 Surfaces</a></span><span class="refpurpose"> — Microsoft Windows surface support</span> </dt> <dt> diff --git a/doc/public/html/index.sgml b/doc/public/html/index.sgml index a77567d..c8e02fa 100644 --- a/doc/public/html/index.sgml +++ b/doc/public/html/index.sgml @@ -570,6 +570,14 @@ <ANCHOR id="cairo-ps-surface-dsc-begin-page-setup" href="cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-page-setup"> <ANCHOR id="cairo-ps-surface-dsc-comment" href="cairo/cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment"> <ANCHOR id="cairo-PostScript-Surfaces.see-also" href="cairo/cairo-PostScript-Surfaces.html#cairo-PostScript-Surfaces.see-also"> +<ANCHOR id="cairo-Recording-Surfaces" href="cairo/cairo-Recording-Surfaces.html"> +<ANCHOR id="cairo-Recording-Surfaces.synopsis" href="cairo/cairo-Recording-Surfaces.html#cairo-Recording-Surfaces.synopsis"> +<ANCHOR id="cairo-Recording-Surfaces.description" href="cairo/cairo-Recording-Surfaces.html#cairo-Recording-Surfaces.description"> +<ANCHOR id="cairo-Recording-Surfaces.details" href="cairo/cairo-Recording-Surfaces.html#cairo-Recording-Surfaces.details"> +<ANCHOR id="CAIRO-HAS-RECORDING-SURFACE:CAPS" href="cairo/cairo-Recording-Surfaces.html#CAIRO-HAS-RECORDING-SURFACE:CAPS"> +<ANCHOR id="cairo-recording-surface-create" href="cairo/cairo-Recording-Surfaces.html#cairo-recording-surface-create"> +<ANCHOR id="cairo-recording-surface-ink-extents" href="cairo/cairo-Recording-Surfaces.html#cairo-recording-surface-ink-extents"> +<ANCHOR id="cairo-Recording-Surfaces.see-also" href="cairo/cairo-Recording-Surfaces.html#cairo-Recording-Surfaces.see-also"> <ANCHOR id="cairo-Win32-Surfaces" href="cairo/cairo-Win32-Surfaces.html"> <ANCHOR id="cairo-Win32-Surfaces.synopsis" href="cairo/cairo-Win32-Surfaces.html#cairo-Win32-Surfaces.synopsis"> <ANCHOR id="cairo-Win32-Surfaces.description" href="cairo/cairo-Win32-Surfaces.html#cairo-Win32-Surfaces.description"> diff --git a/doc/public/tmpl/cairo-recording.sgml b/doc/public/tmpl/cairo-recording.sgml new file mode 100644 index 0000000..4fcf710 --- /dev/null +++ b/doc/public/tmpl/cairo-recording.sgml @@ -0,0 +1,53 @@ +<!-- ##### SECTION Title ##### --> +cairo-recording + +<!-- ##### SECTION Short_Description ##### --> + + +<!-- ##### SECTION Long_Description ##### --> +<para> + +</para> + + +<!-- ##### SECTION See_Also ##### --> +<para> + +</para> + + +<!-- ##### SECTION Stability_Level ##### --> + + +<!-- ##### SECTION Image ##### --> + + +<!-- ##### MACRO CAIRO_HAS_RECORDING_SURFACE ##### --> +<para> + +</para> + + + +<!-- ##### FUNCTION cairo_recording_surface_create ##### --> +<para> + +</para> + +@content: +@extents: +@Returns: + + +<!-- ##### FUNCTION cairo_recording_surface_ink_extents ##### --> +<para> + +</para> + +@surface: +@x0: +@y0: +@width: +@height: + + diff --git a/doc/public/tmpl/cairo-unused.sgml b/doc/public/tmpl/cairo-unused.sgml index e69de29..0bcdad8 100644 --- a/doc/public/tmpl/cairo-unused.sgml +++ b/doc/public/tmpl/cairo-unused.sgml @@ -0,0 +1,142 @@ +<!-- ##### SECTION ./tmpl/cairo-atsui.sgml:Long_Description ##### --> +<para> +The ATSUI font backend is primarily used to render text on Apple OS X systems. +</para> + + +<!-- ##### SECTION ./tmpl/cairo-atsui.sgml:See_Also ##### --> +<para> +<itemizedlist> +<listitem>#cairo_font_face_t</listitem> +</itemizedlist> +</para> + + +<!-- ##### SECTION ./tmpl/cairo-atsui.sgml:Short_Description ##### --> +Font support for ATSUI on OS X + + +<!-- ##### SECTION ./tmpl/cairo-atsui.sgml:Stability_Level ##### --> + + + +<!-- ##### SECTION ./tmpl/cairo-atsui.sgml:Title ##### --> +ATSUI Fonts + + +<!-- ##### SECTION ./tmpl/cairo-beos.sgml:Long_Description ##### --> +<para> +The BeOS surface is used to render cairo graphics to +BeOS views and bitmaps. +</para> + + +<!-- ##### SECTION ./tmpl/cairo-beos.sgml:See_Also ##### --> +<para> +<itemizedlist> +<listitem>#cairo_surface_t</listitem> +</itemizedlist> +</para> + + +<!-- ##### SECTION ./tmpl/cairo-beos.sgml:Short_Description ##### --> +BeOS surface support + + +<!-- ##### SECTION ./tmpl/cairo-beos.sgml:Stability_Level ##### --> + + + +<!-- ##### SECTION ./tmpl/cairo-beos.sgml:Title ##### --> +BeOS Surfaces + + +<!-- ##### SECTION ./tmpl/cairo-glitz.sgml:Long_Description ##### --> +<para> +The Glitz surface is used to render cairo graphics targeting the +OpenGL hardware using the Glitz library. +</para> + + +<!-- ##### SECTION ./tmpl/cairo-glitz.sgml:See_Also ##### --> +<para> +<itemizedlist> +<listitem>#cairo_surface_t</listitem> +</itemizedlist> +</para> + + +<!-- ##### SECTION ./tmpl/cairo-glitz.sgml:Short_Description ##### --> +OpenGL accelerated rendering using the Glitz library + + +<!-- ##### SECTION ./tmpl/cairo-glitz.sgml:Stability_Level ##### --> + + + +<!-- ##### SECTION ./tmpl/cairo-glitz.sgml:Title ##### --> +Glitz Surfaces + + +<!-- ##### SECTION ./tmpl/cairo-xcb-xrender.sgml:Long_Description ##### --> +<para> +The XCB surface is used to render cairo graphics to X Window System +windows and pixmaps using the XCB library and its X Render extension. +</para> +<para> +Note that the XCB surface automatically takes advantage of the X Render +extension if it is available. +</para> + + +<!-- ##### SECTION ./tmpl/cairo-xcb-xrender.sgml:See_Also ##### --> +<para> +<itemizedlist> +<listitem>#cairo_surface_t</listitem> +</itemizedlist> +</para> + + +<!-- ##### SECTION ./tmpl/cairo-xcb-xrender.sgml:Short_Description ##### --> +X Window System rendering using the XCB library and the X Render extension + + +<!-- ##### SECTION ./tmpl/cairo-xcb-xrender.sgml:Stability_Level ##### --> + + + +<!-- ##### SECTION ./tmpl/cairo-xcb-xrender.sgml:Title ##### --> +XCB Surfaces + + +<!-- ##### SECTION ./tmpl/cairo-xcb.sgml:Long_Description ##### --> +<para> +The XCB surface is used to render cairo graphics to X Window System +windows and pixmaps using the XCB library. +</para> +<para> +Note that the XCB surface automatically takes advantage of the X render +extension if it is available. +</para> + + +<!-- ##### SECTION ./tmpl/cairo-xcb.sgml:See_Also ##### --> +<para> +<itemizedlist> +<listitem>#cairo_surface_t</listitem> +</itemizedlist> +</para> + + +<!-- ##### SECTION ./tmpl/cairo-xcb.sgml:Short_Description ##### --> +X Window System rendering using the XCB library + + +<!-- ##### SECTION ./tmpl/cairo-xcb.sgml:Stability_Level ##### --> + + + +<!-- ##### SECTION ./tmpl/cairo-xcb.sgml:Title ##### --> +XCB Surfaces + + diff --git a/doc/public/version.xml b/doc/public/version.xml index 81c871d..5ad2491 100644 --- a/doc/public/version.xml +++ b/doc/public/version.xml @@ -1 +1 @@ -1.10.0 +1.10.2 diff --git a/doc/public/xml/api-index-1.10.xml b/doc/public/xml/api-index-1.10.xml index 86edc91..48f957d 100644 --- a/doc/public/xml/api-index-1.10.xml +++ b/doc/public/xml/api-index-1.10.xml @@ -19,6 +19,9 @@ <indexentry><primaryie linkends="cairo-device-t"><link linkend="cairo-device-t">cairo_device_t</link>, typedef in <link linkend="cairo-cairo-device-t">cairo_device_t</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-device-type-t"><link linkend="cairo-device-type-t">cairo_device_type_t</link>, enum in <link linkend="cairo-cairo-device-t">cairo_device_t</link></primaryie></indexentry> </indexdiv> +<indexdiv><title>H</title> +<indexentry><primaryie linkends="CAIRO-HAS-RECORDING-SURFACE:CAPS"><link linkend="CAIRO-HAS-RECORDING-SURFACE:CAPS">CAIRO_HAS_RECORDING_SURFACE</link>, macro in <link linkend="cairo-Recording-Surfaces">Recording Surfaces</link></primaryie></indexentry> +</indexdiv> <indexdiv><title>I</title> <indexentry><primaryie linkends="cairo-in-clip"><link linkend="cairo-in-clip">cairo_in_clip</link>, function in <link linkend="cairo-cairo-t">cairo_t</link></primaryie></indexentry> </indexdiv> @@ -28,6 +31,8 @@ <indexentry><primaryie linkends="cairo-pdf-version-to-string"><link linkend="cairo-pdf-version-to-string">cairo_pdf_version_to_string</link>, function in <link linkend="cairo-PDF-Surfaces">PDF Surfaces</link></primaryie></indexentry> </indexdiv> <indexdiv><title>R</title> +<indexentry><primaryie linkends="cairo-recording-surface-create"><link linkend="cairo-recording-surface-create">cairo_recording_surface_create</link>, function in <link linkend="cairo-Recording-Surfaces">Recording Surfaces</link></primaryie></indexentry> +<indexentry><primaryie linkends="cairo-recording-surface-ink-extents"><link linkend="cairo-recording-surface-ink-extents">cairo_recording_surface_ink_extents</link>, function in <link linkend="cairo-Recording-Surfaces">Recording Surfaces</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-rectangle-int-t"><link linkend="cairo-rectangle-int-t">cairo_rectangle_int_t</link>, struct in <link linkend="cairo-Types">Types</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-region-contains-point"><link linkend="cairo-region-contains-point">cairo_region_contains_point</link>, function in <link linkend="cairo-Regions">Regions</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-region-contains-rectangle"><link linkend="cairo-region-contains-rectangle">cairo_region_contains_rectangle</link>, function in <link linkend="cairo-Regions">Regions</link></primaryie></indexentry> diff --git a/doc/public/xml/api-index-full.xml b/doc/public/xml/api-index-full.xml index dc01b35..d48fa3f 100644 --- a/doc/public/xml/api-index-full.xml +++ b/doc/public/xml/api-index-full.xml @@ -130,6 +130,7 @@ <indexentry><primaryie linkends="CAIRO-HAS-PS-SURFACE:CAPS"><link linkend="CAIRO-HAS-PS-SURFACE:CAPS">CAIRO_HAS_PS_SURFACE</link>, macro in <link linkend="cairo-PostScript-Surfaces">PostScript Surfaces</link></primaryie></indexentry> <indexentry><primaryie linkends="CAIRO-HAS-QUARTZ-FONT:CAPS"><link linkend="CAIRO-HAS-QUARTZ-FONT:CAPS">CAIRO_HAS_QUARTZ_FONT</link>, macro in <link linkend="cairo-Quartz-(CGFont)-Fonts">Quartz (CGFont) Fonts</link></primaryie></indexentry> <indexentry><primaryie linkends="CAIRO-HAS-QUARTZ-SURFACE:CAPS"><link linkend="CAIRO-HAS-QUARTZ-SURFACE:CAPS">CAIRO_HAS_QUARTZ_SURFACE</link>, macro in <link linkend="cairo-Quartz-Surfaces">Quartz Surfaces</link></primaryie></indexentry> +<indexentry><primaryie linkends="CAIRO-HAS-RECORDING-SURFACE:CAPS"><link linkend="CAIRO-HAS-RECORDING-SURFACE:CAPS">CAIRO_HAS_RECORDING_SURFACE</link>, macro in <link linkend="cairo-Recording-Surfaces">Recording Surfaces</link></primaryie></indexentry> <indexentry><primaryie linkends="CAIRO-HAS-SVG-SURFACE:CAPS"><link linkend="CAIRO-HAS-SVG-SURFACE:CAPS">CAIRO_HAS_SVG_SURFACE</link>, macro in <link linkend="cairo-SVG-Surfaces">SVG Surfaces</link></primaryie></indexentry> <indexentry><primaryie linkends="CAIRO-HAS-USER-FONT:CAPS"><link linkend="CAIRO-HAS-USER-FONT:CAPS">CAIRO_HAS_USER_FONT</link>, macro in <link linkend="cairo-User-Fonts">User Fonts</link></primaryie></indexentry> <indexentry><primaryie linkends="CAIRO-HAS-WIN32-FONT:CAPS"><link linkend="CAIRO-HAS-WIN32-FONT:CAPS">CAIRO_HAS_WIN32_FONT</link>, macro in <link linkend="cairo-Win32-Fonts">Win32 Fonts</link></primaryie></indexentry> @@ -257,6 +258,8 @@ </indexdiv> <indexdiv><title>R</title> <indexentry><primaryie linkends="cairo-read-func-t"><link linkend="cairo-read-func-t">cairo_read_func_t</link>, user_function in <link linkend="cairo-PNG-Support">PNG Support</link></primaryie></indexentry> +<indexentry><primaryie linkends="cairo-recording-surface-create"><link linkend="cairo-recording-surface-create">cairo_recording_surface_create</link>, function in <link linkend="cairo-Recording-Surfaces">Recording Surfaces</link></primaryie></indexentry> +<indexentry><primaryie linkends="cairo-recording-surface-ink-extents"><link linkend="cairo-recording-surface-ink-extents">cairo_recording_surface_ink_extents</link>, function in <link linkend="cairo-Recording-Surfaces">Recording Surfaces</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-rectangle"><link linkend="cairo-rectangle">cairo_rectangle</link>, function in <link linkend="cairo-Paths">Paths</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-rectangle-int-t"><link linkend="cairo-rectangle-int-t">cairo_rectangle_int_t</link>, struct in <link linkend="cairo-Types">Types</link></primaryie></indexentry> <indexentry><primaryie linkends="cairo-rectangle-list-destroy"><link linkend="cairo-rectangle-list-destroy">cairo_rectangle_list_destroy</link>, function in <link linkend="cairo-cairo-t">cairo_t</link></primaryie></indexentry> diff --git a/doc/public/xml/cairo-device.xml b/doc/public/xml/cairo-device.xml index 0400492..0238777 100644 --- a/doc/public/xml/cairo-device.xml +++ b/doc/public/xml/cairo-device.xml @@ -223,7 +223,7 @@ This function may acquire devices. CAIRO_DEVICE_TYPE_SCRIPT, CAIRO_DEVICE_TYPE_XCB, CAIRO_DEVICE_TYPE_XLIB, - CAIRO_DEVICE_TYPE_XML, + CAIRO_DEVICE_TYPE_XML } cairo_device_type_t; </programlisting> <para> diff --git a/doc/public/xml/cairo-quartz-fonts.xml b/doc/public/xml/cairo-quartz-fonts.xml index 2bcf23f..5477cca 100644 --- a/doc/public/xml/cairo-quartz-fonts.xml +++ b/doc/public/xml/cairo-quartz-fonts.xml @@ -40,8 +40,7 @@ implementation of the font backend methods. <refsect2 id="CAIRO-HAS-QUARTZ-FONT:CAPS" role="macro"> <title>CAIRO_HAS_QUARTZ_FONT</title> <indexterm zone="CAIRO-HAS-QUARTZ-FONT:CAPS"><primary sortas="HAS_QUARTZ_FONT">CAIRO_HAS_QUARTZ_FONT</primary></indexterm> -<programlisting>#define CAIRO_HAS_QUARTZ_FONT 1 -</programlisting> +<programlisting>#define CAIRO_HAS_QUARTZ_FONT</programlisting> <para> Defined if the Quartz font backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/xml/cairo-quartz.xml b/doc/public/xml/cairo-quartz.xml index aa4c87a..ab1fc6b 100644 --- a/doc/public/xml/cairo-quartz.xml +++ b/doc/public/xml/cairo-quartz.xml @@ -43,8 +43,7 @@ Apple OS X Quartz rendering system. <refsect2 id="CAIRO-HAS-QUARTZ-SURFACE:CAPS" role="macro"> <title>CAIRO_HAS_QUARTZ_SURFACE</title> <indexterm zone="CAIRO-HAS-QUARTZ-SURFACE:CAPS"><primary sortas="HAS_QUARTZ_SURFACE">CAIRO_HAS_QUARTZ_SURFACE</primary></indexterm> -<programlisting>#define CAIRO_HAS_QUARTZ_SURFACE 1 -</programlisting> +<programlisting>#define CAIRO_HAS_QUARTZ_SURFACE</programlisting> <para> Defined if the Quartz surface backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/xml/cairo-recording.xml b/doc/public/xml/cairo-recording.xml new file mode 100644 index 0000000..64aa97d --- /dev/null +++ b/doc/public/xml/cairo-recording.xml @@ -0,0 +1,149 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "version.xml"> +]> +<refentry id="cairo-Recording-Surfaces"> +<refmeta> +<refentrytitle role="top_of_page" id="cairo-Recording-Surfaces.top_of_page">Recording Surfaces</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + CAIRO Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>Recording Surfaces</refname> +<refpurpose>Records all drawing operations</refpurpose> +</refnamediv> + +<refsynopsisdiv id="cairo-Recording-Surfaces.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis>#define <link linkend="CAIRO-HAS-RECORDING-SURFACE:CAPS">CAIRO_HAS_RECORDING_SURFACE</link> +<link linkend="cairo-surface-t"><returnvalue>cairo_surface_t</returnvalue></link> * <link linkend="cairo-recording-surface-create">cairo_recording_surface_create</link> (<parameter><link linkend="cairo-content-t"><type>cairo_content_t</type></link> content</parameter>, + <parameter>const <link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> *extents</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="cairo-recording-surface-ink-extents">cairo_recording_surface_ink_extents</link> (<parameter><link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> *surface</parameter>, + <parameter><link linkend="double"><type>double</type></link> *x0</parameter>, + <parameter><link linkend="double"><type>double</type></link> *y0</parameter>, + <parameter><link linkend="double"><type>double</type></link> *width</parameter>, + <parameter><link linkend="double"><type>double</type></link> *height</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="cairo-Recording-Surfaces.description" role="desc"> +<title role="desc.title">Description</title> +<para> +A recording surface is a surface that records all drawing operations at +the highest level of the surface backend interface, (that is, the +level of paint, mask, stroke, fill, and show_text_glyphs). The recording +surface can then be "replayed" against any target surface by using it +as a source surface. +</para> +<para> +If you want to replay a surface so that the results in target will be +identical to the results that would have been obtained if the original +operations applied to the recording surface had instead been applied to the +target surface, you can use code like this: +<informalexample><programlisting> + cairo_t *cr; + +cr = cairo_create (target); +cairo_set_source_surface (cr, recording_surface, 0.0, 0.0); +cairo_paint (cr); +cairo_destroy (cr); +</programlisting></informalexample> +</para> +<para> +A recording surface is logically unbounded, i.e. it has no implicit constraint +on the size of the drawing surface. However, in practice this is rarely +useful as you wish to replay against a particular target surface with +known bounds. For this case, it is more efficient to specify the target +extents to the recording surface upon creation. +</para> +<para> +The recording phase of the recording surface is careful to snapshot all +necessary objects (paths, patterns, etc.), in order to achieve +accurate replay. The efficiency of the recording surface could be +improved by improving the implementation of snapshot for the +various objects. For example, it would be nice to have a +copy-on-write implementation for _cairo_surface_snapshot. +</para> +</refsect1> +<refsect1 id="cairo-Recording-Surfaces.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="CAIRO-HAS-RECORDING-SURFACE:CAPS" role="macro" condition="since:1.10"> +<title>CAIRO_HAS_RECORDING_SURFACE</title> +<indexterm zone="CAIRO-HAS-RECORDING-SURFACE:CAPS" role="1.10"><primary sortas="HAS_RECORDING_SURFACE">CAIRO_HAS_RECORDING_SURFACE</primary></indexterm> +<programlisting>#define CAIRO_HAS_RECORDING_SURFACE 1 +</programlisting> +<para> +Defined if the recording surface backend is available. +The recording surface backend is always built in. +This macro was added for completeness in cairo 1.10. +</para><para role="since">Since 1.10</para></refsect2> +<refsect2 id="cairo-recording-surface-create" role="function" condition="since:1.10"> +<title>cairo_recording_surface_create ()</title> +<indexterm zone="cairo-recording-surface-create" role="1.10"><primary sortas="recording_surface_create">cairo_recording_surface_create</primary></indexterm> +<programlisting><link linkend="cairo-surface-t"><returnvalue>cairo_surface_t</returnvalue></link> * cairo_recording_surface_create (<parameter><link linkend="cairo-content-t"><type>cairo_content_t</type></link> content</parameter>, + <parameter>const <link linkend="cairo-rectangle-t"><type>cairo_rectangle_t</type></link> *extents</parameter>);</programlisting> +<para> +Creates a recording-surface which can be used to record all drawing operations +at the highest level (that is, the level of paint, mask, stroke, fill +and show_text_glyphs). The recording surface can then be "replayed" against +any target surface by using it as a source to drawing operations. +</para> +<para> +The recording phase of the recording surface is careful to snapshot all +necessary objects (paths, patterns, etc.), in order to achieve +accurate replay. +</para><variablelist role="params"> +<varlistentry><term><parameter>content</parameter> :</term> +<listitem><simpara>the content of the recording surface +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>extents</parameter> :</term> +<listitem><simpara>the extents to record in pixels, can be <link linkend="NULL:CAPS"><literal>NULL</literal></link> to record + unbounded operations. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a pointer to the newly created surface. The caller +owns the surface and should call <link linkend="cairo-surface-destroy"><function>cairo_surface_destroy()</function></link> when done +with it. + +</simpara></listitem></varlistentry> +</variablelist><para role="since">Since 1.10</para></refsect2> +<refsect2 id="cairo-recording-surface-ink-extents" role="function" condition="since:1.10"> +<title>cairo_recording_surface_ink_extents ()</title> +<indexterm zone="cairo-recording-surface-ink-extents" role="1.10"><primary sortas="recording_surface_ink_extents">cairo_recording_surface_ink_extents</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> cairo_recording_surface_ink_extents (<parameter><link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> *surface</parameter>, + <parameter><link linkend="double"><type>double</type></link> *x0</parameter>, + <parameter><link linkend="double"><type>double</type></link> *y0</parameter>, + <parameter><link linkend="double"><type>double</type></link> *width</parameter>, + <parameter><link linkend="double"><type>double</type></link> *height</parameter>);</programlisting> +<para> +Measures the extents of the operations stored within the recording-surface. +This is useful to compute the required size of an image surface (or +equivalent) into which to replay the full sequence of drawing operations. +</para><variablelist role="params"> +<varlistentry><term><parameter>surface</parameter> :</term> +<listitem><simpara>a <link linkend="cairo-recording-surface-t"><type>cairo_recording_surface_t</type></link> +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>x0</parameter> :</term> +<listitem><simpara>the x-coordinate of the top-left of the ink bounding box +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>y0</parameter> :</term> +<listitem><simpara>the y-coordinate of the top-left of the ink bounding box +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>width</parameter> :</term> +<listitem><simpara>the width of the ink bounding box +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>height</parameter> :</term> +<listitem><simpara>the height of the ink bounding box +</simpara></listitem></varlistentry> +</variablelist><para role="since">Since 1.10</para></refsect2> + +</refsect1> +<refsect1 id="cairo-Recording-Surfaces.see-also"> +<title>See Also</title> +<link linkend="cairo-surface-t"><type>cairo_surface_t</type></link> +</refsect1> + +</refentry> diff --git a/doc/public/xml/cairo-win32-fonts.xml b/doc/public/xml/cairo-win32-fonts.xml index 3076a3c..c75595d 100644 --- a/doc/public/xml/cairo-win32-fonts.xml +++ b/doc/public/xml/cairo-win32-fonts.xml @@ -53,8 +53,7 @@ Microsoft Windows systems. <refsect2 id="CAIRO-HAS-WIN32-FONT:CAPS" role="macro"> <title>CAIRO_HAS_WIN32_FONT</title> <indexterm zone="CAIRO-HAS-WIN32-FONT:CAPS"><primary sortas="HAS_WIN32_FONT">CAIRO_HAS_WIN32_FONT</primary></indexterm> -<programlisting>#define CAIRO_HAS_WIN32_FONT 1 -</programlisting> +<programlisting>#define CAIRO_HAS_WIN32_FONT</programlisting> <para> Defined if the Microsoft Windows font backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/xml/cairo-win32.xml b/doc/public/xml/cairo-win32.xml index 636f51e..2933eec 100644 --- a/doc/public/xml/cairo-win32.xml +++ b/doc/public/xml/cairo-win32.xml @@ -55,8 +55,7 @@ The surface returned by the other win32 constructors is of surface type <refsect2 id="CAIRO-HAS-WIN32-SURFACE:CAPS" role="macro"> <title>CAIRO_HAS_WIN32_SURFACE</title> <indexterm zone="CAIRO-HAS-WIN32-SURFACE:CAPS"><primary sortas="HAS_WIN32_SURFACE">CAIRO_HAS_WIN32_SURFACE</primary></indexterm> -<programlisting>#define CAIRO_HAS_WIN32_SURFACE 1 -</programlisting> +<programlisting>#define CAIRO_HAS_WIN32_SURFACE</programlisting> <para> Defined if the Microsoft Windows surface backend is available. This macro can be used to conditionally compile backend-specific code. diff --git a/doc/public/xml/cairo.xml b/doc/public/xml/cairo.xml index 61c50d6..3860239 100644 --- a/doc/public/xml/cairo.xml +++ b/doc/public/xml/cairo.xml @@ -588,7 +588,7 @@ and setting it as the source in <parameter>cr</parameter> with <link linkend="ca The <parameter>x</parameter> and <parameter>y</parameter> parameters give the user-space coordinate at which the surface origin should appear. (The surface origin is its upper-left corner before any transformation has been applied.) The -<parameter>x</parameter> and <parameter>y</parameter> patterns are negated and then set as translation values +<parameter>x</parameter> and <parameter>y</parameter> parameters are negated and then set as translation values in the pattern matrix. </para> <para> |