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
data/src/cairo.def
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
EXPORTS
|
2
|
+
Init_cairo
|
3
|
+
rb_mCairo DATA
|
4
|
+
rb_cCairo_Context DATA
|
5
|
+
rb_cCairo_Path DATA
|
6
|
+
rb_cCairo_PathData DATA
|
7
|
+
rb_cCairo_PathMoveTo DATA
|
8
|
+
rb_cCairo_PathLineTo DATA
|
9
|
+
rb_cCairo_PathCurveTo DATA
|
10
|
+
rb_cCairo_PathClosePath DATA
|
11
|
+
rb_cCairo_Matrix DATA
|
12
|
+
rb_cCairo_Pattern DATA
|
13
|
+
rb_cCairo_SolidPattern DATA
|
14
|
+
rb_cCairo_SurfacePattern DATA
|
15
|
+
rb_cCairo_GradientPattern DATA
|
16
|
+
rb_cCairo_LinearPattern DATA
|
17
|
+
rb_cCairo_RadialPattern DATA
|
18
|
+
rb_cCairo_FontFace DATA
|
19
|
+
rb_cCairo_FontExtents DATA
|
20
|
+
rb_cCairo_FontOptions DATA
|
21
|
+
rb_cCairo_ScaledFont DATA
|
22
|
+
rb_cCairo_TextExtents DATA
|
23
|
+
rb_cCairo_Glyph DATA
|
24
|
+
rb_cCairo_Surface DATA
|
25
|
+
rb_cCairo_ImageSurface DATA
|
26
|
+
rb_cCairo_PDFSurface DATA
|
27
|
+
rb_cCairo_PSSurface DATA
|
28
|
+
rb_cCairo_SVGSurface DATA
|
29
|
+
rb_cCairo_Win32Surface DATA
|
30
|
+
rb_cCairo_Win32PrintingSurface DATA
|
31
|
+
rb_cCairo_QuartzSurface DATA
|
32
|
+
rb_cCairo_QuartzImageSurface DATA
|
33
|
+
|
34
|
+
rb_mCairo_Operator DATA
|
35
|
+
rb_mCairo_Antialias DATA
|
36
|
+
rb_mCairo_FillRule DATA
|
37
|
+
rb_mCairo_LineCap DATA
|
38
|
+
rb_mCairo_LineJoin DATA
|
39
|
+
rb_mCairo_FontSlant DATA
|
40
|
+
rb_mCairo_FontWeight DATA
|
41
|
+
rb_mCairo_SubpixelOrder DATA
|
42
|
+
rb_mCairo_HintStyle DATA
|
43
|
+
rb_mCairo_HintMetrics DATA
|
44
|
+
rb_mCairo_PathDataType DATA
|
45
|
+
rb_mCairo_Content DATA
|
46
|
+
rb_mCairo_Format DATA
|
47
|
+
rb_mCairo_Extend DATA
|
48
|
+
rb_mCairo_Filter DATA
|
49
|
+
rb_mCairo_SVGVersion DATA
|
50
|
+
rb_mCairo_PSLevel DATA
|
51
|
+
|
52
|
+
rb_mCairo_Color DATA
|
53
|
+
rb_cCairo_Color_Base DATA
|
54
|
+
rb_cCairo_Paper DATA
|
55
|
+
|
56
|
+
rb_cairo_context_from_ruby_object
|
57
|
+
rb_cairo_context_to_ruby_object
|
58
|
+
rb_cairo_path_from_ruby_object
|
59
|
+
rb_cairo_path_to_ruby_object
|
60
|
+
rb_cairo_matrix_from_ruby_object
|
61
|
+
rb_cairo_matrix_to_ruby_object
|
62
|
+
rb_cairo_pattern_from_ruby_object
|
63
|
+
rb_cairo_pattern_to_ruby_object
|
64
|
+
rb_cairo_font_face_from_ruby_object
|
65
|
+
rb_cairo_font_face_to_ruby_object
|
66
|
+
rb_cairo_font_extents_from_ruby_object
|
67
|
+
rb_cairo_font_extents_to_ruby_object
|
68
|
+
rb_cairo_font_options_to_ruby_object
|
69
|
+
rb_cairo_font_options_from_ruby_object
|
70
|
+
rb_cairo_scaled_font_to_ruby_object
|
71
|
+
rb_cairo_scaled_font_from_ruby_object
|
72
|
+
rb_cairo_text_extents_from_ruby_object
|
73
|
+
rb_cairo_text_extents_to_ruby_object
|
74
|
+
rb_cairo_glyph_from_ruby_object
|
75
|
+
rb_cairo_glyph_to_ruby_object
|
76
|
+
rb_cairo_surface_from_ruby_object
|
77
|
+
rb_cairo_surface_to_ruby_object
|
78
|
+
rb_cairo_surface_to_ruby_object_with_destroy
|
79
|
+
rb_cairo_operator_from_ruby_object
|
80
|
+
rb_cairo_antialias_from_ruby_object
|
81
|
+
rb_cairo_fill_rule_from_ruby_object
|
82
|
+
rb_cairo_line_cap_from_ruby_object
|
83
|
+
rb_cairo_line_join_from_ruby_object
|
84
|
+
rb_cairo_font_slant_from_ruby_object
|
85
|
+
rb_cairo_font_weight_from_ruby_object
|
86
|
+
rb_cairo_subpixel_order_from_ruby_object
|
87
|
+
rb_cairo_hint_style_from_ruby_object
|
88
|
+
rb_cairo_hint_metrics_from_ruby_object
|
89
|
+
rb_cairo_path_data_type_from_ruby_object
|
90
|
+
rb_cairo_content_from_ruby_object
|
91
|
+
rb_cairo_format_from_ruby_object
|
92
|
+
rb_cairo_extend_from_ruby_object
|
93
|
+
rb_cairo_filter_from_ruby_object
|
94
|
+
rb_cairo_svg_version_from_ruby_object
|
95
|
+
rb_cairo_ps_level_from_ruby_object
|
96
|
+
rb_cairo_check_status
|
data/src/cairo.so
ADDED
Binary file
|
data/src/lib/cairo.rb
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
# vim: filetype=ruby:expandtab:shiftwidth=2:tabstop=8:softtabstop=2 :
|
2
|
+
|
3
|
+
if /mingw|mswin|mswin32/ =~ RUBY_PLATFORM
|
4
|
+
require 'pathname'
|
5
|
+
base_dir = Pathname(File.dirname(__FILE__))
|
6
|
+
base_dir = base_dir.parent.parent + "cairo"
|
7
|
+
if base_dir.exist?
|
8
|
+
base_dir = base_dir.to_s.gsub(/\//, "\\")
|
9
|
+
ENV['PATH'] = %w(bin lib).collect do |dir|
|
10
|
+
"#{base_dir}\\#{dir};"
|
11
|
+
end.join('') + ENV['PATH']
|
12
|
+
else
|
13
|
+
require 'rbconfig'
|
14
|
+
ENV['PATH'] = %w(bin lib).collect do |dir|
|
15
|
+
"#{Config::CONFIG["prefix"]}\\lib\\GTK\\#{dir};"
|
16
|
+
end.join('') + ENV['PATH']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
module Cairo
|
21
|
+
class << self
|
22
|
+
def __add_one_arg_setter(klass)
|
23
|
+
names = klass.instance_methods(false)
|
24
|
+
names.each do |name|
|
25
|
+
if /^set_(.*)/ =~ name and
|
26
|
+
not names.include? "#{$1}=" and
|
27
|
+
klass.instance_method(name).arity == 1
|
28
|
+
klass.module_eval("def #{$1}=(val); set_#{$1}(val); val; end")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def normalize_const_name(name)
|
34
|
+
name.to_s.upcase.gsub(/[\s\-_.]+/, "_")
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
require 'cairo/color'
|
40
|
+
require 'cairo/paper'
|
41
|
+
|
42
|
+
require 'cairo.so'
|
43
|
+
require 'cairo/constants'
|
44
|
+
|
45
|
+
module Cairo
|
46
|
+
class << self
|
47
|
+
undef __add_one_arg_setter
|
48
|
+
end
|
49
|
+
|
50
|
+
module_function
|
51
|
+
def bindings_version
|
52
|
+
major, minor, micro, tag = BINDINGS_VERSION
|
53
|
+
version = [major, minor, micro].join('.')
|
54
|
+
version << "-#{tag}" if tag
|
55
|
+
version
|
56
|
+
end
|
57
|
+
|
58
|
+
class Surface
|
59
|
+
def dup
|
60
|
+
raise NotImplementedError
|
61
|
+
end
|
62
|
+
def clone
|
63
|
+
raise NotImplementedError
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
if const_defined?("PSLevel")
|
68
|
+
module PSLevel
|
69
|
+
class << self
|
70
|
+
def names
|
71
|
+
list.collect {|version| name(version)}
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
if const_defined?("SVGVersion")
|
78
|
+
module SVGVersion
|
79
|
+
class << self
|
80
|
+
def names
|
81
|
+
list.collect {|version| name(version)}
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
if const_defined?("SVGSurface")
|
88
|
+
class SVGSurface
|
89
|
+
class << self
|
90
|
+
def versions_as_string
|
91
|
+
SVGVersion.names
|
92
|
+
end
|
93
|
+
|
94
|
+
def versions
|
95
|
+
SVGVersion.list
|
96
|
+
end
|
97
|
+
|
98
|
+
def version_to_string(version)
|
99
|
+
SVGVersion.name(version)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
class Matrix
|
106
|
+
def dup
|
107
|
+
Matrix.new(*to_a)
|
108
|
+
end
|
109
|
+
|
110
|
+
def clone
|
111
|
+
copy = dup
|
112
|
+
copy.freeze if self.frozen?
|
113
|
+
copy
|
114
|
+
end
|
115
|
+
|
116
|
+
def translate(tx, ty); dup.translate!(tx, ty); end
|
117
|
+
def scale(sx, sy); dup.scale!(sx, sy); end
|
118
|
+
def rotate(radians); dup.rotate!(radians); end
|
119
|
+
def invert; dup.invert!; end
|
120
|
+
def multiply(other); dup.multiply!(other); end
|
121
|
+
alias * multiply
|
122
|
+
end
|
123
|
+
|
124
|
+
class FontOptions
|
125
|
+
def merge(other)
|
126
|
+
dup.merge!(other)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
require 'cairo/point'
|
132
|
+
require 'cairo/colors'
|
133
|
+
require 'cairo/papers'
|
134
|
+
require 'cairo/context'
|
135
|
+
require 'cairo/path'
|
136
|
+
|
137
|
+
module Cairo
|
138
|
+
if const_defined?(:Win32Surface)
|
139
|
+
WIN32Surface = Win32Surface # For backward compatibility
|
140
|
+
end
|
141
|
+
end
|
@@ -0,0 +1,255 @@
|
|
1
|
+
module Cairo
|
2
|
+
module Color
|
3
|
+
module_function
|
4
|
+
def parse(value, robust=false)
|
5
|
+
return value.dup if value.is_a?(Base)
|
6
|
+
case value
|
7
|
+
when Array
|
8
|
+
case value.first
|
9
|
+
when :cmyk, :cmyka
|
10
|
+
CMYK.new(*value[1..-1])
|
11
|
+
when :hsv, :hsva
|
12
|
+
HSV.new(*value[1..-1])
|
13
|
+
else
|
14
|
+
type, *value = value if [:rgb, :rgba].include?(value.first)
|
15
|
+
RGB.new(*value)
|
16
|
+
end
|
17
|
+
when /\A#/ #
|
18
|
+
parse_hex_color(value)
|
19
|
+
when String, Symbol
|
20
|
+
name = Cairo.normalize_const_name(value)
|
21
|
+
begin
|
22
|
+
const_get(name).dup
|
23
|
+
rescue NameError
|
24
|
+
raise ArgumentError, "unknown color name: #{value}"
|
25
|
+
end
|
26
|
+
else
|
27
|
+
if robust
|
28
|
+
raise ArgumentError, "can't parse as color name: #{value.inspect}"
|
29
|
+
end
|
30
|
+
value
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
HEX_RE = "(?i:[a-f\\d])"
|
35
|
+
def parse_hex_color(value)
|
36
|
+
case value
|
37
|
+
when /\A#((?:#{HEX_RE}){3,4})\z/ #
|
38
|
+
RGB.new(*$1.scan(/./).collect {|value| value.hex / 15.0})
|
39
|
+
when /\A#((?:#{HEX_RE}{2,2}){3,4})\z/ #
|
40
|
+
RGB.new(*$1.scan(/.{2,2}/).collect {|value| value.hex / 255.0})
|
41
|
+
when /\A#((?:#{HEX_RE}{4,4}){3,4})\z/ #
|
42
|
+
RGB.new(*$1.scan(/.{4,4}/).collect {|value| value.hex / 65535.0})
|
43
|
+
else
|
44
|
+
message = "invalid hex color format: #{value} should be "
|
45
|
+
message << "#RGB, #RGBA, #RRGGBB, #RRGGBBAA, #RRRRGGGGBBBB "
|
46
|
+
message << "or #RRRRGGGGBBBBAAAA"
|
47
|
+
raise ArgumentError, message
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class Base
|
52
|
+
attr_accessor :alpha
|
53
|
+
|
54
|
+
alias_method :a, :alpha
|
55
|
+
alias_method :a=, :alpha=
|
56
|
+
|
57
|
+
def initialize(a)
|
58
|
+
assert_in_range(a, "alpha channel")
|
59
|
+
@alpha = a
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
def assert_in_range(value, description)
|
64
|
+
unless (0.0..1.0).include?(value)
|
65
|
+
raise ArgumentError,
|
66
|
+
"#{description} value should be in [0.0, 1.0]: #{value.inspect}"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
class RGB < Base
|
72
|
+
attr_accessor :red, :green, :blue
|
73
|
+
|
74
|
+
alias_method :r, :red
|
75
|
+
alias_method :r=, :red=
|
76
|
+
alias_method :g, :green
|
77
|
+
alias_method :g=, :green=
|
78
|
+
alias_method :b, :blue
|
79
|
+
alias_method :b=, :blue=
|
80
|
+
|
81
|
+
def initialize(r, g, b, a=1.0)
|
82
|
+
super(a)
|
83
|
+
assert_in_range(r, "red")
|
84
|
+
assert_in_range(g, "green")
|
85
|
+
assert_in_range(b, "blue")
|
86
|
+
@red = r
|
87
|
+
@green = g
|
88
|
+
@blue = b
|
89
|
+
end
|
90
|
+
|
91
|
+
def to_a
|
92
|
+
[@red, @green, @blue, @alpha]
|
93
|
+
end
|
94
|
+
alias_method :to_ary, :to_a
|
95
|
+
|
96
|
+
def to_s
|
97
|
+
"#%02X%02X%02X%02X" % to_a.collect {|v| (v * 255).ceil}
|
98
|
+
end
|
99
|
+
|
100
|
+
def to_rgb
|
101
|
+
clone
|
102
|
+
end
|
103
|
+
|
104
|
+
def to_cmyk
|
105
|
+
cmy = [1.0 - @red, 1.0 - @green, 1.0 - @blue]
|
106
|
+
key_plate = cmy.min
|
107
|
+
if key_plate < 1.0
|
108
|
+
one_k = 1.0 - key_plate
|
109
|
+
cmyk = cmy.collect {|value| (value - key_plate) / one_k} + [key_plate]
|
110
|
+
else
|
111
|
+
cmyk = [0, 0, 0, key_plate]
|
112
|
+
end
|
113
|
+
cmyka = cmyk + [@alpha]
|
114
|
+
CMYK.new(*cmyka)
|
115
|
+
end
|
116
|
+
|
117
|
+
def to_hsv
|
118
|
+
max = [@red, @blue, @green].max
|
119
|
+
if max > 0
|
120
|
+
min = [@red, @blue, @green].min
|
121
|
+
max_min = max - min
|
122
|
+
case max
|
123
|
+
when @red
|
124
|
+
numerator = @green - @blue
|
125
|
+
angle = 0
|
126
|
+
when @blue
|
127
|
+
numerator = @blue - @red
|
128
|
+
angle = 120
|
129
|
+
when @green
|
130
|
+
numerator = @red - @green
|
131
|
+
angle = 240
|
132
|
+
end
|
133
|
+
h = max_min > 0 ? 60 * numerator / max_min + angle : 0.0
|
134
|
+
s = max_min / max
|
135
|
+
else
|
136
|
+
h = 0.0
|
137
|
+
s = 0.0
|
138
|
+
end
|
139
|
+
v = max
|
140
|
+
HSV.new(h, s, v, @alpha)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
class CMYK < Base
|
145
|
+
attr_accessor :cyan, :magenta, :yellow, :key_plate
|
146
|
+
|
147
|
+
alias_method :c, :cyan
|
148
|
+
alias_method :c=, :cyan=
|
149
|
+
alias_method :m, :magenta
|
150
|
+
alias_method :m=, :magenta=
|
151
|
+
alias_method :y, :yellow
|
152
|
+
alias_method :y=, :yellow=
|
153
|
+
alias_method :k, :key_plate
|
154
|
+
alias_method :k=, :key_plate=
|
155
|
+
|
156
|
+
def initialize(c, m, y, k, a=1.0)
|
157
|
+
super(a)
|
158
|
+
assert_in_range(c, "cyan")
|
159
|
+
assert_in_range(m, "magenta")
|
160
|
+
assert_in_range(y, "yellow")
|
161
|
+
assert_in_range(k, "key plate")
|
162
|
+
@cyan = c
|
163
|
+
@magenta = m
|
164
|
+
@yellow = y
|
165
|
+
@key_plate = k
|
166
|
+
end
|
167
|
+
|
168
|
+
def to_a
|
169
|
+
[@cyan, @magenta, @yellow, @key_plate, @alpha]
|
170
|
+
end
|
171
|
+
alias_method :to_ary, :to_a
|
172
|
+
|
173
|
+
def to_rgb
|
174
|
+
one_k = 1.0 - @key_plate
|
175
|
+
rgba = [
|
176
|
+
(1.0 - @cyan) * one_k,
|
177
|
+
(1.0 - @magenta) * one_k,
|
178
|
+
(1.0 - @yellow) * one_k,
|
179
|
+
@alpha,
|
180
|
+
]
|
181
|
+
RGB.new(*rgba)
|
182
|
+
end
|
183
|
+
|
184
|
+
def to_cmyk
|
185
|
+
clone
|
186
|
+
end
|
187
|
+
|
188
|
+
def to_hsv
|
189
|
+
to_rgb.to_hsv
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class HSV < Base
|
194
|
+
attr_accessor :hue, :saturation, :value
|
195
|
+
|
196
|
+
alias_method :h, :hue
|
197
|
+
alias_method :h=, :hue=
|
198
|
+
alias_method :s, :saturation
|
199
|
+
alias_method :s=, :saturation=
|
200
|
+
alias_method :v, :value
|
201
|
+
alias_method :v=, :value=
|
202
|
+
|
203
|
+
def initialize(h, s, v, a=1.0)
|
204
|
+
super(a)
|
205
|
+
assert_in_range(s, "saturation")
|
206
|
+
assert_in_range(v, "value")
|
207
|
+
@hue = h.modulo(360.0)
|
208
|
+
@saturation = s
|
209
|
+
@value = v
|
210
|
+
end
|
211
|
+
|
212
|
+
def to_a
|
213
|
+
[@hue, @saturation, @value, @alpha]
|
214
|
+
end
|
215
|
+
alias_method :to_ary, :to_a
|
216
|
+
|
217
|
+
def to_rgb
|
218
|
+
if s > 0
|
219
|
+
h_60 = @hue / 60.0
|
220
|
+
hi = h_60.floor.modulo(6)
|
221
|
+
f = h_60 - hi
|
222
|
+
p = @value * (1 - @saturation)
|
223
|
+
q = @value * (1 - f * @saturation)
|
224
|
+
t = @value * (1 - (1 - f) * @saturation)
|
225
|
+
case hi
|
226
|
+
when 0
|
227
|
+
rgb = [@value, t, p]
|
228
|
+
when 1
|
229
|
+
rgb = [q, @value, p]
|
230
|
+
when 2
|
231
|
+
rgb = [p, @value, t]
|
232
|
+
when 3
|
233
|
+
rgb = [p, q, @value]
|
234
|
+
when 4
|
235
|
+
rgb = [t, p, @value]
|
236
|
+
when 5
|
237
|
+
rgb = [@value, p, q]
|
238
|
+
end
|
239
|
+
rgba = rgb + [@alpha]
|
240
|
+
RGB.new(*rgba)
|
241
|
+
else
|
242
|
+
RGB.new(@value, @value, @value, @alpha)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
def to_cmyk
|
247
|
+
to_rgb.to_cmyk
|
248
|
+
end
|
249
|
+
|
250
|
+
def to_hsv
|
251
|
+
clone
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|