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/samples/pac2.rb
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
=begin
|
2
|
+
pac2.rb - rcairo sample script with #scale and #translate.
|
3
|
+
|
4
|
+
Original: pac.rb in http://www.artima.com/rubycs/articles/pdf_writer3.html
|
5
|
+
=end
|
6
|
+
|
7
|
+
top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
8
|
+
src = File.join(top, "src")
|
9
|
+
$LOAD_PATH.unshift src
|
10
|
+
$LOAD_PATH.unshift File.join(src, "lib")
|
11
|
+
|
12
|
+
require "cairo"
|
13
|
+
|
14
|
+
def pac(surface, width, height)
|
15
|
+
cr = Cairo::Context.new(surface)
|
16
|
+
|
17
|
+
# NOTE: You may need to set line width when use Cairo::Context#scale
|
18
|
+
cr.set_line_width(cr.line_width / [width, height].max)
|
19
|
+
|
20
|
+
cr.scale(width, height)
|
21
|
+
|
22
|
+
cr.save do
|
23
|
+
cr.set_source_color(:black)
|
24
|
+
cr.rectangle(0, 0, 1, 1)
|
25
|
+
cr.fill
|
26
|
+
end
|
27
|
+
|
28
|
+
# Wall
|
29
|
+
wall_width = 0.89
|
30
|
+
wall_height = 0.03
|
31
|
+
wall_space = 0.5
|
32
|
+
wall_x = 0.02
|
33
|
+
wall1_y = 1 - 0.86
|
34
|
+
wall2_y = wall1_y + wall_space
|
35
|
+
wall_radius = 0.01
|
36
|
+
|
37
|
+
cr.set_source_color(:magenta)
|
38
|
+
cr.rounded_rectangle(wall_x, wall1_y, wall_width, wall_height, wall_radius)
|
39
|
+
cr.fill
|
40
|
+
cr.set_source_color(:cyan)
|
41
|
+
cr.rounded_rectangle(wall_x, wall1_y, wall_width, wall_height, wall_radius)
|
42
|
+
cr.stroke
|
43
|
+
|
44
|
+
cr.set_source_color(:magenta)
|
45
|
+
cr.rounded_rectangle(wall_x, wall2_y, wall_width, wall_height, wall_radius)
|
46
|
+
cr.fill
|
47
|
+
cr.set_source_color(:cyan)
|
48
|
+
cr.rounded_rectangle(wall_x, wall2_y, wall_width, wall_height, wall_radius)
|
49
|
+
cr.stroke
|
50
|
+
|
51
|
+
# Body
|
52
|
+
body_x = 0.17
|
53
|
+
body_y = 1 - 0.58
|
54
|
+
body_width = 0.23
|
55
|
+
body_height = 0.33
|
56
|
+
|
57
|
+
cr.save do
|
58
|
+
cr.translate(body_x, body_y)
|
59
|
+
cr.set_source_color(:yellow)
|
60
|
+
cr.scale(body_width, body_height)
|
61
|
+
cr.arc(0, 0, 0.5, 30 * (Math::PI / 180), 330 * (Math::PI / 180))
|
62
|
+
cr.line_to(0, 0)
|
63
|
+
cr.close_path
|
64
|
+
cr.fill
|
65
|
+
end
|
66
|
+
|
67
|
+
# Dot
|
68
|
+
dot_width = 0.02
|
69
|
+
dot_height = 0.03
|
70
|
+
small_dot_width = 0.01
|
71
|
+
small_dot_height = 0.015
|
72
|
+
dot_x = 0.29
|
73
|
+
dot_y = 1 - 0.58
|
74
|
+
dot_step = 0.05
|
75
|
+
|
76
|
+
cr.save do
|
77
|
+
cr.set_source_color(:yellow)
|
78
|
+
cr.save do
|
79
|
+
cr.translate(dot_x, dot_y)
|
80
|
+
cr.scale(dot_width, dot_height)
|
81
|
+
cr.circle(0, 0, 1).fill
|
82
|
+
end
|
83
|
+
|
84
|
+
4.times do |i|
|
85
|
+
cr.save do
|
86
|
+
cr.translate(dot_x + dot_step * (i + 1), dot_y)
|
87
|
+
cr.scale(small_dot_width, small_dot_height)
|
88
|
+
cr.circle(0, 0, 1).fill
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Ghost
|
94
|
+
ghost_x = 0.59
|
95
|
+
ghost_x_step = 0.03
|
96
|
+
ghost_y = 1 - 0.42
|
97
|
+
ghost_y_step = 0.04
|
98
|
+
ghost_width = 0.18
|
99
|
+
ghost_height = 0.29
|
100
|
+
ghost_radius= 0.08
|
101
|
+
cr.move_to(ghost_x, ghost_y)
|
102
|
+
cr.line_to(ghost_x, ghost_y - ghost_height)
|
103
|
+
cr.curve_to(ghost_x + ghost_width / 3.0,
|
104
|
+
ghost_y - ghost_height - ghost_radius,
|
105
|
+
ghost_x + ghost_width * (2.0 / 3.0),
|
106
|
+
ghost_y - ghost_height - ghost_radius,
|
107
|
+
ghost_x + ghost_width,
|
108
|
+
ghost_y - ghost_height)
|
109
|
+
cr.line_to(ghost_x + ghost_width, ghost_y)
|
110
|
+
i = 0
|
111
|
+
(ghost_x + ghost_width).step(ghost_x, -ghost_x_step) do |x|
|
112
|
+
cr.line_to(x, ghost_y + -ghost_y_step * (i % 2))
|
113
|
+
i += 1
|
114
|
+
end
|
115
|
+
cr.close_path
|
116
|
+
|
117
|
+
cr.set_source_color(:blue)
|
118
|
+
cr.fill_preserve
|
119
|
+
cr.set_source_color(:cyan)
|
120
|
+
cr.stroke
|
121
|
+
|
122
|
+
# Ghost Eyes
|
123
|
+
eye_x = 0.62
|
124
|
+
eye_y = 1 - 0.63
|
125
|
+
eye_space = 0.06
|
126
|
+
white_eye_width = 0.03
|
127
|
+
white_eye_height = 0.04
|
128
|
+
black_eye_width = 0.01
|
129
|
+
black_eye_height = 0.02
|
130
|
+
|
131
|
+
cr.set_source_color(:white)
|
132
|
+
cr.rectangle(eye_x, eye_y - white_eye_height,
|
133
|
+
white_eye_width, white_eye_height)
|
134
|
+
cr.fill
|
135
|
+
cr.rectangle(eye_x + eye_space, eye_y - white_eye_height,
|
136
|
+
white_eye_width, white_eye_height)
|
137
|
+
cr.fill
|
138
|
+
|
139
|
+
cr.set_source_color(:black)
|
140
|
+
cr.rectangle(eye_x, eye_y - black_eye_height,
|
141
|
+
black_eye_width, black_eye_height)
|
142
|
+
cr.fill
|
143
|
+
cr.rectangle(eye_x + eye_space, eye_y - black_eye_height,
|
144
|
+
black_eye_width, black_eye_height)
|
145
|
+
cr.fill
|
146
|
+
|
147
|
+
cr.show_page
|
148
|
+
end
|
149
|
+
|
150
|
+
paper = Cairo::Paper.parse(:a4_landscape)
|
151
|
+
|
152
|
+
size_in_points = paper.size("pt")
|
153
|
+
Cairo::ImageSurface.new(*size_in_points) do |surface|
|
154
|
+
cr = pac(surface, *size_in_points)
|
155
|
+
cr.target.write_to_png("pac2.png")
|
156
|
+
end
|
157
|
+
|
158
|
+
scalable_surface_output = Proc.new do |surface_class_name, suffix|
|
159
|
+
if Cairo.const_defined?(surface_class_name)
|
160
|
+
surface_class = Cairo.const_get(surface_class_name)
|
161
|
+
surface_class.new("pac2.#{suffix}", paper) do |surface|
|
162
|
+
pac(surface, *size_in_points)
|
163
|
+
end
|
164
|
+
else
|
165
|
+
puts("#{surface_class_name} isn't supported.")
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
scalable_surface_output.call("PSSurface", "ps")
|
170
|
+
scalable_surface_output.call("PDFSurface", "pdf")
|
171
|
+
scalable_surface_output.call("SVGSurface", "svg")
|
data/samples/png.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
4
|
+
src = File.join(top, "src")
|
5
|
+
$LOAD_PATH.unshift src
|
6
|
+
$LOAD_PATH.unshift File.join(src, "lib")
|
7
|
+
|
8
|
+
require 'cairo'
|
9
|
+
|
10
|
+
width = 200
|
11
|
+
height = 200
|
12
|
+
|
13
|
+
data = nil
|
14
|
+
stride = nil
|
15
|
+
|
16
|
+
Cairo::ImageSurface.new(width, height) do |surface|
|
17
|
+
cr = Cairo::Context.new(surface)
|
18
|
+
|
19
|
+
# fill background with white
|
20
|
+
cr.set_source_color("#fffc")
|
21
|
+
cr.paint
|
22
|
+
|
23
|
+
# create shape
|
24
|
+
cr.move_to(50, 50)
|
25
|
+
cr.curve_to(100, 25, 100, 75, 150, 50)
|
26
|
+
cr.line_to(150, 150)
|
27
|
+
cr.line_to(50, 150)
|
28
|
+
cr.close_path
|
29
|
+
|
30
|
+
cr.set_source_color(:black)
|
31
|
+
cr.fill_preserve
|
32
|
+
cr.set_source_color(:red)
|
33
|
+
cr.set_line_join(Cairo::LINE_JOIN_MITER)
|
34
|
+
cr.set_line_width(4)
|
35
|
+
cr.stroke
|
36
|
+
|
37
|
+
cr.target.write_to_png("test.png")
|
38
|
+
|
39
|
+
data = cr.target.data
|
40
|
+
stride = cr.target.stride
|
41
|
+
end
|
42
|
+
|
43
|
+
Cairo::ImageSurface.new(data, :argb32, width, height, stride) do |surface|
|
44
|
+
surface.write_to_png("test-renew.png")
|
45
|
+
end
|
data/samples/scalable.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
4
|
+
src = File.join(top, "src")
|
5
|
+
$LOAD_PATH.unshift src
|
6
|
+
$LOAD_PATH.unshift File.join(src, "lib")
|
7
|
+
|
8
|
+
require 'cairo'
|
9
|
+
require 'stringio'
|
10
|
+
|
11
|
+
def render(output, surface_class)
|
12
|
+
surface_class.new(output, 200, 200) do |surface|
|
13
|
+
cr = Cairo::Context.new(surface)
|
14
|
+
|
15
|
+
# fill background with white
|
16
|
+
cr.set_source_color("#fffc")
|
17
|
+
cr.paint
|
18
|
+
|
19
|
+
# create shape
|
20
|
+
cr.move_to(50, 50)
|
21
|
+
cr.curve_to(100, 25, 100, 75, 150, 50)
|
22
|
+
cr.line_to(150, 150)
|
23
|
+
cr.line_to(50, 150)
|
24
|
+
cr.close_path
|
25
|
+
|
26
|
+
cr.set_source_color(:black)
|
27
|
+
cr.fill_preserve
|
28
|
+
cr.set_source_color(:red)
|
29
|
+
cr.set_line_join(Cairo::LINE_JOIN_MITER)
|
30
|
+
cr.set_line_width(4)
|
31
|
+
cr.stroke
|
32
|
+
|
33
|
+
cr.show_page
|
34
|
+
surface.finish
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def output(surface_class_name, suffix)
|
39
|
+
if Cairo.const_defined?(surface_class_name)
|
40
|
+
surface_class = Cairo.const_get(surface_class_name)
|
41
|
+
render("test.#{suffix}", surface_class)
|
42
|
+
|
43
|
+
output = StringIO.new
|
44
|
+
render(output, surface_class)
|
45
|
+
output.rewind
|
46
|
+
File.open("test2.#{suffix}", "wb") do |f|
|
47
|
+
f.print(output.read)
|
48
|
+
end
|
49
|
+
else
|
50
|
+
puts("#{surface_class_name} isn't supported.")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
output("PSSurface", "ps")
|
55
|
+
output("PDFSurface", "pdf")
|
56
|
+
output("SVGSurface", "svg")
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
4
|
+
src = File.join(top, "src")
|
5
|
+
$LOAD_PATH.unshift src
|
6
|
+
$LOAD_PATH.unshift File.join(src, "lib")
|
7
|
+
|
8
|
+
require 'cairo'
|
9
|
+
require 'pango'
|
10
|
+
|
11
|
+
def render_background(cr)
|
12
|
+
cr.set_source_color(:white)
|
13
|
+
cr.paint
|
14
|
+
end
|
15
|
+
|
16
|
+
def make_layout(cr, text)
|
17
|
+
layout = cr.create_pango_layout
|
18
|
+
layout.text = text
|
19
|
+
layout.font_description = Pango::FontDescription.new("Serif 36")
|
20
|
+
cr.update_pango_layout(layout)
|
21
|
+
layout
|
22
|
+
end
|
23
|
+
|
24
|
+
def render(surface)
|
25
|
+
text = "It was a dream... Oh Just a dream..."
|
26
|
+
|
27
|
+
cr = Cairo::Context.new(surface)
|
28
|
+
|
29
|
+
render_background(cr)
|
30
|
+
|
31
|
+
cr.set_source_color(:red)
|
32
|
+
cr.move_to(25, 350)
|
33
|
+
cr.line_to(150, 375)
|
34
|
+
cr.curve_to(275, 400, 450, 350, 450, 200)
|
35
|
+
cr.curve_to(450, 0, 300, 150, 50, 50)
|
36
|
+
cr.stroke_preserve
|
37
|
+
path = cr.copy_path_flat
|
38
|
+
|
39
|
+
cr.line_width = 1
|
40
|
+
cr.new_path
|
41
|
+
layout = make_layout(cr, text)
|
42
|
+
cr.pango_layout_line_path(layout.get_line(0))
|
43
|
+
cr.map_path_onto(path)
|
44
|
+
|
45
|
+
cr.set_source_rgba(0.3, 0.3, 1.0, 0.3)
|
46
|
+
cr.fill_preserve
|
47
|
+
cr.set_source_rgba(0.1, 0.1, 0.1)
|
48
|
+
cr.stroke
|
49
|
+
|
50
|
+
cr.show_page
|
51
|
+
end
|
52
|
+
|
53
|
+
def output
|
54
|
+
Cairo::ImageSurface.new(500, 500) do |surface|
|
55
|
+
render(surface)
|
56
|
+
surface.write_to_png("text-on-path.png")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
output
|
data/samples/text2.rb
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
4
|
+
src = File.join(top, "src")
|
5
|
+
$LOAD_PATH.unshift src
|
6
|
+
$LOAD_PATH.unshift File.join(src, "lib")
|
7
|
+
|
8
|
+
require 'optparse'
|
9
|
+
require 'ostruct'
|
10
|
+
|
11
|
+
require 'cairo'
|
12
|
+
require 'pango'
|
13
|
+
|
14
|
+
def parse(args=ARGV)
|
15
|
+
options = OpenStruct.new
|
16
|
+
options.width = 595.275590551181.round
|
17
|
+
options.height = 841.889763779528.round
|
18
|
+
options.font_description = "Monospace 12"
|
19
|
+
options.fade_out = false
|
20
|
+
|
21
|
+
opts = OptionParser.new do |opts|
|
22
|
+
opts.on("--width=WIDTH", Integer, "paper width") do |width|
|
23
|
+
options.width = width
|
24
|
+
end
|
25
|
+
opts.on("--height=HEIGHT", Integer, "paper height") do |height|
|
26
|
+
options.height = height
|
27
|
+
end
|
28
|
+
opts.on("--font-description=DESCRIPTION",
|
29
|
+
"font description (e.g. 'Monospace 14')") do |desc|
|
30
|
+
options.font_description = desc
|
31
|
+
end
|
32
|
+
opts.on("--[no-]fade-out",
|
33
|
+
"fade-out one-third of page") do |fade_out|
|
34
|
+
options.fade_out = fade_out
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
opts.parse!(args)
|
39
|
+
|
40
|
+
options
|
41
|
+
end
|
42
|
+
|
43
|
+
def render_background(cr)
|
44
|
+
cr.set_source_color(:white)
|
45
|
+
cr.paint
|
46
|
+
end
|
47
|
+
|
48
|
+
def make_layout(cr, text, width, font_description)
|
49
|
+
layout = cr.create_pango_layout
|
50
|
+
layout.text = text
|
51
|
+
layout.width = width * Pango::SCALE
|
52
|
+
layout.font_description = Pango::FontDescription.new(font_description)
|
53
|
+
cr.update_pango_layout(layout)
|
54
|
+
layout
|
55
|
+
end
|
56
|
+
|
57
|
+
def setup_fade_out(cr, width)
|
58
|
+
fade_out = Cairo::LinearPattern.new(0, 0, width, 0)
|
59
|
+
fade_out.add_color_stop(0, "#000f")
|
60
|
+
fade_out.add_color_stop(0.66, "#000f")
|
61
|
+
fade_out.add_color_stop(1, "#0000")
|
62
|
+
|
63
|
+
cr.set_source(fade_out)
|
64
|
+
end
|
65
|
+
|
66
|
+
def render_layout(cr, layout, margin_left, margin_top, body_height)
|
67
|
+
x = margin_left
|
68
|
+
y = margin_top
|
69
|
+
limit_y = margin_top + body_height
|
70
|
+
|
71
|
+
iter = layout.iter
|
72
|
+
prev_baseline = iter.baseline / Pango::SCALE
|
73
|
+
begin
|
74
|
+
line = iter.line
|
75
|
+
ink_rect, logical_rect = iter.line_extents
|
76
|
+
y_begin, y_end = iter.line_yrange
|
77
|
+
if limit_y < (y + y_end / Pango::SCALE)
|
78
|
+
cr.show_page
|
79
|
+
y = margin_top - prev_baseline
|
80
|
+
end
|
81
|
+
baseline = iter.baseline / Pango::SCALE
|
82
|
+
cr.move_to(x + logical_rect.x / Pango::SCALE, y + baseline)
|
83
|
+
cr.show_pango_layout_line(line)
|
84
|
+
prev_baseline = baseline
|
85
|
+
end while iter.next_line!
|
86
|
+
end
|
87
|
+
|
88
|
+
def render(options, output, surface_class)
|
89
|
+
text = options.text
|
90
|
+
width = options.width
|
91
|
+
height = options.height
|
92
|
+
font_description = options.font_description
|
93
|
+
fade_out = options.fade_out
|
94
|
+
|
95
|
+
margin_left = (width * 0.05).ceil
|
96
|
+
margin_right = (width * 0.05).ceil
|
97
|
+
margin_top = (height * 0.05).ceil
|
98
|
+
margin_bottom = (height * 0.05).ceil
|
99
|
+
body_width = width - margin_left - margin_right
|
100
|
+
body_height = height - margin_top - margin_bottom
|
101
|
+
|
102
|
+
surface_class.new(output, width, height) do |surface|
|
103
|
+
cr = Cairo::Context.new(surface)
|
104
|
+
|
105
|
+
render_background(cr)
|
106
|
+
layout = make_layout(cr, text, body_width, font_description)
|
107
|
+
if fade_out
|
108
|
+
setup_fade_out(cr, body_width)
|
109
|
+
else
|
110
|
+
cr.set_source_color(:black)
|
111
|
+
end
|
112
|
+
render_layout(cr, layout, margin_left, margin_top, body_height)
|
113
|
+
|
114
|
+
cr.show_page
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def output(options, surface_class_name, suffix)
|
119
|
+
if Cairo.const_defined?(surface_class_name)
|
120
|
+
surface_class = Cairo.const_get(surface_class_name)
|
121
|
+
render(options, "text2.#{suffix}", surface_class)
|
122
|
+
else
|
123
|
+
puts("#{surface_class_name} isn't supported.")
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
options = parse
|
128
|
+
options.text = ARGF.read
|
129
|
+
output(options, "PSSurface", "ps")
|
130
|
+
output(options, "PDFSurface", "pdf")
|
131
|
+
output(options, "SVGSurface", "svg")
|