cairo 1.6.1-x86-mswin32
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.
- data/AUTHORS +4 -0
- data/COPYING +59 -0
- data/ChangeLog +1320 -0
- data/GPL +340 -0
- data/NEWS +98 -0
- data/README +70 -0
- data/Rakefile +215 -0
- data/cairo/bin/libcairo-2.dll +0 -0
- data/cairo/bin/libpng13.dll +0 -0
- data/cairo/bin/zlib1.dll +0 -0
- data/cairo/include/cairo/cairo-deprecated.h +142 -0
- data/cairo/include/cairo/cairo-features.h +35 -0
- data/cairo/include/cairo/cairo-pdf.h +68 -0
- data/cairo/include/cairo/cairo-ps.h +114 -0
- data/cairo/include/cairo/cairo-svg.h +82 -0
- data/cairo/include/cairo/cairo-win32.h +104 -0
- data/cairo/include/cairo/cairo.h +1945 -0
- data/cairo/include/libpng13/png.h +3419 -0
- data/cairo/include/libpng13/pngconf.h +1437 -0
- data/cairo/lib/cairo.def +251 -0
- data/cairo/lib/cairo.lib +0 -0
- data/cairo/lib/libcairo.dll.a +0 -0
- data/cairo/lib/libpng.def +372 -0
- data/cairo/lib/libpng13.dll.a +0 -0
- data/cairo/lib/pkgconfig/cairo-pdf.pc +12 -0
- data/cairo/lib/pkgconfig/cairo-png.pc +12 -0
- data/cairo/lib/pkgconfig/cairo-ps.pc +12 -0
- data/cairo/lib/pkgconfig/cairo-svg.pc +12 -0
- data/cairo/lib/pkgconfig/cairo-win32-font.pc +12 -0
- data/cairo/lib/pkgconfig/cairo-win32.pc +12 -0
- data/cairo/lib/pkgconfig/cairo.pc +13 -0
- data/cairo/lib/pkgconfig/libpng.pc +14 -0
- data/cairo/lib/pkgconfig/libpng13.pc +14 -0
- data/cairo/make/cairo-1.6.4-1.sh +55 -0
- data/cairo/manifest/cairo-1.6.4-1.mft +6 -0
- data/cairo/manifest/cairo-dev-1.6.4-1.mft +72 -0
- data/cairo/manifest/libpng-dev-1.2.8.mft +7 -0
- data/cairo/share/doc/cairo-1.6.4-1/COPYING +32 -0
- data/cairo/share/doc/cairo-1.6.4-1/COPYING-LGPL-2.1 +510 -0
- data/cairo/share/doc/cairo-1.6.4-1/COPYING-MPL-1.1 +470 -0
- data/cairo/share/gtk-doc/html/cairo/Drawing.html +53 -0
- data/cairo/share/gtk-doc/html/cairo/Fonts.html +56 -0
- data/cairo/share/gtk-doc/html/cairo/Support.html +50 -0
- data/cairo/share/gtk-doc/html/cairo/Surfaces.html +65 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-errors.html +128 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-fonts.html +59 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-memory.html +129 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-overloading.html +127 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-path.html +123 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-patterns.html +63 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-return-values.html +126 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-streams.html +98 -0
- data/cairo/share/gtk-doc/html/cairo/bindings-surfaces.html +99 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Error-Handling.html +328 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Font-Options.html +720 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +297 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +484 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +246 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-PNG-Support.html +345 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Paths.html +1336 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Patterns.html +1560 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +656 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Fonts.html +161 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +232 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +337 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Scaled-Fonts.html +823 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Text.html +836 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Transformations.html +462 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Types.html +143 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Version-Information.html +325 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +381 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +331 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +525 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +427 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html +626 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +995 -0
- data/cairo/share/gtk-doc/html/cairo/cairo-cairo-t.html +2795 -0
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp +432 -0
- data/cairo/share/gtk-doc/html/cairo/cairo.devhelp2 +432 -0
- data/cairo/share/gtk-doc/html/cairo/home.png +0 -0
- data/cairo/share/gtk-doc/html/cairo/index-1.2.html +137 -0
- data/cairo/share/gtk-doc/html/cairo/index-1.4.html +105 -0
- data/cairo/share/gtk-doc/html/cairo/index-1.6.html +65 -0
- data/cairo/share/gtk-doc/html/cairo/index.html +134 -0
- data/cairo/share/gtk-doc/html/cairo/index.sgml +466 -0
- data/cairo/share/gtk-doc/html/cairo/ix01.html +693 -0
- data/cairo/share/gtk-doc/html/cairo/language-bindings.html +79 -0
- data/cairo/share/gtk-doc/html/cairo/left.png +0 -0
- data/cairo/share/gtk-doc/html/cairo/right.png +0 -0
- data/cairo/share/gtk-doc/html/cairo/style.css +148 -0
- data/cairo/share/gtk-doc/html/cairo/up.png +0 -0
- data/doc/doc.css +91 -0
- data/doc/en/cairo-antialias.html +41 -0
- data/doc/en/cairo-antialias.rd +16 -0
- data/doc/en/cairo-clip-not-representable-error.html +50 -0
- data/doc/en/cairo-clip-not-representable-error.rd +17 -0
- data/doc/en/cairo-color-base.html +72 -0
- data/doc/en/cairo-color-base.rd +38 -0
- data/doc/en/cairo-color-cmyk.html +160 -0
- data/doc/en/cairo-color-cmyk.rd +107 -0
- data/doc/en/cairo-color-hsv.html +140 -0
- data/doc/en/cairo-color-hsv.rd +91 -0
- data/doc/en/cairo-color-rgb.html +145 -0
- data/doc/en/cairo-color-rgb.rd +95 -0
- data/doc/en/cairo-color-x11.html +176 -0
- data/doc/en/cairo-color-x11.rd +151 -0
- data/doc/en/cairo-color.html +241 -0
- data/doc/en/cairo-color.rd +213 -0
- data/doc/en/cairo-content.html +40 -0
- data/doc/en/cairo-content.rd +15 -0
- data/doc/en/cairo-context-blur.html +42 -0
- data/doc/en/cairo-context-blur.rd +15 -0
- data/doc/en/cairo-context-circle.html +42 -0
- data/doc/en/cairo-context-circle.rd +15 -0
- data/doc/en/cairo-context-color.html +42 -0
- data/doc/en/cairo-context-color.rd +15 -0
- data/doc/en/cairo-context-path.html +47 -0
- data/doc/en/cairo-context-path.rd +19 -0
- data/doc/en/cairo-context-rectangle.html +42 -0
- data/doc/en/cairo-context-rectangle.rd +15 -0
- data/doc/en/cairo-context-triangle.html +42 -0
- data/doc/en/cairo-context-triangle.rd +15 -0
- data/doc/en/cairo-context.html +636 -0
- data/doc/en/cairo-context.rd +491 -0
- data/doc/en/cairo-error.html +47 -0
- data/doc/en/cairo-error.rd +16 -0
- data/doc/en/cairo-extend.html +41 -0
- data/doc/en/cairo-extend.rd +16 -0
- data/doc/en/cairo-file-not-found.html +50 -0
- data/doc/en/cairo-file-not-found.rd +17 -0
- data/doc/en/cairo-fill-rule.html +39 -0
- data/doc/en/cairo-fill-rule.rd +14 -0
- data/doc/en/cairo-filter.html +43 -0
- data/doc/en/cairo-filter.rd +18 -0
- data/doc/en/cairo-font-extents.html +74 -0
- data/doc/en/cairo-font-extents.rd +40 -0
- data/doc/en/cairo-font-face.html +41 -0
- data/doc/en/cairo-font-face.rd +14 -0
- data/doc/en/cairo-font-options.html +142 -0
- data/doc/en/cairo-font-options.rd +94 -0
- data/doc/en/cairo-font-slant.html +40 -0
- data/doc/en/cairo-font-slant.rd +15 -0
- data/doc/en/cairo-font-weight.html +39 -0
- data/doc/en/cairo-font-weight.rd +14 -0
- data/doc/en/cairo-format.html +49 -0
- data/doc/en/cairo-format.rd +22 -0
- data/doc/en/cairo-glyph.html +102 -0
- data/doc/en/cairo-glyph.rd +62 -0
- data/doc/en/cairo-gradient-pattern.html +77 -0
- data/doc/en/cairo-gradient-pattern.rd +41 -0
- data/doc/en/cairo-hint-metrics.html +40 -0
- data/doc/en/cairo-hint-metrics.rd +15 -0
- data/doc/en/cairo-hint-style.html +42 -0
- data/doc/en/cairo-hint-style.rd +17 -0
- data/doc/en/cairo-image-surface.html +85 -0
- data/doc/en/cairo-image-surface.rd +47 -0
- data/doc/en/cairo-invalid-content-error.html +50 -0
- data/doc/en/cairo-invalid-content-error.rd +17 -0
- data/doc/en/cairo-invalid-dash-error.html +50 -0
- data/doc/en/cairo-invalid-dash-error.rd +17 -0
- data/doc/en/cairo-invalid-dsc-comment-error.html +50 -0
- data/doc/en/cairo-invalid-dsc-comment-error.rd +17 -0
- data/doc/en/cairo-invalid-format-error.html +50 -0
- data/doc/en/cairo-invalid-format-error.rd +17 -0
- data/doc/en/cairo-invalid-index-error.html +50 -0
- data/doc/en/cairo-invalid-index-error.rd +17 -0
- data/doc/en/cairo-invalid-matrix-error.html +50 -0
- data/doc/en/cairo-invalid-matrix-error.rd +17 -0
- data/doc/en/cairo-invalid-path-data-error.html +50 -0
- data/doc/en/cairo-invalid-path-data-error.rd +17 -0
- data/doc/en/cairo-invalid-pop-group-error.html +50 -0
- data/doc/en/cairo-invalid-pop-group-error.rd +17 -0
- data/doc/en/cairo-invalid-restore-error.html +50 -0
- data/doc/en/cairo-invalid-restore-error.rd +17 -0
- data/doc/en/cairo-invalid-status-error.html +50 -0
- data/doc/en/cairo-invalid-status-error.rd +17 -0
- data/doc/en/cairo-invalid-stride-error.html +50 -0
- data/doc/en/cairo-invalid-stride-error.rd +17 -0
- data/doc/en/cairo-invalid-string-error.html +50 -0
- data/doc/en/cairo-invalid-string-error.rd +17 -0
- data/doc/en/cairo-invalid-visual-error.html +50 -0
- data/doc/en/cairo-invalid-visual-error.rd +17 -0
- data/doc/en/cairo-line-cap.html +40 -0
- data/doc/en/cairo-line-cap.rd +15 -0
- data/doc/en/cairo-line-join.html +40 -0
- data/doc/en/cairo-line-join.rd +15 -0
- data/doc/en/cairo-linear-pattern.html +63 -0
- data/doc/en/cairo-linear-pattern.rd +28 -0
- data/doc/en/cairo-matrix.html +257 -0
- data/doc/en/cairo-matrix.rd +186 -0
- data/doc/en/cairo-no-current-point-error.html +50 -0
- data/doc/en/cairo-no-current-point-error.rd +17 -0
- data/doc/en/cairo-null-pointer-error.html +50 -0
- data/doc/en/cairo-null-pointer-error.rd +17 -0
- data/doc/en/cairo-operator.html +51 -0
- data/doc/en/cairo-operator.rd +26 -0
- data/doc/en/cairo-paper-parse-error.html +50 -0
- data/doc/en/cairo-paper-parse-error.rd +17 -0
- data/doc/en/cairo-paper-unknown-paper-name.html +69 -0
- data/doc/en/cairo-paper-unknown-paper-name.rd +30 -0
- data/doc/en/cairo-paper-unknown-unit.html +69 -0
- data/doc/en/cairo-paper-unknown-unit.rd +30 -0
- data/doc/en/cairo-paper-unrecognized-paper-description.html +69 -0
- data/doc/en/cairo-paper-unrecognized-paper-description.rd +30 -0
- data/doc/en/cairo-paper.html +187 -0
- data/doc/en/cairo-paper.rd +141 -0
- data/doc/en/cairo-path-close-path.html +52 -0
- data/doc/en/cairo-path-close-path.rd +21 -0
- data/doc/en/cairo-path-curve-to.html +52 -0
- data/doc/en/cairo-path-curve-to.rd +21 -0
- data/doc/en/cairo-path-data-type.html +41 -0
- data/doc/en/cairo-path-data-type.rd +16 -0
- data/doc/en/cairo-path-data.html +101 -0
- data/doc/en/cairo-path-data.rd +62 -0
- data/doc/en/cairo-path-line-to.html +52 -0
- data/doc/en/cairo-path-line-to.rd +21 -0
- data/doc/en/cairo-path-move-to.html +52 -0
- data/doc/en/cairo-path-move-to.rd +21 -0
- data/doc/en/cairo-path.html +158 -0
- data/doc/en/cairo-path.rd +109 -0
- data/doc/en/cairo-pattern-type-mismatch-error.html +50 -0
- data/doc/en/cairo-pattern-type-mismatch-error.rd +17 -0
- data/doc/en/cairo-pattern.html +102 -0
- data/doc/en/cairo-pattern.rd +62 -0
- data/doc/en/cairo-pdf-surface.html +60 -0
- data/doc/en/cairo-pdf-surface.rd +27 -0
- data/doc/en/cairo-point.html +77 -0
- data/doc/en/cairo-point.rd +42 -0
- data/doc/en/cairo-ps-level.html +52 -0
- data/doc/en/cairo-ps-level.rd +24 -0
- data/doc/en/cairo-ps-surface.html +95 -0
- data/doc/en/cairo-ps-surface.rd +55 -0
- data/doc/en/cairo-quartz-image-surface.html +60 -0
- data/doc/en/cairo-quartz-image-surface.rd +27 -0
- data/doc/en/cairo-quartz-surface.html +60 -0
- data/doc/en/cairo-quartz-surface.rd +27 -0
- data/doc/en/cairo-radial-pattern.html +63 -0
- data/doc/en/cairo-radial-pattern.rd +28 -0
- data/doc/en/cairo-read-error.html +50 -0
- data/doc/en/cairo-read-error.rd +17 -0
- data/doc/en/cairo-rectangle.html +92 -0
- data/doc/en/cairo-rectangle.rd +54 -0
- data/doc/en/cairo-scaled-font.html +87 -0
- data/doc/en/cairo-scaled-font.rd +50 -0
- data/doc/en/cairo-solid-pattern.html +65 -0
- data/doc/en/cairo-solid-pattern.rd +31 -0
- data/doc/en/cairo-subpixel-order.html +42 -0
- data/doc/en/cairo-subpixel-order.rd +17 -0
- data/doc/en/cairo-surface-finished-error.html +50 -0
- data/doc/en/cairo-surface-finished-error.rd +17 -0
- data/doc/en/cairo-surface-pattern.html +60 -0
- data/doc/en/cairo-surface-pattern.rd +27 -0
- data/doc/en/cairo-surface-type-mismatch-error.html +50 -0
- data/doc/en/cairo-surface-type-mismatch-error.rd +17 -0
- data/doc/en/cairo-surface.html +114 -0
- data/doc/en/cairo-surface.rd +72 -0
- data/doc/en/cairo-svg-surface.html +80 -0
- data/doc/en/cairo-svg-surface.rd +44 -0
- data/doc/en/cairo-svg-version.html +52 -0
- data/doc/en/cairo-svg-version.rd +24 -0
- data/doc/en/cairo-temp-file-error.html +50 -0
- data/doc/en/cairo-temp-file-error.rd +17 -0
- data/doc/en/cairo-text-extents.html +79 -0
- data/doc/en/cairo-text-extents.rd +44 -0
- data/doc/en/cairo-win32-printing-surface.html +60 -0
- data/doc/en/cairo-win32-printing-surface.rd +27 -0
- data/doc/en/cairo-win32-surface.html +65 -0
- data/doc/en/cairo-win32-surface.rd +31 -0
- data/doc/en/cairo-write-error.html +50 -0
- data/doc/en/cairo-write-error.rd +17 -0
- data/doc/en/cairo.html +123 -0
- data/doc/en/cairo.rd +95 -0
- data/doc/en/index.html +1080 -0
- data/doc/en/index.rd +1051 -0
- data/doc/index.html +18 -0
- data/doc/ja/cairo-antialias.html +57 -0
- data/doc/ja/cairo-clip-not-representable-error.html +56 -0
- data/doc/ja/cairo-color-base.html +75 -0
- data/doc/ja/cairo-color-cmyk.html +152 -0
- data/doc/ja/cairo-color-hsv.html +135 -0
- data/doc/ja/cairo-color-rgb.html +145 -0
- data/doc/ja/cairo-color-x11.html +183 -0
- data/doc/ja/cairo-color.html +317 -0
- data/doc/ja/cairo-content.html +51 -0
- data/doc/ja/cairo-context-blur.html +53 -0
- data/doc/ja/cairo-context-circle.html +54 -0
- data/doc/ja/cairo-context-color.html +52 -0
- data/doc/ja/cairo-context-path.html +77 -0
- data/doc/ja/cairo-context-rectangle.html +60 -0
- data/doc/ja/cairo-context-triangle.html +47 -0
- data/doc/ja/cairo-context.html +1449 -0
- data/doc/ja/cairo-error.html +56 -0
- data/doc/ja/cairo-extend.html +56 -0
- data/doc/ja/cairo-file-not-found.html +51 -0
- data/doc/ja/cairo-fill-rule.html +58 -0
- data/doc/ja/cairo-filter.html +43 -0
- data/doc/ja/cairo-font-extents.html +110 -0
- data/doc/ja/cairo-font-face.html +55 -0
- data/doc/ja/cairo-font-options.html +186 -0
- data/doc/ja/cairo-font-slant.html +50 -0
- data/doc/ja/cairo-font-weight.html +47 -0
- data/doc/ja/cairo-format.html +81 -0
- data/doc/ja/cairo-glyph.html +115 -0
- data/doc/ja/cairo-gradient-pattern.html +119 -0
- data/doc/ja/cairo-hint-metrics.html +57 -0
- data/doc/ja/cairo-hint-style.html +64 -0
- data/doc/ja/cairo-image-surface.html +131 -0
- data/doc/ja/cairo-invalid-content-error.html +54 -0
- data/doc/ja/cairo-invalid-dash-error.html +54 -0
- data/doc/ja/cairo-invalid-dsc-comment-error.html +54 -0
- data/doc/ja/cairo-invalid-format-error.html +54 -0
- data/doc/ja/cairo-invalid-index-error.html +54 -0
- data/doc/ja/cairo-invalid-matrix-error.html +54 -0
- data/doc/ja/cairo-invalid-path-data-error.html +54 -0
- data/doc/ja/cairo-invalid-pop-group-error.html +54 -0
- data/doc/ja/cairo-invalid-restore-error.html +55 -0
- data/doc/ja/cairo-invalid-status-error.html +55 -0
- data/doc/ja/cairo-invalid-stride-error.html +55 -0
- data/doc/ja/cairo-invalid-string-error.html +54 -0
- data/doc/ja/cairo-invalid-visual-error.html +57 -0
- data/doc/ja/cairo-line-cap.html +50 -0
- data/doc/ja/cairo-line-join.html +53 -0
- data/doc/ja/cairo-linear-pattern.html +87 -0
- data/doc/ja/cairo-matrix.html +343 -0
- data/doc/ja/cairo-no-current-point-error.html +54 -0
- data/doc/ja/cairo-null-pointer-error.html +54 -0
- data/doc/ja/cairo-operator.html +51 -0
- data/doc/ja/cairo-paper-parse-error.html +55 -0
- data/doc/ja/cairo-paper-unknown-paper-name.html +76 -0
- data/doc/ja/cairo-paper-unknown-unit.html +75 -0
- data/doc/ja/cairo-paper-unrecognized-paper-description.html +76 -0
- data/doc/ja/cairo-paper.html +357 -0
- data/doc/ja/cairo-path-close-path.html +57 -0
- data/doc/ja/cairo-path-curve-to.html +70 -0
- data/doc/ja/cairo-path-data-type.html +53 -0
- data/doc/ja/cairo-path-data.html +127 -0
- data/doc/ja/cairo-path-line-to.html +62 -0
- data/doc/ja/cairo-path-move-to.html +62 -0
- data/doc/ja/cairo-path.html +144 -0
- data/doc/ja/cairo-pattern-type-mismatch-error.html +56 -0
- data/doc/ja/cairo-pattern.html +128 -0
- data/doc/ja/cairo-pdf-surface.html +86 -0
- data/doc/ja/cairo-point.html +90 -0
- data/doc/ja/cairo-ps-level.html +62 -0
- data/doc/ja/cairo-ps-surface.html +214 -0
- data/doc/ja/cairo-quartz-image-surface.html +75 -0
- data/doc/ja/cairo-quartz-surface.html +93 -0
- data/doc/ja/cairo-radial-pattern.html +93 -0
- data/doc/ja/cairo-read-error.html +55 -0
- data/doc/ja/cairo-rectangle.html +109 -0
- data/doc/ja/cairo-scaled-font.html +144 -0
- data/doc/ja/cairo-solid-pattern.html +87 -0
- data/doc/ja/cairo-subpixel-order.html +57 -0
- data/doc/ja/cairo-surface-finished-error.html +54 -0
- data/doc/ja/cairo-surface-pattern.html +68 -0
- data/doc/ja/cairo-surface-type-mismatch-error.html +56 -0
- data/doc/ja/cairo-surface.html +191 -0
- data/doc/ja/cairo-svg-surface.html +114 -0
- data/doc/ja/cairo-svg-version.html +66 -0
- data/doc/ja/cairo-temp-file-error.html +50 -0
- data/doc/ja/cairo-text-extents.html +101 -0
- data/doc/ja/cairo-win32-printing-surface.html +80 -0
- data/doc/ja/cairo-win32-surface.html +100 -0
- data/doc/ja/cairo-write-error.html +55 -0
- data/doc/ja/cairo.html +148 -0
- data/doc/ja/index.html +1080 -0
- data/extconf.rb +153 -0
- data/misc/update-colors.rb +143 -0
- data/pkg-config.rb +278 -0
- data/samples/agg/README +4 -0
- data/samples/agg/aa_demo.rb +47 -0
- data/samples/agg/aa_test.rb +304 -0
- data/samples/blur.rb +47 -0
- data/samples/pac.rb +99 -0
- data/samples/pac2.rb +171 -0
- data/samples/png.rb +45 -0
- data/samples/scalable.rb +56 -0
- data/samples/text-on-path.rb +60 -0
- data/samples/text2.rb +131 -0
- data/src/cairo.def +96 -0
- data/src/cairo.so +0 -0
- data/src/lib/cairo.rb +141 -0
- data/src/lib/cairo/color.rb +255 -0
- data/src/lib/cairo/colors.rb +656 -0
- data/src/lib/cairo/constants.rb +21 -0
- data/src/lib/cairo/context.rb +29 -0
- data/src/lib/cairo/context/blur.rb +45 -0
- data/src/lib/cairo/context/circle.rb +9 -0
- data/src/lib/cairo/context/color.rb +11 -0
- data/src/lib/cairo/context/path.rb +116 -0
- data/src/lib/cairo/context/rectangle.rb +33 -0
- data/src/lib/cairo/context/triangle.rb +12 -0
- data/src/lib/cairo/paper.rb +183 -0
- data/src/lib/cairo/papers.rb +41 -0
- data/src/lib/cairo/path.rb +15 -0
- data/src/lib/cairo/point.rb +7 -0
- data/src/libruby-cairo.a +0 -0
- data/src/rb_cairo.c +82 -0
- data/src/rb_cairo.h +264 -0
- data/src/rb_cairo_constants.c +456 -0
- data/src/rb_cairo_context.c +1548 -0
- data/src/rb_cairo_exception.c +214 -0
- data/src/rb_cairo_font_extents.c +125 -0
- data/src/rb_cairo_font_face.c +56 -0
- data/src/rb_cairo_font_options.c +197 -0
- data/src/rb_cairo_glyph.c +159 -0
- data/src/rb_cairo_matrix.c +350 -0
- data/src/rb_cairo_path.c +459 -0
- data/src/rb_cairo_pattern.c +540 -0
- data/src/rb_cairo_private.c +78 -0
- data/src/rb_cairo_private.h +72 -0
- data/src/rb_cairo_scaled_font.c +177 -0
- data/src/rb_cairo_surface.c +1252 -0
- data/src/rb_cairo_text_extents.c +138 -0
- data/test/run-test.rb +15 -0
- data/test/test_paper.rb +81 -0
- data/test/test_pkg_config.rb +122 -0
- metadata +490 -0
@@ -0,0 +1,53 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Drawing</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="index.html" title="Cairo: A Vector Graphics Library">
|
9
|
+
<link rel="prev" href="index.html" title="Cairo: A Vector Graphics Library">
|
10
|
+
<link rel="next" href="cairo-cairo-t.html" title="cairo_t">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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="index.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
26
|
+
<td> </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><a accesskey="n" href="cairo-cairo-t.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="chapter" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title">
|
33
|
+
<a name="Drawing"></a>Drawing</h2></div></div></div>
|
34
|
+
<div class="toc"><dl>
|
35
|
+
<dt>
|
36
|
+
<span class="refentrytitle"><a href="cairo-cairo-t.html">cairo_t</a></span><span class="refpurpose"> — The cairo drawing context</span>
|
37
|
+
</dt>
|
38
|
+
<dt>
|
39
|
+
<span class="refentrytitle"><a href="cairo-Paths.html">Paths</a></span><span class="refpurpose"> — Creating paths and manipulating path data</span>
|
40
|
+
</dt>
|
41
|
+
<dt>
|
42
|
+
<span class="refentrytitle"><a href="cairo-Patterns.html">cairo_pattern_t</a></span><span class="refpurpose"> — Sources for drawing</span>
|
43
|
+
</dt>
|
44
|
+
<dt>
|
45
|
+
<span class="refentrytitle"><a href="cairo-Transformations.html">Transformations</a></span><span class="refpurpose"> — Manipulating the current transformation matrix</span>
|
46
|
+
</dt>
|
47
|
+
<dt>
|
48
|
+
<span class="refentrytitle"><a href="cairo-Text.html">Text</a></span><span class="refpurpose"> — Rendering text and glyphs</span>
|
49
|
+
</dt>
|
50
|
+
</dl></div>
|
51
|
+
</div>
|
52
|
+
</body>
|
53
|
+
</html>
|
@@ -0,0 +1,56 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Fonts</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="index.html" title="Cairo: A Vector Graphics Library">
|
9
|
+
<link rel="prev" href="cairo-Text.html" title="Text">
|
10
|
+
<link rel="next" href="cairo-cairo-font-face-t.html" title="cairo_font_face_t">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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="cairo-Text.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
26
|
+
<td> </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><a accesskey="n" href="cairo-cairo-font-face-t.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="chapter" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title">
|
33
|
+
<a name="Fonts"></a>Fonts</h2></div></div></div>
|
34
|
+
<div class="toc"><dl>
|
35
|
+
<dt>
|
36
|
+
<span class="refentrytitle"><a href="cairo-cairo-font-face-t.html">cairo_font_face_t</a></span><span class="refpurpose"> — Base class for font faces</span>
|
37
|
+
</dt>
|
38
|
+
<dt>
|
39
|
+
<span class="refentrytitle"><a href="cairo-Scaled-Fonts.html">cairo_scaled_font_t</a></span><span class="refpurpose"> — Font face at particular size and options</span>
|
40
|
+
</dt>
|
41
|
+
<dt>
|
42
|
+
<span class="refentrytitle"><a href="cairo-Font-Options.html">cairo_font_options_t</a></span><span class="refpurpose"> — How a font should be rendered</span>
|
43
|
+
</dt>
|
44
|
+
<dt>
|
45
|
+
<span class="refentrytitle"><a href="cairo-FreeType-Fonts.html">FreeType Fonts</a></span><span class="refpurpose"> — Font support for FreeType</span>
|
46
|
+
</dt>
|
47
|
+
<dt>
|
48
|
+
<span class="refentrytitle"><a href="cairo-Win32-Fonts.html">Win32 Fonts</a></span><span class="refpurpose"> — Font support for Microsoft Windows</span>
|
49
|
+
</dt>
|
50
|
+
<dt>
|
51
|
+
<span class="refentrytitle"><a href="cairo-Quartz-Fonts.html">Quartz (CGFont) Fonts</a></span><span class="refpurpose"> — Font support via CGFont on OS X</span>
|
52
|
+
</dt>
|
53
|
+
</dl></div>
|
54
|
+
</div>
|
55
|
+
</body>
|
56
|
+
</html>
|
@@ -0,0 +1,50 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Utilities</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="index.html" title="Cairo: A Vector Graphics Library">
|
9
|
+
<link rel="prev" href="cairo-XLib-Surfaces.html" title="XLib Surfaces">
|
10
|
+
<link rel="next" href="cairo-cairo-matrix-t.html" title="cairo_matrix_t">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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="cairo-XLib-Surfaces.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
26
|
+
<td> </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><a accesskey="n" href="cairo-cairo-matrix-t.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="chapter" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title">
|
33
|
+
<a name="Support"></a>Utilities</h2></div></div></div>
|
34
|
+
<div class="toc"><dl>
|
35
|
+
<dt>
|
36
|
+
<span class="refentrytitle"><a href="cairo-cairo-matrix-t.html">cairo_matrix_t</a></span><span class="refpurpose"> — Generic matrix operations</span>
|
37
|
+
</dt>
|
38
|
+
<dt>
|
39
|
+
<span class="refentrytitle"><a href="cairo-Error-Handling.html">Error handling</a></span><span class="refpurpose"> — Decoding cairo's status</span>
|
40
|
+
</dt>
|
41
|
+
<dt>
|
42
|
+
<span class="refentrytitle"><a href="cairo-Version-Information.html">Version Information</a></span><span class="refpurpose"> — Compile-time and run-time version checks.</span>
|
43
|
+
</dt>
|
44
|
+
<dt>
|
45
|
+
<span class="refentrytitle"><a href="cairo-Types.html">Types</a></span><span class="refpurpose"> — Generic data types</span>
|
46
|
+
</dt>
|
47
|
+
</dl></div>
|
48
|
+
</div>
|
49
|
+
</body>
|
50
|
+
</html>
|
@@ -0,0 +1,65 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Surfaces</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="index.html" title="Cairo: A Vector Graphics Library">
|
9
|
+
<link rel="prev" href="cairo-Quartz-Fonts.html" title="Quartz (CGFont) Fonts">
|
10
|
+
<link rel="next" href="cairo-cairo-surface-t.html" title="cairo_surface_t">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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="cairo-Quartz-Fonts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
26
|
+
<td> </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><a accesskey="n" href="cairo-cairo-surface-t.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="chapter" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title">
|
33
|
+
<a name="Surfaces"></a>Surfaces</h2></div></div></div>
|
34
|
+
<div class="toc"><dl>
|
35
|
+
<dt>
|
36
|
+
<span class="refentrytitle"><a href="cairo-cairo-surface-t.html">cairo_surface_t</a></span><span class="refpurpose"> — Base class for surfaces</span>
|
37
|
+
</dt>
|
38
|
+
<dt>
|
39
|
+
<span class="refentrytitle"><a href="cairo-Image-Surfaces.html">Image Surfaces</a></span><span class="refpurpose"> — Rendering to memory buffers</span>
|
40
|
+
</dt>
|
41
|
+
<dt>
|
42
|
+
<span class="refentrytitle"><a href="cairo-PDF-Surfaces.html">PDF Surfaces</a></span><span class="refpurpose"> — Rendering PDF documents</span>
|
43
|
+
</dt>
|
44
|
+
<dt>
|
45
|
+
<span class="refentrytitle"><a href="cairo-PNG-Support.html">PNG Support</a></span><span class="refpurpose"> — Reading and writing PNG images</span>
|
46
|
+
</dt>
|
47
|
+
<dt>
|
48
|
+
<span class="refentrytitle"><a href="cairo-PostScript-Surfaces.html">PostScript Surfaces</a></span><span class="refpurpose"> — Rendering PostScript documents</span>
|
49
|
+
</dt>
|
50
|
+
<dt>
|
51
|
+
<span class="refentrytitle"><a href="cairo-Win32-Surfaces.html">Win32 Surfaces</a></span><span class="refpurpose"> — Microsoft Windows surface support</span>
|
52
|
+
</dt>
|
53
|
+
<dt>
|
54
|
+
<span class="refentrytitle"><a href="cairo-SVG-Surfaces.html">SVG Surfaces</a></span><span class="refpurpose"> — Rendering SVG documents</span>
|
55
|
+
</dt>
|
56
|
+
<dt>
|
57
|
+
<span class="refentrytitle"><a href="cairo-Quartz-Surfaces.html">Quartz Surfaces</a></span><span class="refpurpose"> — Rendering to Quartz surfaces</span>
|
58
|
+
</dt>
|
59
|
+
<dt>
|
60
|
+
<span class="refentrytitle"><a href="cairo-XLib-Surfaces.html">XLib Surfaces</a></span><span class="refpurpose"> — X Window System rendering using XLib</span>
|
61
|
+
</dt>
|
62
|
+
</dl></div>
|
63
|
+
</div>
|
64
|
+
</body>
|
65
|
+
</html>
|
@@ -0,0 +1,128 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Error handling</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" 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-streams.html" title="Streams and File I/O">
|
10
|
+
<link rel="next" href="bindings-patterns.html" title="Patterns">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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-streams.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><a accesskey="n" href="bindings-patterns.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="sect1" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
33
|
+
<a name="bindings-errors"></a>Error handling</h2></div></div></div>
|
34
|
+
<p>
|
35
|
+
The error handling approach in C for Cairo has multiple
|
36
|
+
elements:
|
37
|
+
</p>
|
38
|
+
<div class="itemizedlist"><ul type="disc">
|
39
|
+
<li><p>
|
40
|
+
When a method on an object fails, the object is put into
|
41
|
+
an error state. Subsequent operations on the object do
|
42
|
+
nothing. The status of the object can be queried with
|
43
|
+
a function like <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">status()</code></a>.
|
44
|
+
</p></li>
|
45
|
+
<li>
|
46
|
+
<p>
|
47
|
+
Constructors, rather than
|
48
|
+
returning <code class="constant">NULL</code> on out-of-memory failure,
|
49
|
+
return a special singleton object on which all
|
50
|
+
operations do nothing. Retrieving the status of the
|
51
|
+
singleton object returns <code class="constant">CAIRO_STATUS_NO_MEMORY</code>
|
52
|
+
</p>
|
53
|
+
<p class="remark"><i><span class="remark">
|
54
|
+
Is this going to apply to
|
55
|
+
<span class="type">cairo_surface_t</span> as well?
|
56
|
+
</span></i></p>
|
57
|
+
<p class="remark"><i><span class="remark">
|
58
|
+
What about cairo_copy_path_data()? It's probably going to
|
59
|
+
have to return <code class="constant">NULL</code>.
|
60
|
+
</span></i></p>
|
61
|
+
</li>
|
62
|
+
<li><p>
|
63
|
+
Errors propagate from object to object. Setting a pattern
|
64
|
+
in an out-of-memory state as the source of a
|
65
|
+
<span class="type">cairo_t</span> puts the type into an error state.
|
66
|
+
</p></li>
|
67
|
+
</ul></div>
|
68
|
+
<p class="remark"><i><span class="remark">Much of the above is not yet implemented at the time of
|
69
|
+
this writing</span></i></p>
|
70
|
+
<p>
|
71
|
+
A language binding could copy the C approach, and for a
|
72
|
+
language without exceptions, this is likely the right thing
|
73
|
+
to do. However, for a language with exceptions, exposing
|
74
|
+
a completely different style of error handling for cairo
|
75
|
+
would be strange. So, instead, status should be checked
|
76
|
+
after every call to cairo, and exceptions thrown as necessary.
|
77
|
+
</p>
|
78
|
+
<p>
|
79
|
+
One problem that can arise with this, in languages
|
80
|
+
where handling exceptions is mandatory (like Java), is that almost
|
81
|
+
every cairo function can result in a status being set,
|
82
|
+
usually because of an out-of-memory condition. This could make
|
83
|
+
cairo hard to use. To resolve this problem, let's classify then
|
84
|
+
cairo status codes:
|
85
|
+
</p>
|
86
|
+
<pre class="programlisting">
|
87
|
+
/* Memory */
|
88
|
+
CAIRO_STATUS_NO_MEMORY,
|
89
|
+
|
90
|
+
/* Programmer error */
|
91
|
+
CAIRO_STATUS_INVALID_RESTORE
|
92
|
+
CAIRO_STATUS_INVALID_POP_GROUP
|
93
|
+
CAIRO_STATUS_NO_CURRENT_POINT
|
94
|
+
CAIRO_STATUS_INVALID_MATRIX
|
95
|
+
CAIRO_STATUS_NO_TARGET_SURFACE
|
96
|
+
CAIRO_STATUS_INVALID_STRING
|
97
|
+
CAIRO_STATUS_SURFACE_FINISHED
|
98
|
+
CAIRO_STATUS_BAD_NESTING
|
99
|
+
|
100
|
+
/* Language binding implementation */
|
101
|
+
CAIRO_STATUS_NULL_POINTER
|
102
|
+
CAIRO_STATUS_INVALID_PATH_DATA
|
103
|
+
CAIRO_STATUS_SURFACE_TYPE_MISMATCH
|
104
|
+
|
105
|
+
/* Other */
|
106
|
+
CAIRO_STATUS_READ_ERROR
|
107
|
+
CAIRO_STATUS_WRITE_ERROR
|
108
|
+
</pre>
|
109
|
+
<p>
|
110
|
+
If we look at these, the
|
111
|
+
<code class="constant">CAIRO_STATUS_NO_MEMORY</code>
|
112
|
+
should map to the native out-of-memory exception, which could
|
113
|
+
happen at any point in any case. Most of the others indicate
|
114
|
+
programmer error, and handling them in user code would be
|
115
|
+
silly. These should be mapped into whatever the language uses
|
116
|
+
for assertion failures, rather than errors that are normally
|
117
|
+
handled. (In Java, a subclass of Error rather than Exception,
|
118
|
+
perhaps.) And <code class="constant">CAIRO_STATUS_READ_ERROR</code>,
|
119
|
+
and <code class="constant">CAIRO_STATUS_WRITE_ERROR</code> can occur
|
120
|
+
only in very specific places. (In fact, as described
|
121
|
+
in <a class="xref" href="bindings-streams.html" title="Streams and File I/O">the section called “Streams and File I/O”</a>, these errors may be
|
122
|
+
mapped into the language's native I/O error types.)
|
123
|
+
So, there really aren't exceptions that the programmer must
|
124
|
+
handle at most points in the Cairo API.
|
125
|
+
</p>
|
126
|
+
</div>
|
127
|
+
</body>
|
128
|
+
</html>
|
@@ -0,0 +1,59 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Fonts</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" 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-surfaces.html" title="Surfaces">
|
10
|
+
<link rel="next" href="bindings-path.html" title="cairo_path_t">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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-surfaces.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><a accesskey="n" href="bindings-path.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="sect1" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
33
|
+
<a name="bindings-fonts"></a>Fonts</h2></div></div></div>
|
34
|
+
<p>
|
35
|
+
Fonts are once more an area where there is a hierarchy of types:
|
36
|
+
</p>
|
37
|
+
<pre class="programlisting">
|
38
|
+
cairo_font_face_t
|
39
|
+
cairo_ft_font_face_t
|
40
|
+
cairo_win32_font_face_t
|
41
|
+
cairo_scaled_font_t
|
42
|
+
cairo_ft_scaled_font_t
|
43
|
+
cairo_win32_scaled_font_t
|
44
|
+
</pre>
|
45
|
+
<p>
|
46
|
+
The methods on the subtypes are, however, not useful without
|
47
|
+
bindings for fontconfig and FreeType or for the Win32 GDI,
|
48
|
+
so most language bindings will choose not to bind these
|
49
|
+
types.
|
50
|
+
</p>
|
51
|
+
<p>
|
52
|
+
The <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-set-user-data"><code class="function">cairo_font_face_set_user_data()</code></a>,
|
53
|
+
and <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-user-data"><code class="function">cairo_font_face_get_user_data()</code></a>
|
54
|
+
methods are provided for use in language bindings, and should
|
55
|
+
not be directly exposed to applications.
|
56
|
+
</p>
|
57
|
+
</div>
|
58
|
+
</body>
|
59
|
+
</html>
|
@@ -0,0 +1,129 @@
|
|
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=US-ASCII">
|
5
|
+
<title>Memory management</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
7
|
+
<link rel="start" 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="language-bindings.html" title="Appendix A. Creating a language binding for cairo">
|
10
|
+
<link rel="next" href="bindings-return-values.html" title="Multiple return values">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
<link rel="chapter" href="Drawing.html" title="Drawing">
|
14
|
+
<link rel="chapter" href="Fonts.html" title="Fonts">
|
15
|
+
<link rel="chapter" href="Surfaces.html" title="Surfaces">
|
16
|
+
<link rel="chapter" href="Support.html" title="Utilities">
|
17
|
+
<link rel="index" href="ix01.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="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="language-bindings.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><a accesskey="n" href="bindings-return-values.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
30
|
+
</tr></table>
|
31
|
+
<div class="sect1" lang="en">
|
32
|
+
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
33
|
+
<a name="bindings-memory"></a>Memory management</h2></div></div></div>
|
34
|
+
<p>
|
35
|
+
The objects in cairo can roughly be divided into two types:
|
36
|
+
reference-counted, opaque types like
|
37
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a>
|
38
|
+
and plain structures like
|
39
|
+
<a class="link" href="cairo-Text.html#cairo-glyph-t"><span class="type">cairo_glyph_t</span></a>.
|
40
|
+
<a class="link" href="cairo-Paths.html#cairo-path-t"><span class="type">cairo_path_t</span></a>
|
41
|
+
and
|
42
|
+
<a class="link" href="cairo-Paths.html#cairo-path-data-t"><span class="type">cairo_path_data_t</span></a>
|
43
|
+
are special cases and are treated separately in this appendix.
|
44
|
+
</p>
|
45
|
+
<p>
|
46
|
+
Refcounted opaque types all have a
|
47
|
+
<code class="function">..._reference()</code>
|
48
|
+
function to increase the refcount by one and a
|
49
|
+
<code class="function">..._destroy()</code> to decrease the refcount
|
50
|
+
by one. These should not be exposed to the user of the language
|
51
|
+
binding, but rather used to implement memory management within
|
52
|
+
the language binding. The simplest way to do memory management
|
53
|
+
for a language binding is to treat the language binding object
|
54
|
+
as a simple handle to the cairo object. The language binding
|
55
|
+
object references the cairo object, and unreferences it when
|
56
|
+
finalized. This is the recommended method, though there are
|
57
|
+
a couple of caveats to be noted:
|
58
|
+
</p>
|
59
|
+
<div class="itemizedlist"><ul type="disc">
|
60
|
+
<li><p>
|
61
|
+
Equality won't work as expected. You can have two language
|
62
|
+
objects for the same cairo and they won't necessarily
|
63
|
+
compare equal. If the language allows customizing the
|
64
|
+
equality operation, then this is fixable by comparing
|
65
|
+
the underlying pointers. It also can be fixed by creating
|
66
|
+
at most one language object per cairo object, and
|
67
|
+
uniquifying via a <em class="firstterm">pin table</em> (a hash
|
68
|
+
table that goes from cairo object to language object).
|
69
|
+
For <span class="type">cairo_surface_t</span> you can use also
|
70
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-user-data"><code class="function">cairo_surface_set_user_data()</code></a>
|
71
|
+
instead of a separate pin table.
|
72
|
+
</p></li>
|
73
|
+
<li>
|
74
|
+
<p>
|
75
|
+
Derivation from the language object doesn't work because
|
76
|
+
you can lose the language object while keeping the Cairo
|
77
|
+
object. Code like:
|
78
|
+
</p>
|
79
|
+
<pre class="programlisting">
|
80
|
+
public class MySurface (ImageSurface) {
|
81
|
+
public MySurface (width, height) {
|
82
|
+
super (Format.ARGB32, width, height);
|
83
|
+
}
|
84
|
+
public int get42 () {
|
85
|
+
return 42;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
cr = Cairo(MySurface(width, height));
|
90
|
+
surface = cr.getTarget();
|
91
|
+
</pre>
|
92
|
+
<p>
|
93
|
+
Can result in <code class="varname">surface</code> containing an
|
94
|
+
<code class="classname">ImageSurface</code> not a <code class="classname">MySurface</code>.
|
95
|
+
This is not easily fixable without creating memory leaks,
|
96
|
+
and it's probably best to simply forbid deriving from the
|
97
|
+
language objects.
|
98
|
+
</p>
|
99
|
+
</li>
|
100
|
+
</ul></div>
|
101
|
+
<p>
|
102
|
+
When a plain structure is used as a return value from cairo,
|
103
|
+
this is done by passing it as a “out parameter”.
|
104
|
+
</p>
|
105
|
+
<pre class="programlisting">
|
106
|
+
cairo_font_extents_t extents;
|
107
|
+
|
108
|
+
cairo_font_extents (cr, &extents);</pre>
|
109
|
+
<p>
|
110
|
+
In a language binding, this should typically be treated
|
111
|
+
as a return value:
|
112
|
+
</p>
|
113
|
+
<pre class="programlisting">
|
114
|
+
FontExtents extents = cr.fontExtents ();</pre>
|
115
|
+
<p>
|
116
|
+
A language binding has a choice in how it implements the
|
117
|
+
language objects for plain structures. It can use a pure
|
118
|
+
language object with fields corresponding to those of the C
|
119
|
+
structure, and convert from and to the C structure when calling
|
120
|
+
cairo functions or converting cairo return values. Or it
|
121
|
+
can keep a pointer to the C structure internally and wrap
|
122
|
+
it inside a language object much like occurs for refcounted
|
123
|
+
objects. The choice should be invisible to the user: they should
|
124
|
+
be able to imagine that it is implemented as a pure language
|
125
|
+
object.
|
126
|
+
</p>
|
127
|
+
</div>
|
128
|
+
</body>
|
129
|
+
</html>
|