cairo 1.8.3-x86-mingw32 → 1.8.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 (126) hide show
  1. data/NEWS +14 -0
  2. data/Rakefile +2 -2
  3. data/ext/cairo/rb_cairo.c +1 -1
  4. data/extconf.rb +11 -11
  5. data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/freetype6.dll +0 -0
  6. data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/libcairo-2.dll +0 -0
  7. data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/libfontconfig-1.dll +0 -0
  8. data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/libpng14-14.dll +0 -0
  9. data/home/kou/work/ruby/rcairo.win32/vendor/local/bin/zlib1.dll +0 -0
  10. data/home/kou/work/ruby/rcairo.win32/vendor/local/etc/fonts/fonts.conf +151 -0
  11. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-deprecated.h +138 -0
  12. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-features.h +20 -0
  13. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-ft.h +75 -0
  14. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-pdf.h +68 -0
  15. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-ps.h +114 -0
  16. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-svg.h +82 -0
  17. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-version.h +8 -0
  18. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo-win32.h +112 -0
  19. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/cairo/cairo.h +2328 -0
  20. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/libpng14/png.h +2701 -0
  21. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/libpng14/pngconf.h +1525 -0
  22. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/png.h +2701 -0
  23. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/pngconf.h +1525 -0
  24. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/zconf.h +461 -0
  25. data/home/kou/work/ruby/rcairo.win32/vendor/local/include/zlib.h +1589 -0
  26. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/cairo.def +278 -0
  27. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/cairo.lib +0 -0
  28. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libcairo.dll.a +0 -0
  29. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libpng.def +192 -0
  30. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libpng.lib +0 -0
  31. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libpng14.dll.a +0 -0
  32. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/libz.dll.a +0 -0
  33. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-ft.pc +12 -0
  34. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-pdf.pc +12 -0
  35. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-png.pc +12 -0
  36. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-ps.pc +12 -0
  37. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-svg.pc +12 -0
  38. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-win32-font.pc +12 -0
  39. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo-win32.pc +12 -0
  40. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/cairo.pc +13 -0
  41. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/libpng.pc +11 -0
  42. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/pkgconfig/libpng14.pc +11 -0
  43. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/zdll.lib +0 -0
  44. data/home/kou/work/ruby/rcairo.win32/vendor/local/lib/zlib.def +67 -0
  45. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/cairo-dev_1.8.10-4_win32.mft +76 -0
  46. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/cairo_1.8.10-4_win32.mft +5 -0
  47. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/fontconfig_2.8.0-2_win32.mft +3 -0
  48. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/freetype_2.4.2-1_win32.mft +2 -0
  49. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/libpng-dev_1.4.3-1_win32.mft +15 -0
  50. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/libpng_1.4.3-1_win32.mft +2 -0
  51. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/zlib-dev_1.2.5-2_win32.mft +8 -0
  52. data/home/kou/work/ruby/rcairo.win32/vendor/local/manifest/zlib_1.2.5-2_win32.mft +2 -0
  53. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/doc/cairo_1.8.10-4_win32/COPYING +32 -0
  54. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/doc/cairo_1.8.10-4_win32/COPYING-LGPL-2.1 +510 -0
  55. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/doc/cairo_1.8.10-4_win32/COPYING-MPL-1.1 +470 -0
  56. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-errors.html +132 -0
  57. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-fonts.html +63 -0
  58. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-memory.html +133 -0
  59. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-overloading.html +131 -0
  60. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-path.html +127 -0
  61. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-patterns.html +67 -0
  62. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-return-values.html +130 -0
  63. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-streams.html +102 -0
  64. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/bindings-surfaces.html +103 -0
  65. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-context.html +2643 -0
  66. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +57 -0
  67. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-error-status.html +360 -0
  68. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-font-face.html +408 -0
  69. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-font-options.html +678 -0
  70. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +63 -0
  71. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-ft-font.html +319 -0
  72. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-image-surface.html +473 -0
  73. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-matrix.html +596 -0
  74. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-paths.html +1274 -0
  75. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-pattern.html +1485 -0
  76. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-pdf-surface.html +238 -0
  77. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-png-functions.html +341 -0
  78. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-ps-surface.html +622 -0
  79. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-font.html +151 -0
  80. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-surface.html +219 -0
  81. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-scaled-font.html +1023 -0
  82. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-support.html +54 -0
  83. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-surface.html +1026 -0
  84. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +69 -0
  85. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-svg-surface.html +321 -0
  86. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +1222 -0
  87. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-transformations.html +436 -0
  88. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-types.html +133 -0
  89. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-user-font.html +735 -0
  90. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-version-info.html +345 -0
  91. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-win32-font.html +358 -0
  92. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-win32-surface.html +312 -0
  93. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo-xlib-surface.html +492 -0
  94. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp +417 -0
  95. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +542 -0
  96. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/home.png +0 -0
  97. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.2.html +141 -0
  98. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.4.html +109 -0
  99. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.6.html +71 -0
  100. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-1.8.html +107 -0
  101. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index-all.html +759 -0
  102. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index.html +144 -0
  103. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/index.sgml +478 -0
  104. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +83 -0
  105. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/left.png +0 -0
  106. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/right.png +0 -0
  107. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/style.css +167 -0
  108. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/gtk-doc/html/cairo/up.png +0 -0
  109. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/man/man3/libpng.3 +4455 -0
  110. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/man/man3/libpngpf.3 +808 -0
  111. data/home/kou/work/ruby/rcairo.win32/vendor/local/share/man/man5/png.5 +74 -0
  112. data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/cairo_1.8.10-4_win32.log +920 -0
  113. data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/cairo_1.8.10-4_win32.sh +76 -0
  114. data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.log +272 -0
  115. data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.sh +71 -0
  116. data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.log +42 -0
  117. data/home/kou/work/ruby/rcairo.win32/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.sh +189 -0
  118. data/lib/1.8/cairo.so +0 -0
  119. data/lib/1.9/cairo.so +0 -0
  120. data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.8.7/fake.rb +0 -0
  121. data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.8.7/mkmf.rb +0 -0
  122. data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.8.7/rbconfig.rb +0 -0
  123. data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.9.2/fake.rb +0 -0
  124. data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.9.2/mkmf.rb +0 -0
  125. data/tmp/{x86-mingw32 → i386-mingw32}/cairo/1.9.2/rbconfig.rb +1 -1
  126. metadata +126 -40
@@ -0,0 +1,127 @@
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_path_t</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
9
+ <link rel="prev" href="bindings-fonts.html" title="Fonts">
10
+ <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
11
+ <link rel="stylesheet" href="style.css" type="text/css">
12
+ <link rel="chapter" href="cairo-drawing.html" title="Drawing">
13
+ <link rel="chapter" href="cairo-fonts.html" title="Fonts">
14
+ <link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
15
+ <link rel="chapter" href="cairo-support.html" title="Utilities">
16
+ <link rel="index" href="index-all.html" title="Index">
17
+ <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
18
+ <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
19
+ <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
20
+ <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
21
+ <link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
22
+ </head>
23
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
24
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
25
+ <td><a accesskey="p" href="bindings-fonts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
26
+ <td><a accesskey="u" href="language-bindings.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
27
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
28
+ <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
29
+ <td> </td>
30
+ </tr></table>
31
+ <div class="sect1" title="cairo_path_t">
32
+ <div class="titlepage"><div><div><h2 class="title" style="clear: both">
33
+ <a name="bindings-path"></a>cairo_path_t</h2></div></div></div>
34
+ <p>
35
+ The <a class="link" href="cairo-paths.html#cairo-path-t" title="cairo_path_t"><span class="type">cairo_path_t</span></a> type is one
36
+ area in which most language bindings will differ significantly
37
+ from the C API. The C API for <span class="type">cairo_path_t</span> is
38
+ designed for efficiency and to avoid auxiliary objects that
39
+ would be have to be manually memory managed by the
40
+ application. However,
41
+ a language binding should not present <span class="type">cairo_path_t</span> as an
42
+ array, but rather as an opaque that can be iterated
43
+ over. Different languages have quite different conventions for
44
+ how iterators work, so it is impossible to give an exact
45
+ specification for how this API should work, but the type names
46
+ and methods should be similar to the language's mapping of the following:
47
+ </p>
48
+ <pre class="programlisting">
49
+ typedef struct cairo_path_iterator cairo_path_iterator_t;
50
+ typedef struct cairo_path_element cairo_path_element_t;
51
+
52
+ cairo_path_iterator_t *
53
+ cairo_path_get_iterator (cairo_path_t *path);
54
+
55
+ cairo_bool_t
56
+ cairo_path_iterator_has_next (cairo_path_iterator_t *iterator);
57
+
58
+ cairo_path_element_t *
59
+ cairo_path_iterator_next (cairo_path_iterator_t *iterator);
60
+
61
+ cairo_path_element_type_t
62
+ cairo_path_element_get_type (cairo_path_element_t *element);
63
+
64
+ void
65
+ cairo_path_element_get_point (cairo_path_element_t *element,
66
+ int index,
67
+ double *x,
68
+ double *y);
69
+ </pre>
70
+ <p>
71
+ The above is written using the Java conventions for
72
+ iterators. To illustrate how the API for PathIterator might
73
+ depend on the native iteration conventions of the API, examine
74
+ three versions of the loop, first written in a hypothetical Java
75
+ binding:
76
+ </p>
77
+ <pre class="programlisting">
78
+ PathIterator iter = cr.copyPath().iterator();
79
+ while (cr.hasNext()) {
80
+ PathElement element = iter.next();
81
+ if (element.getType() == PathElementType.MOVE_TO) {
82
+ Point p = element.getPoint(0);
83
+ doMoveTo (p.x, p.y);
84
+ }
85
+ }</pre>
86
+ <p>
87
+ And then in a hypothetical C++ binding:
88
+ </p>
89
+ <pre class="programlisting">
90
+ Path path = cr.copyPath();
91
+ for (PathIterator iter = path.begin(); iter != path.end(); iter++) {
92
+ PathElement element = *iter;
93
+ if (element.getType() == PathElementType.MOVE_TO) {
94
+ Point p = element.getPoint(0);
95
+ doMoveTo (p.x, p.y);
96
+ }
97
+ }</pre>
98
+ <p>
99
+ And then finally in a Python binding:
100
+ </p>
101
+ <pre class="programlisting">
102
+ for element in cr.copy_path():
103
+ if element.getType == cairo.PATH_ELEMENT_MOVE_TO:
104
+ (x, y) = element.getPoint(0)
105
+ doMoveTo (x, y);</pre>
106
+ <p>
107
+ While many of the API elements stay the same in the three
108
+ examples, the exact iteration mechanism is quite different, to
109
+ match how users of the language would expect to iterate over
110
+ a container.
111
+ </p>
112
+ <p>
113
+ You should not present an API for mutating or for creating new
114
+ <span class="type">cairo_path_t</span> objects. In the future, these
115
+ guidelines may be extended to present an API for creating a
116
+ <span class="type">cairo_path_t</span> from scratch for use with
117
+ <a class="link" href="cairo-paths.html#cairo-append-path" title="cairo_append_path ()"><code class="function">cairo_append_path()</code></a>
118
+ but the current expectation is that <code class="function">cairo_append_path()</code> will
119
+ mostly be used with paths from
120
+ <a class="link" href="cairo-paths.html#cairo-append-path" title="cairo_append_path ()"><code class="function">cairo_copy_path()</code></a>.
121
+ </p>
122
+ </div>
123
+ <div class="footer">
124
+ <hr>
125
+ Generated by GTK-Doc V1.11</div>
126
+ </body>
127
+ </html>
@@ -0,0 +1,67 @@
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>Patterns</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
9
+ <link rel="prev" href="bindings-errors.html" title="Error handling">
10
+ <link rel="next" href="bindings-surfaces.html" title="Surfaces">
11
+ <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ <link rel="chapter" href="cairo-drawing.html" title="Drawing">
14
+ <link rel="chapter" href="cairo-fonts.html" title="Fonts">
15
+ <link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
16
+ <link rel="chapter" href="cairo-support.html" title="Utilities">
17
+ <link rel="index" href="index-all.html" title="Index">
18
+ <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
+ <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
+ <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
+ <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
+ <link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
23
+ </head>
24
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
26
+ <td><a accesskey="p" href="bindings-errors.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
+ <td><a accesskey="u" href="language-bindings.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
+ <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
+ <td><a accesskey="n" href="bindings-surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
+ </tr></table>
32
+ <div class="sect1" title="Patterns">
33
+ <div class="titlepage"><div><div><h2 class="title" style="clear: both">
34
+ <a name="bindings-patterns"></a>Patterns</h2></div></div></div>
35
+ <p>
36
+ The cairo C API allows for creating a number of different types
37
+ of patterns. All of these different types of patterns map to
38
+ <a class="link" href="cairo-pattern.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
39
+ in C, but in an object oriented language, there should instead
40
+ be a hierarchy of types. (The functions that should map to
41
+ constructors for the various types are listed after the type,
42
+ methods on that type are listed below)
43
+ </p>
44
+ <pre class="programlisting">
45
+ cairo_pattern_t
46
+ <a class="link" href="cairo-pattern.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>
47
+ <a class="link" href="cairo-pattern.html#cairo-pattern-get-matrix" title="cairo_pattern_get_matrix ()"><code class="function">cairo_pattern_get_matrix()</code></a>
48
+ cairo_solid_pattern_t (<a class="link" href="cairo-pattern.html#cairo-pattern-create-rgb" title="cairo_pattern_create_rgb ()"><code class="function">cairo_pattern_create_rgb()</code></a> and <a class="link" href="cairo-pattern.html#cairo-pattern-create-rgba" title="cairo_pattern_create_rgba ()"><code class="function">cairo_pattern_create_rgba()</code></a>)
49
+ cairo_surface_pattern_t (<a class="link" href="cairo-pattern.html#cairo-pattern-create-for-surface" title="cairo_pattern_create_for_surface ()"><code class="function">cairo_pattern_create_for_surface()</code></a>)
50
+ <a class="link" href="cairo-pattern.html#cairo-pattern-set-extend" title="cairo_pattern_set_extend ()"><code class="function">cairo_pattern_set_extend()</code></a>
51
+ <a class="link" href="cairo-pattern.html#cairo-pattern-get-extend" title="cairo_pattern_get_extend ()"><code class="function">cairo_pattern_get_extend()</code></a>
52
+ <a class="link" href="cairo-pattern.html#cairo-pattern-set-filter" title="cairo_pattern_set_filter ()"><code class="function">cairo_pattern_set_filter()</code></a>
53
+ <a class="link" href="cairo-pattern.html#cairo-pattern-get-filter" title="cairo_pattern_get_filter ()"><code class="function">cairo_pattern_get_filter()</code></a>
54
+ cairo_gradient_t
55
+ <a class="link" href="cairo-pattern.html#cairo-pattern-add-color-stop-rgb" title="cairo_pattern_add_color_stop_rgb ()"><code class="function">cairo_pattern_add_color_stop_rgb()</code></a>
56
+ <a class="link" href="cairo-pattern.html#cairo-pattern-add-color-stop-rgba" title="cairo_pattern_add_color_stop_rgba ()"><code class="function">cairo_pattern_add_color_stop_rgba()</code></a>
57
+ cairo_linear_gradient_t (<a class="link" href="cairo-pattern.html#cairo-pattern-create-linear" title="cairo_pattern_create_linear ()"><code class="function">cairo_pattern_create_linear()</code></a>)
58
+ cairo_radial_gradient_t (<a class="link" href="cairo-pattern.html#cairo-pattern-create-radial" title="cairo_pattern_create_radial ()"><code class="function">cairo_pattern_create_radial()</code></a>)
59
+ </pre>
60
+ <p>
61
+ </p>
62
+ </div>
63
+ <div class="footer">
64
+ <hr>
65
+ Generated by GTK-Doc V1.11</div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,130 @@
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>Multiple return values</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
9
+ <link rel="prev" href="bindings-memory.html" title="Memory management">
10
+ <link rel="next" href="bindings-overloading.html" title="Overloading and optional arguments">
11
+ <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ <link rel="chapter" href="cairo-drawing.html" title="Drawing">
14
+ <link rel="chapter" href="cairo-fonts.html" title="Fonts">
15
+ <link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
16
+ <link rel="chapter" href="cairo-support.html" title="Utilities">
17
+ <link rel="index" href="index-all.html" title="Index">
18
+ <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
+ <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
+ <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
+ <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
+ <link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
23
+ </head>
24
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
26
+ <td><a accesskey="p" href="bindings-memory.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
+ <td><a accesskey="u" href="language-bindings.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
+ <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
+ <td><a accesskey="n" href="bindings-overloading.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
+ </tr></table>
32
+ <div class="sect1" title="Multiple return values">
33
+ <div class="titlepage"><div><div><h2 class="title" style="clear: both">
34
+ <a name="bindings-return-values"></a>Multiple return values</h2></div></div></div>
35
+ <p>
36
+ There are a number of functions in the cairo API that have
37
+ multiple <em class="firstterm">out parameters</em> or
38
+ <em class="firstterm">in-out parameters</em>. In some languages
39
+ these can be translated into multiple return values. In Python,
40
+ what is:
41
+ </p>
42
+ <pre class="programlisting">
43
+ cairo_user_to_device (cr, &amp;x, &amp;y);</pre>
44
+ <p>
45
+ can by mapped to:
46
+ </p>
47
+ <pre class="programlisting">
48
+ (x, y) = cr.user_to_device (cr, x, y);</pre>
49
+ <p>
50
+ but many languages don't have provisions for multiple return
51
+ values, so it is necessary to introduce auxiliary types.
52
+ Most of the functions that require the auxiliary types
53
+ require a type that would, in C, look like
54
+ </p>
55
+ <pre class="programlisting">
56
+ typedef struct _cairo_point cairo_point_t;
57
+ struct _cairo_point {
58
+ double x;
59
+ double y;
60
+ }</pre>
61
+ <p>
62
+ The same type should be used both for functions that use a pair
63
+ of coordinates as an absolute position, and functions that use
64
+ a pair of coordinates as a displacement. While an argument could
65
+ be made that having a separate “distance” type is more correct,
66
+ it is more likely just to confuse users.
67
+ </p>
68
+ <pre class="programlisting">
69
+ void
70
+ cairo_user_to_device (cairo_t *cr, double *x, double *y);
71
+
72
+ void
73
+ cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy);
74
+
75
+ void
76
+ cairo_device_to_user (cairo_t *cr, double *x, double *y);
77
+
78
+ void
79
+ cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy);
80
+
81
+ void
82
+ cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy);
83
+
84
+ void
85
+ cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y);
86
+
87
+ void
88
+ cairo_get_current_point (cairo_t *cr, double *x, double *y);
89
+ </pre>
90
+ <p>
91
+ There are also a couple of functions that return four values
92
+ representing a rectangle. These should be mapped to a
93
+ “rectangle” type that looks like:
94
+ </p>
95
+ <pre class="programlisting">
96
+ typedef struct _cairo_rectangle cairo_rectangle_t;
97
+ struct _cairo_rectangle {
98
+ double x;
99
+ double y;
100
+ double width;
101
+ double height;
102
+ }</pre>
103
+ <p>
104
+ The C function returns the rectangle as a set of two points to
105
+ facilitate rounding to integral extents, but this isn't worth
106
+ adding a “box” type to go along with the more obvious
107
+ “rectangle” representation.
108
+ </p>
109
+ <p class="remark"><i><span class="remark">
110
+ Q: Would it make sense here to define a standard
111
+ <code class="function">cairo_rectangle_round()</code> method
112
+ that language bindings should map?
113
+ </span></i></p>
114
+ <pre class="programlisting">
115
+ void
116
+ cairo_stroke_extents (cairo_t *cr,
117
+ double *x1, double *y1,
118
+ double *x2, double *y2);
119
+
120
+ void
121
+ cairo_fill_extents (cairo_t *cr,
122
+ double *x1, double *y1,
123
+ double *x2, double *y2);
124
+ </pre>
125
+ </div>
126
+ <div class="footer">
127
+ <hr>
128
+ Generated by GTK-Doc V1.11</div>
129
+ </body>
130
+ </html>
@@ -0,0 +1,102 @@
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>Streams and File I/O</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
9
+ <link rel="prev" href="bindings-overloading.html" title="Overloading and optional arguments">
10
+ <link rel="next" href="bindings-errors.html" title="Error handling">
11
+ <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ <link rel="chapter" href="cairo-drawing.html" title="Drawing">
14
+ <link rel="chapter" href="cairo-fonts.html" title="Fonts">
15
+ <link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
16
+ <link rel="chapter" href="cairo-support.html" title="Utilities">
17
+ <link rel="index" href="index-all.html" title="Index">
18
+ <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
+ <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
+ <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
+ <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
+ <link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
23
+ </head>
24
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
26
+ <td><a accesskey="p" href="bindings-overloading.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
+ <td><a accesskey="u" href="language-bindings.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
+ <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
+ <td><a accesskey="n" href="bindings-errors.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
+ </tr></table>
32
+ <div class="sect1" title="Streams and File I/O">
33
+ <div class="titlepage"><div><div><h2 class="title" style="clear: both">
34
+ <a name="bindings-streams"></a>Streams and File I/O</h2></div></div></div>
35
+ <p>
36
+ Various places in the cairo API deal with reading and writing
37
+ data, whether from and to files, or to other sources and
38
+ destinations. In these cases, what is typically provided in the
39
+ C API is a simple version that just takes a filename, and a
40
+ complex version that takes a callback function.
41
+ An example is the PNG handling functions:
42
+ </p>
43
+ <pre class="programlisting">
44
+ cairo_surface_t *
45
+ cairo_image_surface_create_from_png (const char *filename);
46
+
47
+ cairo_surface_t *
48
+ cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func,
49
+ void *closure);
50
+
51
+ cairo_status_t
52
+ cairo_surface_write_to_png (cairo_surface_t *surface,
53
+ const char *filename);
54
+
55
+ cairo_status_t
56
+ cairo_surface_write_to_png_stream (cairo_surface_t *surface,
57
+ cairo_write_func_t write_func,
58
+ void *closure);</pre>
59
+ <p>
60
+ The expectation is that the filename version will be mapped
61
+ literally in the language binding, but the callback version
62
+ will be mapped to a version that takes a language stream
63
+ object. For example, in Java, the four functions above
64
+ might be mapped to:
65
+ </p>
66
+ <pre class="programlisting">
67
+ static public ImageSurface createFromPNG (String filename) throws IOException;
68
+ static public ImageSurface createFromPNG (InputStream stream) throws IOException;
69
+ public void writeToPNG (String filename) throws IOException;
70
+ public void writeToPNG (OutputStream stream) throws IOException;
71
+ </pre>
72
+ <p>
73
+ In many cases, it will be better to
74
+ implement the filename version internally
75
+ using the stream version, rather than building it on top of the
76
+ filename version in C. The reason for this is that will
77
+ naturally give a more standard handling of file errors for
78
+ the language, as seen in the above Java example, where
79
+ <code class="methodname">createFromPNG()</code> is marked as raising
80
+ an exception. Propagating exceptions from inside the callback
81
+ function to the caller will pose a challenge to the language
82
+ binding implementor, since an exception must not propagate
83
+ through the Cairo code. A technique that will be useful in
84
+ some cases is to catch the exception in the callback,
85
+ store the exception object inside a structure pointed to by
86
+ <em class="parameter"><code>closure</code></em>, and then rethrow it once
87
+ the function returns.
88
+ </p>
89
+ <p class="remark"><i><span class="remark">
90
+ I'm not sure how to handle this for
91
+ <code class="function">cairo_pdf_surface_create_for_callback()</code>.
92
+ Other than keep a “exception to rethrow” thread-specific
93
+ variable
94
+ that is checked after <span class="emphasis"><em>every</em></span> call to a Cairo
95
+ function.
96
+ </span></i></p>
97
+ </div>
98
+ <div class="footer">
99
+ <hr>
100
+ Generated by GTK-Doc V1.11</div>
101
+ </body>
102
+ </html>
@@ -0,0 +1,103 @@
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>Surfaces</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
+ <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8
+ <link rel="up" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
9
+ <link rel="prev" href="bindings-patterns.html" title="Patterns">
10
+ <link rel="next" href="bindings-fonts.html" title="Fonts">
11
+ <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ <link rel="chapter" href="cairo-drawing.html" title="Drawing">
14
+ <link rel="chapter" href="cairo-fonts.html" title="Fonts">
15
+ <link rel="chapter" href="cairo-surfaces.html" title="Surfaces">
16
+ <link rel="chapter" href="cairo-support.html" title="Utilities">
17
+ <link rel="index" href="index-all.html" title="Index">
18
+ <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
19
+ <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
20
+ <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
21
+ <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
22
+ <link rel="appendix" href="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
23
+ </head>
24
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
26
+ <td><a accesskey="p" href="bindings-patterns.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
27
+ <td><a accesskey="u" href="language-bindings.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
28
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
29
+ <th width="100%" align="center">Cairo: A Vector Graphics Library</th>
30
+ <td><a accesskey="n" href="bindings-fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
+ </tr></table>
32
+ <div class="sect1" title="Surfaces">
33
+ <div class="titlepage"><div><div><h2 class="title" style="clear: both">
34
+ <a name="bindings-surfaces"></a>Surfaces</h2></div></div></div>
35
+ <p>
36
+ Like patterns, surfaces, which use only the
37
+ <a class="link" href="cairo-surface.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
38
+ type in the C API should be broken up into a hierarchy of types
39
+ in a language binding.
40
+ </p>
41
+ <pre class="programlisting">
42
+ cairo_surface_t
43
+ cairo_image_surface_t
44
+ cairo_atsui_surface_t
45
+ cairo_win32_surface_t
46
+ cairo_xlib_surface_t
47
+ cairo_beos_surface_t
48
+ </pre>
49
+ <p>
50
+ Unlike patterns, the constructors and methods on these types are
51
+ clearly named, and can be trivially associated with the
52
+ appropriate subtype. Many language bindings will want to avoid
53
+ binding the platform-specific subtypes at all, since the
54
+ methods on these types are not useful without passing in native
55
+ C types. Unless there is a language binding for Xlib available,
56
+ there is no way to represent a XLib <span class="type">Display</span> * in
57
+ that language.
58
+ </p>
59
+ <p>
60
+ This doesn't mean that platform-specific surface types can't
61
+ be used in a language binding that doesn't bind the constructor.
62
+ A very common situation is to use a cairo language binding in
63
+ combination with a binding for a higher level system like
64
+ the <a class="ulink" href="http://www.gtk.org/" target="_top">GTK+</a> widget
65
+ toolkit. In such a situation, the higher level toolkit provides
66
+ ways to get references to platform specific surfaces.
67
+ </p>
68
+ <p>
69
+ The <a class="link" href="cairo-surface.html#cairo-surface-set-user-data" title="cairo_surface_set_user_data ()"><code class="function">cairo_surface_set_user_data()</code></a>,
70
+ and <a class="link" href="cairo-surface.html#cairo-surface-get-user-data" title="cairo_surface_get_user_data ()"><code class="function">cairo_surface_get_user_data()</code></a>
71
+ methods are provided for use in language bindings, and should
72
+ not be directly exposed to applications. One example of the use
73
+ of these functions in a language binding is creating a binding for:
74
+ </p>
75
+ <pre class="programlisting">
76
+ cairo_surface_t *
77
+ <a class="link" href="cairo-image-surface.html#cairo-image-surface-create-for-data" title="cairo_image_surface_create_for_data ()"><code class="function">cairo_image_surface_create_for_data</code></a> (unsigned char *data,
78
+ cairo_format_t format,
79
+ int width,
80
+ int height,
81
+ int stride);
82
+ </pre>
83
+ <p>
84
+ The memory block passed in for <em class="parameter"><code>data</code></em> must be
85
+ kept around until the surface is destroyed, so the language
86
+ binding must have some way of determining when that happens. The
87
+ way to do this is to use the <em class="parameter"><code>destroy</code></em>
88
+ argument to <code class="function">cairo_surface_set_user_data()</code>.
89
+ </p>
90
+ <p class="remark"><i><span class="remark">
91
+ Some languages may not have a suitable “pointer to a block of
92
+ data” type to pass in for <em class="parameter"><code>data</code></em>. And even
93
+ where a language does have such a type, the user will be
94
+ frequently able to cause the backing store to be reallocated
95
+ to a different location or truncated. Should we recommend a
96
+ standard type name and binding for a buffer object here?
97
+ </span></i></p>
98
+ </div>
99
+ <div class="footer">
100
+ <hr>
101
+ Generated by GTK-Doc V1.11</div>
102
+ </body>
103
+ </html>