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/agg/README
ADDED
@@ -0,0 +1,47 @@
|
|
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 'gtk2'
|
9
|
+
|
10
|
+
window = Gtk::Window.new
|
11
|
+
window.set_default_size(600, 400)
|
12
|
+
|
13
|
+
layout = Gtk::Layout.new
|
14
|
+
|
15
|
+
pixel_scale = Gtk::HScale.new(8, 100, (100 - 8) / 23.0)
|
16
|
+
pixel_scale.value = 32
|
17
|
+
pixel_scale.set_size_request(500, 50)
|
18
|
+
layout.put(pixel_scale, 80, 350)
|
19
|
+
pixel_label = Gtk::Label.new("Pixel size=")
|
20
|
+
layout.put(pixel_label, 80, 370)
|
21
|
+
|
22
|
+
gamma_scale = Gtk::HScale.new(0.1, 3.0, 0.001)
|
23
|
+
gamma_scale.value = 1.0
|
24
|
+
gamma_scale.set_size_request(500, 50)
|
25
|
+
layout.put(gamma_scale, 80, 310)
|
26
|
+
gamma_label = Gtk::Label.new("Gamma=")
|
27
|
+
layout.put(gamma_label, 80, 330)
|
28
|
+
|
29
|
+
layout.signal_connect("expose-event") do |widget, event|
|
30
|
+
context = widget.bin_window.create_cairo_context
|
31
|
+
context.move_to(50, 80)
|
32
|
+
context.line_to(200, 250)
|
33
|
+
context.line_to(400, 130)
|
34
|
+
context.close_path
|
35
|
+
context.line_width = 30
|
36
|
+
context.antialias = :none
|
37
|
+
context.set_source_color([0, 150.0/255.0, 160.0/255.0, 200.0/255.0])
|
38
|
+
context.stroke
|
39
|
+
false
|
40
|
+
end
|
41
|
+
|
42
|
+
window.add(layout)
|
43
|
+
|
44
|
+
window.show_all
|
45
|
+
|
46
|
+
Gtk.main
|
47
|
+
|
@@ -0,0 +1,304 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# ported from examples/aa_test.cpp in AGG source tree.
|
4
|
+
|
5
|
+
top = File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
|
6
|
+
src = File.join(top, "src")
|
7
|
+
$LOAD_PATH.unshift src
|
8
|
+
$LOAD_PATH.unshift File.join(src, "lib")
|
9
|
+
|
10
|
+
require 'gtk2'
|
11
|
+
|
12
|
+
window = Gtk::Window.new
|
13
|
+
window.set_default_size(480, 350)
|
14
|
+
|
15
|
+
area = Gtk::DrawingArea.new
|
16
|
+
|
17
|
+
def stroke_line(context, x1, y1, x2, y2, line_width, dash_length)
|
18
|
+
context.save do
|
19
|
+
yield if block_given?
|
20
|
+
context.move_to(x1, y1)
|
21
|
+
context.line_to(x2, y2)
|
22
|
+
context.set_dash(dash_length) if dash_length > 0
|
23
|
+
context.line_width = line_width
|
24
|
+
context.line_cap = :round
|
25
|
+
context.stroke
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def fill_triangle(context, x1, y1, x2, y2, x3, y3)
|
30
|
+
context.save do
|
31
|
+
yield if block_given?
|
32
|
+
context.triangle(x1, y1, x2, y2, x3, y3)
|
33
|
+
context.fill
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def set_gradient(context, x1, y1, x2, y2, color_stops)
|
38
|
+
pattern = Cairo::LinearPattern.new(x1, y1, x2, y2)
|
39
|
+
color_stops.each do |offset, color|
|
40
|
+
pattern.add_color_stop(offset, color)
|
41
|
+
end
|
42
|
+
context.set_source(pattern)
|
43
|
+
end
|
44
|
+
|
45
|
+
def stroke_gradient_line(context, x1, y1, x2, y2,
|
46
|
+
line_width, dash_length, color_stops)
|
47
|
+
stroke_line(context, x1, y1, x2, y2, line_width, dash_length) do
|
48
|
+
set_gradient(context, x1, y1, x2, y2, color_stops)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def fill_gradient_triangle(context, x1, y1, x2, y2, x3, y3, color_stops)
|
53
|
+
fill_triangle(context, x1, y1, x2, y2, x3, y3) do
|
54
|
+
set_gradient(context,
|
55
|
+
x1, y1,
|
56
|
+
x3 - (x3 - x2) / 2.0,
|
57
|
+
y3 - (y3 - y2) / 2.0,
|
58
|
+
color_stops)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def draw_background_circle(context, w, h)
|
63
|
+
context.set_source_color([1.0, 1.0, 1.0, 0.2])
|
64
|
+
|
65
|
+
cx = w / 2.0
|
66
|
+
cy = h / 2.0
|
67
|
+
radius = [cx, cy].min
|
68
|
+
1.upto(180) do |i|
|
69
|
+
n = 2 * Math::PI * i / 180.0
|
70
|
+
stroke_line(context,
|
71
|
+
cx + radius * Math.sin(n),
|
72
|
+
cy + radius * Math.cos(n),
|
73
|
+
cx, cy,
|
74
|
+
1.0, i < 90 ? i : 0)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def draw_upper_small_circles(context, i)
|
79
|
+
context.circle(18 + i * 4 + 0.5,
|
80
|
+
33 + 0.5,
|
81
|
+
i / 20.0)
|
82
|
+
context.fill
|
83
|
+
|
84
|
+
context.circle(18 + i * 4 + (i - 1) / 10.0 + 0.5,
|
85
|
+
27 + (i - 1) / 10.0 + 0.5,
|
86
|
+
0.5)
|
87
|
+
context.fill
|
88
|
+
end
|
89
|
+
|
90
|
+
def draw_upper_circles(context, i)
|
91
|
+
context.set_source_color(:white)
|
92
|
+
context.circle(20 + i * (i + 1) + 0.5,
|
93
|
+
20.5,
|
94
|
+
i / 2.0)
|
95
|
+
context.fill
|
96
|
+
|
97
|
+
draw_upper_small_circles(context, i)
|
98
|
+
end
|
99
|
+
|
100
|
+
def draw_upper_gradient_lines(context, i)
|
101
|
+
stroke_gradient_line(context,
|
102
|
+
20 + i * (i + 1),
|
103
|
+
40.5,
|
104
|
+
20 + i * (i + 1) + (i - 1) * 4,
|
105
|
+
100.5,
|
106
|
+
i,
|
107
|
+
0,
|
108
|
+
[[0, :white],
|
109
|
+
[1, [i % 2, (i % 3) * 0.5, (i % 5) * 0.25]]])
|
110
|
+
end
|
111
|
+
|
112
|
+
def draw_middle_small_circles(context, i)
|
113
|
+
stroke_gradient_line(context,
|
114
|
+
17.5 + i * 4,
|
115
|
+
107,
|
116
|
+
17.5 + i * 4 + i / 6.66666667,
|
117
|
+
107,
|
118
|
+
1,
|
119
|
+
0,
|
120
|
+
[[0, :red],
|
121
|
+
[1, :blue]])
|
122
|
+
|
123
|
+
stroke_gradient_line(context,
|
124
|
+
18 + i * 4,
|
125
|
+
112.5,
|
126
|
+
18 + i * 4,
|
127
|
+
112.5 + i / 6.66666667,
|
128
|
+
1,
|
129
|
+
0,
|
130
|
+
[[0, :red],
|
131
|
+
[1, :blue]])
|
132
|
+
end
|
133
|
+
|
134
|
+
def draw_middle_gradient_lines(context, i)
|
135
|
+
stroke_gradient_line(context,
|
136
|
+
21.5,
|
137
|
+
120 + (i - 1) * 3.1,
|
138
|
+
52.5,
|
139
|
+
120 + (i - 1) * 3.1,
|
140
|
+
1,
|
141
|
+
0,
|
142
|
+
[[0, :red],
|
143
|
+
[1, :white]])
|
144
|
+
|
145
|
+
stroke_gradient_line(context,
|
146
|
+
52.5,
|
147
|
+
118 + i * 3,
|
148
|
+
83.5,
|
149
|
+
118 + i * 3,
|
150
|
+
2 - (i - 1) / 10.0,
|
151
|
+
0,
|
152
|
+
[[0, :green],
|
153
|
+
[1, :white]])
|
154
|
+
|
155
|
+
stroke_gradient_line(context,
|
156
|
+
83.5,
|
157
|
+
119 + i * 3,
|
158
|
+
114.5,
|
159
|
+
119 + i * 3,
|
160
|
+
2 - (i - 1) / 10.0,
|
161
|
+
3.0,
|
162
|
+
[[0, :blue],
|
163
|
+
[1, :white]])
|
164
|
+
end
|
165
|
+
|
166
|
+
def draw_middle_white_lines(context, i)
|
167
|
+
context.set_source_color(:white)
|
168
|
+
stroke_line(context,
|
169
|
+
125.5, 119.5 + (i + 2) * (i / 2.0),
|
170
|
+
135.5, 119.5 + (i + 2) * (i / 2.0),
|
171
|
+
i, 0)
|
172
|
+
end
|
173
|
+
|
174
|
+
def draw_lower_short_lines(context, i)
|
175
|
+
context.set_source_color(:white)
|
176
|
+
|
177
|
+
stroke_line(context,
|
178
|
+
17.5 + i * 4, 192,
|
179
|
+
18.5 + i * 4, 192,
|
180
|
+
i / 10.0, 0)
|
181
|
+
|
182
|
+
stroke_line(context,
|
183
|
+
17.5 + i * 4 + (i - 1) / 10.0, 186,
|
184
|
+
18.5 + i * 4 + (i - 1) / 10.0, 186,
|
185
|
+
1.0, 0)
|
186
|
+
end
|
187
|
+
|
188
|
+
def draw_right_triangles(context, i, w, h)
|
189
|
+
x1 = w - 150
|
190
|
+
x2 = w - 20
|
191
|
+
y_upper = h - 20 - i * (i + 2)
|
192
|
+
y_middle = h - 20 - i * (i + 1.5)
|
193
|
+
y_lower = h - 20 - i * (i + 1)
|
194
|
+
context.save do
|
195
|
+
pattern = Cairo::LinearPattern.new(x1, y_middle, x2, y_middle)
|
196
|
+
pattern.add_color_stop(0, :white)
|
197
|
+
pattern.add_color_stop(1, [i % 2, (i % 3) * 0.5, (i % 5) * 0.25])
|
198
|
+
context.set_source(pattern)
|
199
|
+
context.move_to(x1, y_middle)
|
200
|
+
context.line_to(x2, y_lower)
|
201
|
+
context.line_to(x2, y_upper)
|
202
|
+
context.fill
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
def draw_sample_shapes(context, w, h)
|
207
|
+
context.set_source_color(:black)
|
208
|
+
context.paint
|
209
|
+
|
210
|
+
draw_background_circle(context, w, h)
|
211
|
+
|
212
|
+
1.upto(20) do |i|
|
213
|
+
draw_upper_circles(context, i)
|
214
|
+
draw_upper_gradient_lines(context, i)
|
215
|
+
draw_middle_small_circles(context, i)
|
216
|
+
draw_middle_gradient_lines(context, i)
|
217
|
+
draw_middle_white_lines(context, i) if i <= 10
|
218
|
+
draw_lower_short_lines(context, i)
|
219
|
+
end
|
220
|
+
|
221
|
+
1.upto(13) do |i|
|
222
|
+
draw_right_triangles(context, i, w, h)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
def draw_random_shapes(context, w, h)
|
227
|
+
srand(123)
|
228
|
+
|
229
|
+
context.set_source_color(:black)
|
230
|
+
context.paint
|
231
|
+
|
232
|
+
n_circles = 20000
|
233
|
+
start = Time.now
|
234
|
+
n_circles.times do |i|
|
235
|
+
context.circle(rand(w), rand(h), rand(20.0) + 1.0)
|
236
|
+
context.set_source_color([rand, rand, rand, 0.5 + rand / 2])
|
237
|
+
context.fill
|
238
|
+
end
|
239
|
+
circle_draw_time = Time.now - start
|
240
|
+
|
241
|
+
n_lines = 2000
|
242
|
+
start = Time.now
|
243
|
+
n_lines.times do |i|
|
244
|
+
x1 = rand(w)
|
245
|
+
y1 = rand(h)
|
246
|
+
stroke_gradient_line(context,
|
247
|
+
x1, y1,
|
248
|
+
x1 + rand(w * 0.5) - w * 0.25,
|
249
|
+
y1 + rand(h * 0.5) - h * 0.25,
|
250
|
+
10.0, 0,
|
251
|
+
[[0, [rand, rand, rand, 0.5 + rand / 2]],
|
252
|
+
[1, [rand, rand, rand, rand]]])
|
253
|
+
end
|
254
|
+
line_draw_time = Time.now - start
|
255
|
+
|
256
|
+
n_triangles = 2000
|
257
|
+
start = Time.now
|
258
|
+
n_triangles.times do |i|
|
259
|
+
x1 = rand(w)
|
260
|
+
y1 = rand(h)
|
261
|
+
fill_gradient_triangle(context,
|
262
|
+
x1, y1,
|
263
|
+
x1 + rand(w * 0.4) - w * 0.2,
|
264
|
+
y1 + rand(h * 0.4) - h * 0.2,
|
265
|
+
x1 + rand(w * 0.4) - w * 0.2,
|
266
|
+
y1 + rand(h * 0.4) - h * 0.2,
|
267
|
+
[[0, [rand, rand, rand, 0.5 + rand / 2]],
|
268
|
+
[0.5, [rand, rand, rand, rand]],
|
269
|
+
[1, [rand, rand, rand, rand]]])
|
270
|
+
end
|
271
|
+
triangle_draw_time = Time.now - start
|
272
|
+
|
273
|
+
puts "Points=%.2fK/sec, Lines=%.2fK/sec, Triangles=%.2fK/sec" %
|
274
|
+
[n_circles.to_f / circle_draw_time,
|
275
|
+
n_lines.to_f / line_draw_time,
|
276
|
+
n_triangles.to_f / triangle_draw_time]
|
277
|
+
end
|
278
|
+
|
279
|
+
random_mode = false
|
280
|
+
|
281
|
+
area.add_events(Gdk::Event::BUTTON_PRESS_MASK)
|
282
|
+
area.signal_connect("button-press-event") do |widget, event|
|
283
|
+
random_mode = !random_mode
|
284
|
+
widget.queue_draw
|
285
|
+
false
|
286
|
+
end
|
287
|
+
|
288
|
+
area.signal_connect("expose-event") do |widget, event|
|
289
|
+
context = widget.window.create_cairo_context
|
290
|
+
x, y, w, h = widget.allocation.to_a
|
291
|
+
if random_mode
|
292
|
+
draw_random_shapes(context, w, h)
|
293
|
+
else
|
294
|
+
draw_sample_shapes(context, w, h)
|
295
|
+
end
|
296
|
+
true
|
297
|
+
end
|
298
|
+
|
299
|
+
window.add(area)
|
300
|
+
|
301
|
+
window.show_all
|
302
|
+
|
303
|
+
Gtk.main
|
304
|
+
|
data/samples/blur.rb
ADDED
@@ -0,0 +1,47 @@
|
|
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
|
+
margin = 10
|
11
|
+
rectangle_width = 300
|
12
|
+
rectangle_height = 100
|
13
|
+
|
14
|
+
width = rectangle_width + 2 * margin
|
15
|
+
height = (rectangle_height + 2 * margin) * 3
|
16
|
+
|
17
|
+
surface = Cairo::ImageSurface.new(width, height)
|
18
|
+
context = Cairo::Context.new(surface)
|
19
|
+
|
20
|
+
context.set_source_color(:white)
|
21
|
+
context.paint
|
22
|
+
|
23
|
+
module Cairo
|
24
|
+
module Color
|
25
|
+
GRAY30 = Cairo::Color::RGB.new(0.3, 0.3, 0.3)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context.set_source_color(:gray30)
|
30
|
+
context.rectangle(margin, margin, rectangle_width, rectangle_height)
|
31
|
+
context.fill
|
32
|
+
|
33
|
+
context.pseudo_blur do
|
34
|
+
context.set_source_color(:gray30)
|
35
|
+
context.rectangle(margin, rectangle_height + 2 * margin + margin / 2,
|
36
|
+
rectangle_width, rectangle_height)
|
37
|
+
context.fill
|
38
|
+
end
|
39
|
+
|
40
|
+
context.pseudo_blur(5) do
|
41
|
+
context.set_source_color(:gray30)
|
42
|
+
context.rectangle(margin, (rectangle_height + 2 * margin) * 2 + margin / 2,
|
43
|
+
rectangle_width, rectangle_height)
|
44
|
+
context.fill
|
45
|
+
end
|
46
|
+
|
47
|
+
surface.write_to_png("blur.png")
|
data/samples/pac.rb
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
=begin
|
2
|
+
pac.rb - rcairo sample script.
|
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
|
+
paper = Cairo::Paper::A4_LANDSCAPE
|
15
|
+
|
16
|
+
def pac(surface)
|
17
|
+
cr = Cairo::Context.new(surface)
|
18
|
+
|
19
|
+
cr.set_source_color(:black)
|
20
|
+
cr.paint
|
21
|
+
|
22
|
+
# Wall
|
23
|
+
cr.set_source_color(:magenta)
|
24
|
+
cr.rounded_rectangle(20, 80, 750, 20, 10)
|
25
|
+
cr.fill
|
26
|
+
cr.set_source_color(:cyan)
|
27
|
+
cr.rounded_rectangle(20, 80, 750, 20, 10)
|
28
|
+
cr.stroke
|
29
|
+
|
30
|
+
cr.set_source_color(:magenta)
|
31
|
+
cr.rounded_rectangle(20, 380, 750, 20, 10)
|
32
|
+
cr.fill
|
33
|
+
cr.set_source_color(:cyan)
|
34
|
+
cr.rounded_rectangle(20, 380, 750, 20, 10)
|
35
|
+
cr.stroke
|
36
|
+
|
37
|
+
# Body
|
38
|
+
cr.set_source_color(:yellow)
|
39
|
+
cr.fill do
|
40
|
+
cr.arc(150, 250, 100, 30 * (Math::PI / 180), 330 * (Math::PI / 180))
|
41
|
+
cr.line_to(150, 250)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Dot
|
45
|
+
cr.set_source_color(:yellow)
|
46
|
+
cr.circle(250, 250, 20).fill
|
47
|
+
cr.circle(300, 250, 10).fill
|
48
|
+
cr.circle(350, 250, 10).fill
|
49
|
+
cr.circle(400, 250, 10).fill
|
50
|
+
cr.circle(450, 250, 10).fill
|
51
|
+
|
52
|
+
# Ghost
|
53
|
+
cr.move_to(500, 350)
|
54
|
+
cr.line_to(500, 175)
|
55
|
+
cr.curve_to(550, 125, 600, 125, 650, 175)
|
56
|
+
cr.line_to(650, 350)
|
57
|
+
cr.line_to(625, 325)
|
58
|
+
cr.line_to(600, 350)
|
59
|
+
cr.line_to(575, 325)
|
60
|
+
cr.line_to(550, 350)
|
61
|
+
cr.line_to(525, 325)
|
62
|
+
cr.line_to(500, 350)
|
63
|
+
|
64
|
+
cr.set_source_color(:blue)
|
65
|
+
cr.fill_preserve
|
66
|
+
cr.set_source_color(:cyan)
|
67
|
+
cr.stroke
|
68
|
+
|
69
|
+
# Ghost Eyes
|
70
|
+
cr.set_source_color(:white)
|
71
|
+
cr.rectangle(525, 200, 25, 25).fill
|
72
|
+
cr.rectangle(575, 200, 25, 25).fill
|
73
|
+
|
74
|
+
cr.set_source_color(:black)
|
75
|
+
cr.rectangle(525, 215, 10, 10).fill
|
76
|
+
cr.rectangle(575, 215, 10, 10).fill
|
77
|
+
|
78
|
+
cr.show_page
|
79
|
+
end
|
80
|
+
|
81
|
+
Cairo::ImageSurface.new(*paper.size("pt")) do |surface|
|
82
|
+
cr = pac(surface)
|
83
|
+
cr.target.write_to_png("pac.png")
|
84
|
+
end
|
85
|
+
|
86
|
+
def scalable_surface_output(surface_class_name, paper, suffix)
|
87
|
+
if Cairo.const_defined?(surface_class_name)
|
88
|
+
surface_class = Cairo.const_get(surface_class_name)
|
89
|
+
surface_class.new("pac.#{suffix}", paper) do |surface|
|
90
|
+
pac(surface)
|
91
|
+
end
|
92
|
+
else
|
93
|
+
puts("#{surface_class_name} isn't supported.")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
scalable_surface_output("PSSurface", paper, "ps")
|
98
|
+
scalable_surface_output("PDFSurface", paper, "pdf")
|
99
|
+
scalable_surface_output("SVGSurface", paper, "svg")
|