cairo 1.15.3-x86-mingw32 → 1.15.4-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS +24 -0
  3. data/Rakefile +3 -3
  4. data/ext/cairo/rb_cairo.h +11 -1
  5. data/ext/cairo/rb_cairo_constants.c +56 -1
  6. data/ext/cairo/rb_cairo_context.c +100 -1
  7. data/ext/cairo/rb_cairo_exception.c +45 -0
  8. data/ext/cairo/rb_cairo_surface.c +126 -1
  9. data/lib/2.2/cairo.so +0 -0
  10. data/lib/2.3/cairo.so +0 -0
  11. data/lib/2.4/cairo.so +0 -0
  12. data/lib/cairo.rb +2 -0
  13. data/samples/link.rb +19 -0
  14. data/test/cairo-test-utils.rb +1 -0
  15. data/test/test_context.rb +22 -0
  16. data/test/test_pdf_surface.rb +131 -0
  17. data/vendor/local/bin/fc-cache.exe +0 -0
  18. data/vendor/local/bin/fc-cat.exe +0 -0
  19. data/vendor/local/bin/fc-list.exe +0 -0
  20. data/vendor/local/bin/fc-match.exe +0 -0
  21. data/vendor/local/bin/fc-pattern.exe +0 -0
  22. data/vendor/local/bin/fc-query.exe +0 -0
  23. data/vendor/local/bin/fc-scan.exe +0 -0
  24. data/vendor/local/bin/fc-validate.exe +0 -0
  25. data/vendor/local/bin/libcairo-2.dll +0 -0
  26. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  27. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  28. data/vendor/local/bin/libfontconfig-1.dll +0 -0
  29. data/vendor/local/bin/libfreetype-6.dll +0 -0
  30. data/vendor/local/bin/libpixman-1-0.dll +0 -0
  31. data/vendor/local/bin/libpng-config +1 -1
  32. data/vendor/local/bin/libpng16-16.dll +0 -0
  33. data/vendor/local/bin/libpng16-config +1 -1
  34. data/vendor/local/bin/libxml2-2.dll +0 -0
  35. data/vendor/local/bin/png-fix-itxt.exe +0 -0
  36. data/vendor/local/bin/pngfix.exe +0 -0
  37. data/vendor/local/bin/xmlcatalog.exe +0 -0
  38. data/vendor/local/bin/xmllint.exe +0 -0
  39. data/vendor/local/bin/zlib1.dll +0 -0
  40. data/vendor/local/include/cairo/cairo-pdf.h +68 -0
  41. data/vendor/local/include/cairo/cairo-version.h +1 -1
  42. data/vendor/local/include/cairo/cairo.h +19 -0
  43. data/vendor/local/include/libpng16/png.h +13 -12
  44. data/vendor/local/include/libpng16/pngconf.h +1 -1
  45. data/vendor/local/include/libpng16/pnglibconf.h +1 -1
  46. data/vendor/local/include/png.h +13 -12
  47. data/vendor/local/include/pngconf.h +1 -1
  48. data/vendor/local/include/pnglibconf.h +1 -1
  49. data/vendor/local/lib/libcairo-gobject.a +0 -0
  50. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  51. data/vendor/local/lib/libcairo-gobject.la +2 -2
  52. data/vendor/local/lib/libcairo-script-interpreter.a +0 -0
  53. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  54. data/vendor/local/lib/libcairo-script-interpreter.la +2 -2
  55. data/vendor/local/lib/libcairo.a +0 -0
  56. data/vendor/local/lib/libcairo.dll.a +0 -0
  57. data/vendor/local/lib/libcairo.la +2 -2
  58. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  59. data/vendor/local/lib/libfreetype.a +0 -0
  60. data/vendor/local/lib/libfreetype.dll.a +0 -0
  61. data/vendor/local/lib/libpixman-1.dll.a +0 -0
  62. data/vendor/local/lib/libpng.a +0 -0
  63. data/vendor/local/lib/libpng.dll.a +0 -0
  64. data/vendor/local/lib/libpng.la +2 -2
  65. data/vendor/local/lib/libpng16.a +0 -0
  66. data/vendor/local/lib/libpng16.dll.a +0 -0
  67. data/vendor/local/lib/libpng16.la +2 -2
  68. data/vendor/local/lib/libxml2.dll.a +0 -0
  69. data/vendor/local/lib/libz.dll.a +0 -0
  70. data/vendor/local/lib/pkgconfig/cairo-fc.pc +1 -1
  71. data/vendor/local/lib/pkgconfig/cairo-ft.pc +1 -1
  72. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +1 -1
  73. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +1 -1
  74. data/vendor/local/lib/pkgconfig/cairo-png.pc +1 -1
  75. data/vendor/local/lib/pkgconfig/cairo-ps.pc +1 -1
  76. data/vendor/local/lib/pkgconfig/cairo-script.pc +2 -2
  77. data/vendor/local/lib/pkgconfig/cairo-svg.pc +1 -1
  78. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +1 -1
  79. data/vendor/local/lib/pkgconfig/cairo-win32.pc +1 -1
  80. data/vendor/local/lib/pkgconfig/cairo.pc +2 -2
  81. data/vendor/local/lib/pkgconfig/libpng.pc +1 -1
  82. data/vendor/local/lib/pkgconfig/libpng16.pc +1 -1
  83. data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +30 -2
  84. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +1 -1
  85. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +1 -1
  86. data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +343 -4
  87. data/vendor/local/share/gtk-doc/html/cairo/cairo-PNG-Support.html +8 -4
  88. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +3 -3
  89. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +6 -6
  90. data/vendor/local/share/gtk-doc/html/cairo/cairo-Raster-Sources.html +2 -2
  91. data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +3 -3
  92. data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +10 -10
  93. data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +3 -3
  94. data/vendor/local/share/gtk-doc/html/cairo/cairo-Tags-and-Links.html +415 -0
  95. data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +14 -14
  96. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +1 -1
  97. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +5 -5
  98. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +1 -1
  99. data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-XRender-Backend.html +1 -1
  100. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +5 -5
  101. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +6 -6
  102. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +2 -2
  103. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +35 -35
  104. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +14 -14
  105. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +14 -14
  106. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +10 -10
  107. data/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +3 -0
  108. data/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +2 -2
  109. data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +11 -11
  110. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +15 -0
  111. data/vendor/local/share/gtk-doc/html/cairo/index-all.html +22 -0
  112. data/vendor/local/share/gtk-doc/html/cairo/index.html +4 -1
  113. data/vendor/local/share/gtk-doc/html/cairo/index.sgml +22 -0
  114. data/vendor/local/share/license/libpng/README +1 -1
  115. data/vendor/local/share/man/man3/libpng.3 +9 -9
  116. data/vendor/local/share/man/man3/libpngpf.3 +2 -2
  117. data/vendor/local/share/man/man5/png.5 +1 -1
  118. metadata +9 -3
@@ -152,7 +152,8 @@ surface can be checked for with cairo_surface_status(surface) which
152
152
  may return one of the following values:</p>
153
153
  <p><a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
154
154
  <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-FILE-NOT-FOUND:CAPS"><code class="literal">CAIRO_STATUS_FILE_NOT_FOUND</code></a>
155
- <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a></p>
155
+ <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>
156
+ <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PNG-ERROR:CAPS"><code class="literal">CAIRO_STATUS_PNG_ERROR</code></a></p>
156
157
  <p>Alternatively, you can allow errors to propagate through the drawing
157
158
  operations and check the status on the context upon completion
158
159
  using <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</p>
@@ -249,7 +250,8 @@ or memory could not be allocated for the operation. A nil
249
250
  surface can be checked for with cairo_surface_status(surface) which
250
251
  may return one of the following values:</p>
251
252
  <p><a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>
252
- <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a></p>
253
+ <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>
254
+ <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PNG-ERROR:CAPS"><code class="literal">CAIRO_STATUS_PNG_ERROR</code></a></p>
253
255
  <p>Alternatively, you can allow errors to propagate through the drawing
254
256
  operations and check the status on the context upon completion
255
257
  using <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a>.</p>
@@ -296,7 +298,8 @@ successfully. Otherwise, <a class="link" href="cairo-Error-handling.html#CAIRO-S
296
298
  be allocated for the operation or
297
299
  <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></a> if the surface does not have
298
300
  pixel contents, or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-WRITE-ERROR:CAPS"><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></a> if an I/O error occurs
299
- while attempting to write the file.</p>
301
+ while attempting to write the file, or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PNG-ERROR:CAPS"><code class="literal">CAIRO_STATUS_PNG_ERROR</code></a> if libpng
302
+ returned an error.</p>
300
303
  <p></p>
301
304
  </div>
302
305
  <p class="since">Since 1.0</p>
@@ -390,7 +393,8 @@ cairo_surface_write_to_png_stream (<em class="parameter"><code><a class="link" h
390
393
  successfully. Otherwise, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> is returned if
391
394
  memory could not be allocated for the operation,
392
395
  <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></a> if the surface does not have
393
- pixel contents.</p>
396
+ pixel contents, or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PNG-ERROR:CAPS"><code class="literal">CAIRO_STATUS_PNG_ERROR</code></a> if libpng
397
+ returned an error.</p>
394
398
  <p></p>
395
399
  </div>
396
400
  <p class="since">Since 1.0</p>
@@ -254,7 +254,7 @@ cairo_copy_path (<em class="parameter"><code><a class="link" href="cairo-cairo-t
254
254
  <a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-Paths.html#cairo-path-data-t" title="union cairo_path_data_t"><span class="type">cairo_path_data_t</span></a> for hints on how to iterate
255
255
  over the returned data structure.</p>
256
256
  <p>This function will always return a valid pointer, but the result
257
- will have no data (<code class="literal">data==<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></code> and
257
+ will have no data (<code class="literal">data==<code class="literal">NULL</code></code> and
258
258
  <code class="literal">num_data==0</code>), if either of the following
259
259
  conditions hold:</p>
260
260
  <div class="orderedlist"><ol class="orderedlist" type="1">
@@ -304,7 +304,7 @@ value). That is, the result is guaranteed to not have any elements
304
304
  of type <a class="link" href="cairo-Paths.html#CAIRO-PATH-CURVE-TO:CAPS"><code class="literal">CAIRO_PATH_CURVE_TO</code></a> which will instead be replaced by a
305
305
  series of <a class="link" href="cairo-Paths.html#CAIRO-PATH-LINE-TO:CAPS"><code class="literal">CAIRO_PATH_LINE_TO</code></a> elements.</p>
306
306
  <p>This function will always return a valid pointer, but the result
307
- will have no data (<code class="literal">data==<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></code> and
307
+ will have no data (<code class="literal">data==<code class="literal">NULL</code></code> and
308
308
  <code class="literal">num_data==0</code>), if either of the following
309
309
  conditions hold:</p>
310
310
  <div class="orderedlist"><ol class="orderedlist" type="1">
@@ -1060,7 +1060,7 @@ serious text-using applications. See <a class="link" href="cairo-Paths.html#cair
1060
1060
  </tr>
1061
1061
  <tr>
1062
1062
  <td class="parameter_name"><p>utf8</p></td>
1063
- <td class="parameter_description"><p>a NUL-terminated string of text encoded in UTF-8, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
1063
+ <td class="parameter_description"><p>a NUL-terminated string of text encoded in UTF-8, or <code class="literal">NULL</code></p></td>
1064
1064
  <td class="parameter_annotations"> </td>
1065
1065
  </tr>
1066
1066
  </tbody>
@@ -185,7 +185,7 @@ vary. See <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-surface-
185
185
  <tbody>
186
186
  <tr>
187
187
  <td class="parameter_name"><p>filename</p></td>
188
- <td class="parameter_description"><p>a filename for the PS output (must be writable), <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> may be
188
+ <td class="parameter_description"><p>a filename for the PS output (must be writable), <code class="literal">NULL</code> may be
189
189
  used to specify no output. This will generate a PS surface that
190
190
  may be queried and used as a source, without generating a
191
191
  temporary file.</p></td>
@@ -243,7 +243,7 @@ output can vary. See <a class="link" href="cairo-PostScript-Surfaces.html#cairo-
243
243
  <tbody>
244
244
  <tr>
245
245
  <td class="parameter_name"><p>write_func</p></td>
246
- <td class="parameter_description"><p>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
246
+ <td class="parameter_description"><p>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <code class="literal">NULL</code>
247
247
  to indicate a no-op <em class="parameter"><code>write_func</code></em>
248
248
  . With a no-op <em class="parameter"><code>write_func</code></em>
249
249
  ,
@@ -359,7 +359,7 @@ cairo_ps_get_levels (<em class="parameter"><code><a class="link" href="cairo-Pos
359
359
  cairo_ps_level_to_string (<em class="parameter"><code><a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-level-t" title="enum cairo_ps_level_t"><span class="type">cairo_ps_level_t</span></a> level</code></em>);</pre>
360
360
  <p>Get the string representation of the given <em class="parameter"><code>level</code></em>
361
361
  id. This function
362
- will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>level</code></em>
362
+ will return <code class="literal">NULL</code> if <em class="parameter"><code>level</code></em>
363
363
  id isn't valid. See <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-get-levels" title="cairo_ps_get_levels ()"><code class="function">cairo_ps_get_levels()</code></a>
364
364
  for a way to get the list of valid level ids.</p>
365
365
  <div class="refsect3">
@@ -391,7 +391,7 @@ for a way to get the list of valid level ids.</p>
391
391
  cairo_ps_surface_set_eps (<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>,
392
392
  <em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="type">cairo_bool_t</span></a> eps</code></em>);</pre>
393
393
  <p>If <em class="parameter"><code>eps</code></em>
394
- is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the PostScript surface will output Encapsulated
394
+ is <code class="literal">TRUE</code>, the PostScript surface will output Encapsulated
395
395
  PostScript.</p>
396
396
  <p>This function should only be called before any drawing operations
397
397
  have been performed on the current page. The simplest way to do
@@ -414,7 +414,7 @@ than one page.</p>
414
414
  </tr>
415
415
  <tr>
416
416
  <td class="parameter_name"><p>eps</p></td>
417
- <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to output EPS format PostScript</p></td>
417
+ <td class="parameter_description"><p><code class="literal">TRUE</code> to output EPS format PostScript</p></td>
418
418
  <td class="parameter_annotations"> </td>
419
419
  </tr>
420
420
  </tbody>
@@ -445,7 +445,7 @@ cairo_ps_surface_get_eps (<em class="parameter"><code><a class="link" href="cair
445
445
  </div>
446
446
  <div class="refsect3">
447
447
  <a name="id-1.5.7.7.8.6"></a><h4>Returns</h4>
448
- <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the surface will output Encapsulated PostScript.</p>
448
+ <p> <code class="literal">TRUE</code> if the surface will output Encapsulated PostScript.</p>
449
449
  <p></p>
450
450
  </div>
451
451
  <p class="since">Since 1.6</p>
@@ -7,7 +7,7 @@
7
7
  <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
8
  <link rel="up" href="cairo-drawing.html" title="Drawing">
9
9
  <link rel="prev" href="cairo-text.html" title="text">
10
- <link rel="next" href="cairo-fonts.html" title="Fonts">
10
+ <link rel="next" href="cairo-Tags-and-Links.html" title="Tags and Links">
11
11
  <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12
12
  <link rel="stylesheet" href="style.css" type="text/css">
13
13
  </head>
@@ -21,7 +21,7 @@
21
21
  <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22
22
  <td><a accesskey="u" href="cairo-drawing.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23
23
  <td><a accesskey="p" href="cairo-text.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24
- <td><a accesskey="n" href="cairo-fonts.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24
+ <td><a accesskey="n" href="cairo-Tags-and-Links.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25
25
  </tr></table>
26
26
  <div class="refentry">
27
27
  <a name="cairo-Raster-Sources"></a><div class="titlepage"></div>
@@ -146,7 +146,7 @@ accurate replay.</p>
146
146
  </tr>
147
147
  <tr>
148
148
  <td class="parameter_name"><p>extents</p></td>
149
- <td class="parameter_description"><p>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
149
+ <td class="parameter_description"><p>the extents to record in pixels, can be <code class="literal">NULL</code> to record
150
150
  unbounded operations.</p></td>
151
151
  <td class="parameter_annotations"> </td>
152
152
  </tr>
@@ -244,8 +244,8 @@ cairo_recording_surface_get_extents (<em class="parameter"><code><a class="link"
244
244
  </div>
245
245
  <div class="refsect3">
246
246
  <a name="id-1.5.8.7.4.6"></a><h4>Returns</h4>
247
- <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the surface is bounded, of recording type, and
248
- not in an error state, otherwise <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
247
+ <p> <code class="literal">TRUE</code> if the surface is bounded, of recording type, and
248
+ not in an error state, otherwise <code class="literal">FALSE</code></p>
249
249
  <p></p>
250
250
  </div>
251
251
  <p class="since">Since 1.12</p>
@@ -594,8 +594,8 @@ cairo_region_is_empty (<em class="parameter"><code>const <a class="link" href="c
594
594
  </div>
595
595
  <div class="refsect3">
596
596
  <a name="id-1.3.5.7.12.6"></a><h4>Returns</h4>
597
- <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>region</code></em>
598
- is empty, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it isn't.</p>
597
+ <p> <code class="literal">TRUE</code> if <em class="parameter"><code>region</code></em>
598
+ is empty, <code class="literal">FALSE</code> if it isn't.</p>
599
599
  <p></p>
600
600
  </div>
601
601
  <p class="since">Since 1.10</p>
@@ -640,10 +640,10 @@ cairo_region_contains_point (<em class="parameter"><code>const <a class="link" h
640
640
  </div>
641
641
  <div class="refsect3">
642
642
  <a name="id-1.3.5.7.13.6"></a><h4>Returns</h4>
643
- <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if (<em class="parameter"><code>x</code></em>
643
+ <p> <code class="literal">TRUE</code> if (<em class="parameter"><code>x</code></em>
644
644
  , <em class="parameter"><code>y</code></em>
645
645
  ) is contained in <em class="parameter"><code>region</code></em>
646
- , <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not.</p>
646
+ , <code class="literal">FALSE</code> if it is not.</p>
647
647
  <p></p>
648
648
  </div>
649
649
  <p class="since">Since 1.10</p>
@@ -701,8 +701,8 @@ is partially inside and partially outside <em class="parameter"><code>region</co
701
701
  <pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a>
702
702
  cairo_region_equal (<em class="parameter"><code>const <a class="link" href="cairo-Regions.html#cairo-region-t" title="cairo_region_t"><span class="type">cairo_region_t</span></a> *a</code></em>,
703
703
  <em class="parameter"><code>const <a class="link" href="cairo-Regions.html#cairo-region-t" title="cairo_region_t"><span class="type">cairo_region_t</span></a> *b</code></em>);</pre>
704
- <p>Compares whether region_a is equivalent to region_b. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> as an argument
705
- is equal to itself, but not to any non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> region.</p>
704
+ <p>Compares whether region_a is equivalent to region_b. <code class="literal">NULL</code> as an argument
705
+ is equal to itself, but not to any non-<code class="literal">NULL</code> region.</p>
706
706
  <div class="refsect3">
707
707
  <a name="id-1.3.5.7.15.5"></a><h4>Parameters</h4>
708
708
  <div class="informaltable"><table width="100%" border="0">
@@ -714,12 +714,12 @@ is equal to itself, but not to any non-<a href="http://library.gnome.org/devel/g
714
714
  <tbody>
715
715
  <tr>
716
716
  <td class="parameter_name"><p>a</p></td>
717
- <td class="parameter_description"><p>a <a class="link" href="cairo-Regions.html#cairo-region-t" title="cairo_region_t"><span class="type">cairo_region_t</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
717
+ <td class="parameter_description"><p>a <a class="link" href="cairo-Regions.html#cairo-region-t" title="cairo_region_t"><span class="type">cairo_region_t</span></a> or <code class="literal">NULL</code></p></td>
718
718
  <td class="parameter_annotations"> </td>
719
719
  </tr>
720
720
  <tr>
721
721
  <td class="parameter_name"><p>b</p></td>
722
- <td class="parameter_description"><p>a <a class="link" href="cairo-Regions.html#cairo-region-t" title="cairo_region_t"><span class="type">cairo_region_t</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
722
+ <td class="parameter_description"><p>a <a class="link" href="cairo-Regions.html#cairo-region-t" title="cairo_region_t"><span class="type">cairo_region_t</span></a> or <code class="literal">NULL</code></p></td>
723
723
  <td class="parameter_annotations"> </td>
724
724
  </tr>
725
725
  </tbody>
@@ -727,8 +727,8 @@ is equal to itself, but not to any non-<a href="http://library.gnome.org/devel/g
727
727
  </div>
728
728
  <div class="refsect3">
729
729
  <a name="id-1.3.5.7.15.6"></a><h4>Returns</h4>
730
- <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if both regions contained the same coverage,
731
- <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it is not or any region is in an error status.</p>
730
+ <p> <code class="literal">TRUE</code> if both regions contained the same coverage,
731
+ <code class="literal">FALSE</code> if it is not or any region is in an error status.</p>
732
732
  <p></p>
733
733
  </div>
734
734
  <p class="since">Since 1.10</p>
@@ -146,7 +146,7 @@ Base64-encoded and emitted.</p>
146
146
  <tbody>
147
147
  <tr>
148
148
  <td class="parameter_name"><p>filename</p></td>
149
- <td class="parameter_description"><p>a filename for the SVG output (must be writable), <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> may be
149
+ <td class="parameter_description"><p>a filename for the SVG output (must be writable), <code class="literal">NULL</code> may be
150
150
  used to specify no output. This will generate a SVG surface that
151
151
  may be queried and used as a source, without generating a
152
152
  temporary file.</p></td>
@@ -200,7 +200,7 @@ incrementally to the stream represented by <em class="parameter"><code>write_fun
200
200
  <tbody>
201
201
  <tr>
202
202
  <td class="parameter_name"><p>write_func</p></td>
203
- <td class="parameter_description"><p>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
203
+ <td class="parameter_description"><p>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <code class="literal">NULL</code>
204
204
  to indicate a no-op <em class="parameter"><code>write_func</code></em>
205
205
  . With a no-op <em class="parameter"><code>write_func</code></em>
206
206
  ,
@@ -315,7 +315,7 @@ cairo_svg_get_versions (<em class="parameter"><code><a class="link" href="cairo-
315
315
  cairo_svg_version_to_string (<em class="parameter"><code><a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t" title="enum cairo_svg_version_t"><span class="type">cairo_svg_version_t</span></a> version</code></em>);</pre>
316
316
  <p>Get the string representation of the given <em class="parameter"><code>version</code></em>
317
317
  id. This function
318
- will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>version</code></em>
318
+ will return <code class="literal">NULL</code> if <em class="parameter"><code>version</code></em>
319
319
  isn't valid. See <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-get-versions" title="cairo_svg_get_versions ()"><code class="function">cairo_svg_get_versions()</code></a>
320
320
  for a way to get the list of valid version ids.</p>
321
321
  <div class="refsect3">
@@ -0,0 +1,415 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>Cairo: A Vector Graphics Library: Tags and Links</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
+ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="cairo-drawing.html" title="Drawing">
9
+ <link rel="prev" href="cairo-Raster-Sources.html" title="Raster Sources">
10
+ <link rel="next" href="cairo-fonts.html" title="Fonts">
11
+ <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ </head>
14
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16
+ <td width="100%" align="left" class="shortcuts">
17
+ <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
18
+ <a href="#cairo-Tags-and-Links.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
19
+ <a href="#cairo-Tags-and-Links.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20
+ </td>
21
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22
+ <td><a accesskey="u" href="cairo-drawing.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23
+ <td><a accesskey="p" href="cairo-Raster-Sources.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24
+ <td><a accesskey="n" href="cairo-fonts.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25
+ </tr></table>
26
+ <div class="refentry">
27
+ <a name="cairo-Tags-and-Links"></a><div class="titlepage"></div>
28
+ <div class="refnamediv"><table width="100%"><tr>
29
+ <td valign="top">
30
+ <h2><span class="refentrytitle"><a name="cairo-Tags-and-Links.top_of_page"></a>Tags and Links</span></h2>
31
+ <p>Tags and Links — Hyperlinks and document structure</p>
32
+ </td>
33
+ <td class="gallery_image" valign="top" align="right"></td>
34
+ </tr></table></div>
35
+ <div class="refsect1">
36
+ <a name="cairo-Tags-and-Links.functions"></a><h2>Functions</h2>
37
+ <div class="informaltable"><table width="100%" border="0">
38
+ <colgroup>
39
+ <col width="150px" class="functions_return">
40
+ <col class="functions_name">
41
+ </colgroup>
42
+ <tbody>
43
+ <tr>
44
+ <td class="function_type">
45
+ <span class="returnvalue">void</span>
46
+ </td>
47
+ <td class="function_name">
48
+ <a class="link" href="cairo-Tags-and-Links.html#cairo-tag-begin" title="cairo_tag_begin ()">cairo_tag_begin</a> <span class="c_punctuation">()</span>
49
+ </td>
50
+ </tr>
51
+ <tr>
52
+ <td class="function_type">
53
+ <span class="returnvalue">void</span>
54
+ </td>
55
+ <td class="function_name">
56
+ <a class="link" href="cairo-Tags-and-Links.html#cairo-tag-end" title="cairo_tag_end ()">cairo_tag_end</a> <span class="c_punctuation">()</span>
57
+ </td>
58
+ </tr>
59
+ </tbody>
60
+ </table></div>
61
+ </div>
62
+ <div class="refsect1">
63
+ <a name="cairo-Tags-and-Links.other"></a><h2>Types and Values</h2>
64
+ <div class="informaltable"><table width="100%" border="0">
65
+ <colgroup>
66
+ <col width="150px" class="name">
67
+ <col class="description">
68
+ </colgroup>
69
+ <tbody>
70
+ <tr>
71
+ <td class="define_keyword">#define</td>
72
+ <td class="function_name"><a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-DEST:CAPS" title="CAIRO_TAG_DEST">CAIRO_TAG_DEST</a></td>
73
+ </tr>
74
+ <tr>
75
+ <td class="define_keyword">#define</td>
76
+ <td class="function_name"><a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-LINK:CAPS" title="CAIRO_TAG_LINK">CAIRO_TAG_LINK</a></td>
77
+ </tr>
78
+ </tbody>
79
+ </table></div>
80
+ </div>
81
+ <div class="refsect1">
82
+ <a name="cairo-Tags-and-Links.object-hierarchy"></a><h2>Object Hierarchy</h2>
83
+ <pre class="screen">
84
+ </pre>
85
+ </div>
86
+ <div class="refsect1">
87
+ <a name="cairo-Tags-and-Links.description"></a><h2>Description</h2>
88
+ <p>The tag functions provide the ability to specify hyperlinks and
89
+ document logical structure on supported backends. The following tags are supported:</p>
90
+ <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
91
+ <li class="listitem"><p><a class="link" href="cairo-Tags-and-Links.html#link" title="Link Tags">Link</a> - Create a hyperlink</p></li>
92
+ <li class="listitem"><p><a class="link" href="cairo-Tags-and-Links.html#dest" title="Destination Tags">Destinations</a> - Create a hyperlink destination</p></li>
93
+ <li class="listitem"><p><a class="link" href="cairo-Tags-and-Links.html#doc-struct" title="Document Structure (PDF)">Document Structure Tags</a> - Create PDF Document Structure</p></li>
94
+ </ul></div>
95
+ <div class="refsect2">
96
+ <a name="link"></a><h3>Link Tags</h3>
97
+ <p>A hyperlink is specified by enclosing the hyperlink text with the <a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-LINK:CAPS" title="CAIRO_TAG_LINK"><code class="literal">CAIRO_TAG_LINK</code></a> tag.</p>
98
+ <p>For example:</p>
99
+ <div class="informalexample"><pre class="programlisting">
100
+ cairo_tag_begin (cr, CAIRO_TAG_LINK, "uri='http://cairographics.org'");
101
+ cairo_move_to (cr, 50, 50);
102
+ cairo_show_text (cr, "This is a link to the cairo website.");
103
+ cairo_tag_end (cr, CAIRO_TAG_LINK);
104
+ </pre></div>
105
+ <p>The PDF backend uses one or more rectangles to define the clickable
106
+ area of the link. By default cairo will use the extents of the
107
+ drawing operations enclosed by the begin/end link tags to define the
108
+ clickable area. In some cases, such as a link split across two
109
+ lines, the default rectangle is undesirable.</p>
110
+ <p><em class="parameter"><code>rect</code></em>
111
+ : [optional] The "rect" attribute allows the application to
112
+ specify one or more rectangles that form the clickable region. The
113
+ value of this attribute is an array of floats. Each rectangle is
114
+ specified by four elements in the array: x, y, width, height. The
115
+ array size must be a multiple of four.</p>
116
+ <p>An example of creating a link with user specified clickable region:</p>
117
+ <div class="informalexample"><pre class="programlisting">
118
+ cairo_font_extents_t font_extents;
119
+ cairo_text_extents_t text1_extents;
120
+ cairo_text_extents_t text2_extents;
121
+ char attribs[100];
122
+ const char *text1 = "This link is split";
123
+ const char *text2 = "across two lines";
124
+
125
+ cairo_font_extents (cr, &amp;font_extents);
126
+ cairo_move_to (cr, 450, 50);
127
+ cairo_text_extents (cr, text1, &amp;text1_extents);
128
+ cairo_move_to (cr, 50, 70);
129
+ cairo_text_extents (cr, text2, &amp;text2_extents);
130
+ sprintf (attribs,
131
+ "rect=[%f %f %f %f %f %f %f %f] uri='http://cairographics.org'",
132
+ text1_extents.x_bearing,
133
+ text1_extents.y_bearing,
134
+ text1_extents.width,
135
+ text1_extents.height,
136
+ text2_extents.x_bearing,
137
+ text2_extents.y_bearing,
138
+ text2_extents.width,
139
+ text2_extents.height);
140
+
141
+ cairo_tag_begin (cr, CAIRO_TAG_LINK, attribs);
142
+ cairo_show_text (cr, "This is a link to the cairo website");
143
+ cairo_move_to (cr, 450, 50);
144
+ cairo_show_text (cr, text1);
145
+ cairo_move_to (cr, 50, 70);
146
+ cairo_show_text (cr, text2);
147
+ cairo_tag_end (cr, CAIRO_TAG_LINK);
148
+ </pre></div>
149
+ <p>There are three types of links. Each type has its own attributes as detailed below.</p>
150
+ <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
151
+ <li class="listitem"><p><a class="link" href="cairo-Tags-and-Links.html#internal-link" title="Internal Links">Internal Links</a> - A link to a location in the same document</p></li>
152
+ <li class="listitem"><p><a class="link" href="cairo-Tags-and-Links.html#uri-link" title="URI Links">URI Links</a> - A link to a Uniform resource identifier</p></li>
153
+ <li class="listitem"><p><a class="link" href="cairo-Tags-and-Links.html#file-link" title="File Links">File Links</a> - A link to a location in another document</p></li>
154
+ </ul></div>
155
+ <div class="refsect3">
156
+ <a name="internal-link"></a><h4>Internal Links</h4>
157
+ <p>An internal link is a link to a location in the same document. The destination
158
+ is specified with either:</p>
159
+ <p><em class="parameter"><code>dest</code></em>
160
+ : a UTF-8 string specifying the destination in the PDF file to link
161
+ to. Destinations are created with the <a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-DEST:CAPS" title="CAIRO_TAG_DEST"><code class="literal">CAIRO_TAG_DEST</code></a> tag.</p>
162
+ <p>or the two attributes:</p>
163
+ <p><em class="parameter"><code>page</code></em>
164
+ : An integer specifying the page number in the PDF file to link to.</p>
165
+ <p><em class="parameter"><code>pos</code></em>
166
+ : [optional] An array of two floats specifying the x,y position
167
+ on the page. Default is 0,0.</p>
168
+ <p>An example of the link attributes to link to a page and x,y position:</p>
169
+ <pre class="programlisting">
170
+ "page=3 pos=[3.1 6.2]"
171
+ </pre>
172
+ </div>
173
+ <div class="refsect3">
174
+ <a name="uri-link"></a><h4>URI Links</h4>
175
+ <p>A URI link is a link to a Uniform Resource Identifier (<a class="ulink" href="http://tools.ietf.org/html/rfc2396" target="_top">RFC 2396</a>).</p>
176
+ <p>A URI is specified with the following attribute:</p>
177
+ <p><em class="parameter"><code>uri</code></em>
178
+ : An ASCII string specifying the URI.</p>
179
+ <p>An example of the link attributes to the cairo website:</p>
180
+ <pre class="programlisting">
181
+ "uri='http://cairographics.org'"
182
+ </pre>
183
+ </div>
184
+ <div class="refsect3">
185
+ <a name="file-link"></a><h4>File Links</h4>
186
+ <p>A file link is a link a location in another PDF file.</p>
187
+ <p>The file attribute (required) specifies the name of the PDF file:</p>
188
+ <p><em class="parameter"><code>file</code></em>
189
+ : File name of PDF file to link to.</p>
190
+ <p>The position is specified by either:</p>
191
+ <p> <em class="parameter"><code>dest</code></em>
192
+ : a UTF-8 string specifying the named destination in the PDF file.</p>
193
+ <p>or</p>
194
+ <p> <em class="parameter"><code>page</code></em>
195
+ : An integer specifying the page number in the PDF file.</p>
196
+ <p> <em class="parameter"><code>pos</code></em>
197
+ : [optional] An array of two floats specifying the x,y position
198
+ on the page. Default is 0,0.</p>
199
+ <p>An example of the link attributes to PDF file:</p>
200
+ <pre class="programlisting">
201
+ "file='document.pdf' page=16 pos=[25 40]"
202
+ </pre>
203
+ </div>
204
+ </div>
205
+ <hr>
206
+ <div class="refsect2">
207
+ <a name="dest"></a><h3>Destination Tags</h3>
208
+ <p>A destination is specified by enclosing the destination drawing
209
+ operations with the <a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-DEST:CAPS" title="CAIRO_TAG_DEST"><code class="literal">CAIRO_TAG_DEST</code></a> tag.</p>
210
+ <p><em class="parameter"><code>name</code></em>
211
+ : [required] A UTF-8 string specifying the name of this destination.</p>
212
+ <p><em class="parameter"><code>x</code></em>
213
+ : [optional] A float specifying the x coordinate of destination
214
+ position on this page. If not specified the default
215
+ x coordinate is the left side of the extents of the
216
+ operations enclosed by the <a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-DEST:CAPS" title="CAIRO_TAG_DEST"><code class="literal">CAIRO_TAG_DEST</code></a> begin/end tags. If
217
+ no operations are enclosed, the x coordidate is 0.</p>
218
+ <p><em class="parameter"><code>y</code></em>
219
+ : [optional] A float specifying the y coordinate of destination
220
+ position on this page. If not specified the default
221
+ y coordinate is the top of the extents of the
222
+ operations enclosed by the <a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-DEST:CAPS" title="CAIRO_TAG_DEST"><code class="literal">CAIRO_TAG_DEST</code></a> begin/end tags. If
223
+ no operations are enclosed, the y coordidate is 0.</p>
224
+ <p><em class="parameter"><code>internal</code></em>
225
+ : A boolean that if true, the destination name may be
226
+ ommitted from PDF where possible. In this case, links
227
+ refer directly to the page and position instead of via
228
+ the named destination table. Note that if this
229
+ destination is referenced by another PDF (see <a class="link" href="cairo-Tags-and-Links.html#file-link" title="File Links">File Links</a>),
230
+ this attribute must be false. Default is false.</p>
231
+ <div class="informalexample"><pre class="programlisting">
232
+ /* Create a hyperlink */
233
+ cairo_tag_begin (cr, CAIRO_TAG_LINK, "dest='mydest' internal");
234
+ cairo_move_to (cr, 50, 50);
235
+ cairo_show_text (cr, "This is a hyperlink.");
236
+ cairo_tag_end (cr, CAIRO_TAG_LINK);
237
+
238
+ /* Create a destination */
239
+ cairo_tag_begin (cr, CAIRO_TAG_DEST, "name='mydest'");
240
+ cairo_move_to (cr, 50, 250);
241
+ cairo_show_text (cr, "This paragraph is the destination of the above link.");
242
+ cairo_tag_end (cr, CAIRO_TAG_DEST);
243
+ </pre></div>
244
+ </div>
245
+ <hr>
246
+ <div class="refsect2">
247
+ <a name="doc-struct"></a><h3>Document Structure (PDF)</h3>
248
+ <p>The document structure tags provide a means of specifying structural information
249
+ such as headers, paragraphs, tables, and figures. The inclusion of structural information faciliates:</p>
250
+ <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
251
+ <li class="listitem"><p>Extraction of text and graphics for copy and paste</p></li>
252
+ <li class="listitem"><p>Reflow of text and graphics in the viewer</p></li>
253
+ <li class="listitem"><p>Proccessing text eg searching and indexing</p></li>
254
+ <li class="listitem"><p>Conversion to other formats</p></li>
255
+ <li class="listitem"><p>Accessability support</p></li>
256
+ </ul></div>
257
+ <p>The list of structure types is specified in section 14.8.4 of the
258
+ <a class="ulink" href="http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf" target="_top">PDF Reference</a>.</p>
259
+ <p>Note the PDF "Link" structure tag is the same as the cairo <a class="link" href="cairo-Tags-and-Links.html#CAIRO-TAG-LINK:CAPS" title="CAIRO_TAG_LINK"><code class="literal">CAIRO_TAG_LINK</code></a> tag.</p>
260
+ <p>The following example creates a document structure for a document containing two section, each with
261
+ a header and a paragraph.</p>
262
+ <div class="informalexample"><pre class="programlisting">
263
+ cairo_tag_begin (cr, "Document", NULL);
264
+
265
+ cairo_tag_begin (cr, "Sect", NULL);
266
+ cairo_tag_begin (cr, "H1", NULL);
267
+ cairo_show_text (cr, "Heading 1");
268
+ cairo_tag_end (cr, "H1");
269
+
270
+ cairo_tag_begin (cr, "P", NULL);
271
+ cairo_show_text (cr, "Paragraph 1");
272
+ cairo_tag_end (cr, "P");
273
+ cairo_tag_end (cr, "Sect");
274
+
275
+ cairo_tag_begin (cr, "Sect", NULL);
276
+ cairo_tag_begin (cr, "H1", NULL);
277
+ cairo_show_text (cr, "Heading 2");
278
+ cairo_tag_end (cr, "H1");
279
+
280
+ cairo_tag_begin (cr, "P", NULL);
281
+ cairo_show_text (cr, "Paragraph 2");
282
+ cairo_tag_end (cr, "P");
283
+ cairo_tag_end (cr, "Sect");
284
+
285
+ cairo_tag_end (cr, "Document");
286
+ </pre></div>
287
+ </div>
288
+ </div>
289
+ <div class="refsect1">
290
+ <a name="cairo-Tags-and-Links.functions_details"></a><h2>Functions</h2>
291
+ <div class="refsect2">
292
+ <a name="cairo-tag-begin"></a><h3>cairo_tag_begin ()</h3>
293
+ <pre class="programlisting"><span class="returnvalue">void</span>
294
+ cairo_tag_begin (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
295
+ <em class="parameter"><code>const <span class="type">char</span> *tag_name</code></em>,
296
+ <em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>);</pre>
297
+ <p>Marks the beginning of the <em class="parameter"><code>tag_name</code></em>
298
+ structure. Call
299
+ <a class="link" href="cairo-Tags-and-Links.html#cairo-tag-end" title="cairo_tag_end ()"><code class="function">cairo_tag_end()</code></a> with the same <em class="parameter"><code>tag_name</code></em>
300
+ to mark the end of the
301
+ structure.</p>
302
+ <p>The attributes string is of the form "key1=value2 key2=value2 ...".
303
+ Values may be boolean (true/false or 1/0), integer, float, string,
304
+ or an array.</p>
305
+ <p>String values are enclosed in single quotes
306
+ ('). Single quotes and backslashes inside the string should be
307
+ escaped with a backslash.</p>
308
+ <p>Boolean values may be set to true by only
309
+ specifying the key. eg the attribute string "key" is the equivalent
310
+ to "key=true".</p>
311
+ <p>Arrays are enclosed in '[]'. eg "rect=[1.2 4.3 2.0 3.0]".</p>
312
+ <p>If no attributes are required, <em class="parameter"><code>attributes</code></em>
313
+ can be an empty string or NULL.</p>
314
+ <p>See <a class="link" href="cairo-Tags-and-Links.html#cairo-Tags-and-Links.description" title="Description">Tags and Links Description</a>
315
+ for the list of tags and attributes.</p>
316
+ <p>Invalid nesting of tags or invalid attributes will cause <em class="parameter"><code>cr</code></em>
317
+ to
318
+ shutdown with a status of <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-TAG-ERROR:CAPS"><code class="literal">CAIRO_STATUS_TAG_ERROR</code></a>.</p>
319
+ <p>See <a class="link" href="cairo-Tags-and-Links.html#cairo-tag-end" title="cairo_tag_end ()"><code class="function">cairo_tag_end()</code></a>.</p>
320
+ <div class="refsect3">
321
+ <a name="id-1.3.9.7.2.13"></a><h4>Parameters</h4>
322
+ <div class="informaltable"><table width="100%" border="0">
323
+ <colgroup>
324
+ <col width="150px" class="parameters_name">
325
+ <col class="parameters_description">
326
+ <col width="200px" class="parameters_annotations">
327
+ </colgroup>
328
+ <tbody>
329
+ <tr>
330
+ <td class="parameter_name"><p>cr</p></td>
331
+ <td class="parameter_description"><p>a cairo context</p></td>
332
+ <td class="parameter_annotations"> </td>
333
+ </tr>
334
+ <tr>
335
+ <td class="parameter_name"><p>tag_name</p></td>
336
+ <td class="parameter_description"><p>tag name</p></td>
337
+ <td class="parameter_annotations"> </td>
338
+ </tr>
339
+ <tr>
340
+ <td class="parameter_name"><p>attributes</p></td>
341
+ <td class="parameter_description"><p>tag attributes</p></td>
342
+ <td class="parameter_annotations"> </td>
343
+ </tr>
344
+ </tbody>
345
+ </table></div>
346
+ </div>
347
+ <p class="since">Since 1.16</p>
348
+ </div>
349
+ <hr>
350
+ <div class="refsect2">
351
+ <a name="cairo-tag-end"></a><h3>cairo_tag_end ()</h3>
352
+ <pre class="programlisting"><span class="returnvalue">void</span>
353
+ cairo_tag_end (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
354
+ <em class="parameter"><code>const <span class="type">char</span> *tag_name</code></em>);</pre>
355
+ <p>Marks the end of the <em class="parameter"><code>tag_name</code></em>
356
+ structure.</p>
357
+ <p>Invalid nesting of tags will cause <em class="parameter"><code>cr</code></em>
358
+ to shutdown with a status of
359
+ <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-TAG-ERROR:CAPS"><code class="literal">CAIRO_STATUS_TAG_ERROR</code></a>.</p>
360
+ <p>See <a class="link" href="cairo-Tags-and-Links.html#cairo-tag-begin" title="cairo_tag_begin ()"><code class="function">cairo_tag_begin()</code></a>.</p>
361
+ <div class="refsect3">
362
+ <a name="id-1.3.9.7.3.7"></a><h4>Parameters</h4>
363
+ <div class="informaltable"><table width="100%" border="0">
364
+ <colgroup>
365
+ <col width="150px" class="parameters_name">
366
+ <col class="parameters_description">
367
+ <col width="200px" class="parameters_annotations">
368
+ </colgroup>
369
+ <tbody>
370
+ <tr>
371
+ <td class="parameter_name"><p>cr</p></td>
372
+ <td class="parameter_description"><p>a cairo context</p></td>
373
+ <td class="parameter_annotations"> </td>
374
+ </tr>
375
+ <tr>
376
+ <td class="parameter_name"><p>tag_name</p></td>
377
+ <td class="parameter_description"><p>tag name</p></td>
378
+ <td class="parameter_annotations"> </td>
379
+ </tr>
380
+ </tbody>
381
+ </table></div>
382
+ </div>
383
+ <p class="since">Since 1.16</p>
384
+ </div>
385
+ </div>
386
+ <div class="refsect1">
387
+ <a name="cairo-Tags-and-Links.other_details"></a><h2>Types and Values</h2>
388
+ <div class="refsect2">
389
+ <a name="CAIRO-TAG-DEST:CAPS"></a><h3>CAIRO_TAG_DEST</h3>
390
+ <pre class="programlisting">#define CAIRO_TAG_DEST "cairo.dest"
391
+ </pre>
392
+ <p>Create a destination for a hyperlink. Destination tag attributes
393
+ are detailed at <a href="../cairo/cairo-Tags-and-Links.html#dest">Destinations</a>.</p>
394
+ <p class="since">Since 1.16</p>
395
+ </div>
396
+ <hr>
397
+ <div class="refsect2">
398
+ <a name="CAIRO-TAG-LINK:CAPS"></a><h3>CAIRO_TAG_LINK</h3>
399
+ <pre class="programlisting">#define CAIRO_TAG_LINK "Link"
400
+ </pre>
401
+ <p>Create hyperlink. Link tag attributes are detailed at
402
+ <a href="../cairo/cairo-Tags-and-Links.html#link">Links</a>.</p>
403
+ <p class="since">Since 1.16</p>
404
+ </div>
405
+ </div>
406
+ <div class="refsect1">
407
+ <a name="cairo-Tags-and-Links.see-also"></a><h2>See Also</h2>
408
+ <p><span class="type">cairo_pdf_surface_t</span></p>
409
+ </div>
410
+ </div>
411
+ <div class="footer">
412
+ <hr>
413
+ Generated by GTK-Doc V1.20</div>
414
+ </body>
415
+ </html>