cairo 1.8.5-x86-mingw32 → 1.10.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- data/NEWS +2 -2
- data/Rakefile +44 -7
- data/ext/cairo/cairo.def +28 -1
- data/ext/cairo/extconf.rb +14 -16
- data/ext/cairo/rb_cairo.c +4 -1
- data/ext/cairo/rb_cairo.h +65 -1
- data/ext/cairo/rb_cairo_constants.c +150 -3
- data/ext/cairo/rb_cairo_context.c +17 -0
- data/ext/cairo/rb_cairo_device.c +406 -0
- data/ext/cairo/rb_cairo_exception.c +83 -32
- data/ext/cairo/rb_cairo_io.c +166 -0
- data/ext/cairo/rb_cairo_io.h +44 -0
- data/ext/cairo/rb_cairo_matrix.c +1 -1
- data/ext/cairo/rb_cairo_private.h +3 -0
- data/ext/cairo/rb_cairo_region.c +385 -0
- data/ext/cairo/rb_cairo_surface.c +674 -199
- data/lib/1.8/cairo.so +0 -0
- data/lib/1.9/cairo.so +0 -0
- data/samples/blur.rb +2 -3
- data/samples/{pac2.rb → pac-nomralize.rb} +5 -6
- data/samples/pac-tee.rb +170 -0
- data/samples/pac.rb +2 -3
- data/samples/png.rb +2 -3
- data/samples/scalable.rb +2 -3
- data/samples/text-on-path.rb +2 -3
- data/samples/text2.rb +2 -3
- data/test/cairo-test-utils.rb +15 -0
- data/test/run-test.rb +5 -4
- data/test/test_context.rb +4 -4
- data/test/test_font_face.rb +34 -21
- data/test/test_recording_surface.rb +18 -0
- data/test/test_region.rb +102 -0
- data/test/test_script_device.rb +46 -0
- data/test/test_script_surface.rb +13 -0
- data/test/test_surface.rb +14 -4
- data/test/test_tee_surface.rb +32 -0
- data/test/test_xml_device.rb +22 -0
- data/test/test_xml_surface.rb +32 -0
- data/tmp/i386-mingw32/cairo/1.9.2/rbconfig.rb +1 -1
- data/vendor/local/bin/libcairo-2.dll +0 -0
- data/vendor/local/include/cairo/cairo-deprecated.h +1 -16
- data/vendor/local/include/cairo/cairo-features.h +7 -0
- data/vendor/local/include/cairo/cairo-ft.h +16 -9
- data/vendor/local/include/cairo/cairo-gobject.h +186 -0
- data/vendor/local/include/cairo/cairo-pdf.h +27 -1
- data/vendor/local/include/cairo/cairo-ps.h +1 -1
- data/vendor/local/include/cairo/cairo-script-interpreter.h +117 -0
- data/vendor/local/include/cairo/cairo-svg.h +1 -1
- data/vendor/local/include/cairo/cairo-version.h +2 -2
- data/vendor/local/include/cairo/cairo-win32.h +1 -1
- data/vendor/local/include/cairo/cairo.h +382 -26
- data/vendor/local/lib/cairo.def +44 -0
- data/vendor/local/lib/cairo.lib +0 -0
- data/vendor/local/lib/libcairo.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/cairo-fc.pc +12 -0
- data/vendor/local/lib/pkgconfig/cairo-ft.pc +4 -4
- data/vendor/local/lib/pkgconfig/cairo-gobject.pc +12 -0
- data/vendor/local/lib/pkgconfig/cairo-pdf.pc +3 -3
- data/vendor/local/lib/pkgconfig/cairo-png.pc +3 -3
- data/vendor/local/lib/pkgconfig/cairo-ps.pc +3 -3
- data/vendor/local/lib/pkgconfig/cairo-svg.pc +3 -3
- data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +3 -3
- data/vendor/local/lib/pkgconfig/cairo-win32.pc +3 -3
- data/vendor/local/lib/pkgconfig/cairo.pc +4 -4
- data/vendor/local/manifest/{cairo-dev_1.8.10-4_win32.mft → cairo-dev_1.10.0-1_win32.mft} +34 -27
- data/vendor/local/manifest/cairo_1.10.0-1_win32.mft +5 -0
- data/vendor/local/share/doc/{cairo_1.8.10-4_win32 → cairo_1.10.0-1_win32}/COPYING +9 -8
- data/vendor/local/share/doc/{cairo_1.8.10-4_win32 → cairo_1.10.0-1_win32}/COPYING-LGPL-2.1 +2 -2
- data/vendor/local/share/doc/{cairo_1.8.10-4_win32 → cairo_1.10.0-1_win32}/COPYING-MPL-1.1 +0 -0
- data/vendor/local/share/gtk-doc/html/cairo/bindings-errors.html +4 -14
- data/vendor/local/share/gtk-doc/html/cairo/bindings-fonts.html +5 -15
- data/vendor/local/share/gtk-doc/html/cairo/bindings-memory.html +7 -17
- data/vendor/local/share/gtk-doc/html/cairo/bindings-overloading.html +6 -16
- data/vendor/local/share/gtk-doc/html/cairo/bindings-path.html +6 -16
- data/vendor/local/share/gtk-doc/html/cairo/bindings-patterns.html +23 -28
- data/vendor/local/share/gtk-doc/html/cairo/bindings-return-values.html +3 -13
- data/vendor/local/share/gtk-doc/html/cairo/bindings-streams.html +3 -13
- data/vendor/local/share/gtk-doc/html/cairo/bindings-surfaces.html +7 -17
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Error-handling.html +373 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +330 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +478 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html +344 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PNG-Support.html +320 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +1291 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +622 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-(CGFont)-Fonts.html +134 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +210 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Regions.html +834 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-SVG-Surfaces.html +318 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Transformations.html +410 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Types.html +169 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-User-Fonts.html +715 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Version-Information.html +410 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +335 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +291 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html +470 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +595 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html +384 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-font-options-t.html +644 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-matrix-t.html +574 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +1457 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +1076 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +1396 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +2743 -0
- data/vendor/local/share/gtk-doc/html/cairo/cairo-drawing.html +13 -20
- data/vendor/local/share/gtk-doc/html/cairo/cairo-fonts.html +13 -23
- data/vendor/local/share/gtk-doc/html/cairo/cairo-support.html +11 -21
- data/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +19 -26
- data/vendor/local/share/gtk-doc/html/cairo/cairo-text.html +279 -326
- data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp +411 -355
- data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +579 -480
- data/vendor/local/share/gtk-doc/html/cairo/index-1.10.html +147 -0
- data/vendor/local/share/gtk-doc/html/cairo/index-1.2.html +88 -65
- data/vendor/local/share/gtk-doc/html/cairo/index-1.4.html +72 -47
- data/vendor/local/share/gtk-doc/html/cairo/index-1.6.html +43 -32
- data/vendor/local/share/gtk-doc/html/cairo/index-1.8.html +42 -41
- data/vendor/local/share/gtk-doc/html/cairo/index-all.html +542 -345
- data/vendor/local/share/gtk-doc/html/cairo/index.html +36 -39
- data/vendor/local/share/gtk-doc/html/cairo/index.sgml +674 -444
- data/vendor/local/share/gtk-doc/html/cairo/language-bindings.html +6 -16
- data/vendor/local/share/gtk-doc/html/cairo/style.css +152 -54
- data/vendor/local/src/tml/packaging/cairo_1.10.0-1_win32.log +1262 -0
- data/vendor/local/src/tml/packaging/{cairo_1.8.10-4_win32.sh → cairo_1.10.0-1_win32.sh} +3 -3
- metadata +137 -389
- data/doc/doc.css +0 -91
- data/doc/en/cairo-antialias.html +0 -38
- data/doc/en/cairo-clip-not-representable-error.html +0 -47
- data/doc/en/cairo-color-base.html +0 -69
- data/doc/en/cairo-color-cmyk.html +0 -157
- data/doc/en/cairo-color-hsv.html +0 -137
- data/doc/en/cairo-color-rgb.html +0 -142
- data/doc/en/cairo-color-x11.html +0 -173
- data/doc/en/cairo-color.html +0 -238
- data/doc/en/cairo-content.html +0 -37
- data/doc/en/cairo-context-blur.html +0 -39
- data/doc/en/cairo-context-circle.html +0 -39
- data/doc/en/cairo-context-color.html +0 -39
- data/doc/en/cairo-context-path.html +0 -44
- data/doc/en/cairo-context-rectangle.html +0 -39
- data/doc/en/cairo-context-triangle.html +0 -39
- data/doc/en/cairo-context.html +0 -643
- data/doc/en/cairo-error.html +0 -44
- data/doc/en/cairo-extend.html +0 -38
- data/doc/en/cairo-file-not-found.html +0 -47
- data/doc/en/cairo-fill-rule.html +0 -36
- data/doc/en/cairo-filter.html +0 -40
- data/doc/en/cairo-font-extents.html +0 -129
- data/doc/en/cairo-font-face.html +0 -38
- data/doc/en/cairo-font-options.html +0 -139
- data/doc/en/cairo-font-slant.html +0 -37
- data/doc/en/cairo-font-type-mismatch.html +0 -47
- data/doc/en/cairo-font-weight.html +0 -36
- data/doc/en/cairo-format.html +0 -46
- data/doc/en/cairo-glyph.html +0 -99
- data/doc/en/cairo-gradient-pattern.html +0 -74
- data/doc/en/cairo-hint-metrics.html +0 -37
- data/doc/en/cairo-hint-style.html +0 -39
- data/doc/en/cairo-image-surface.html +0 -82
- data/doc/en/cairo-invalid-clusters.html +0 -47
- data/doc/en/cairo-invalid-content-error.html +0 -47
- data/doc/en/cairo-invalid-dash-error.html +0 -47
- data/doc/en/cairo-invalid-dsc-comment-error.html +0 -47
- data/doc/en/cairo-invalid-format-error.html +0 -47
- data/doc/en/cairo-invalid-index-error.html +0 -47
- data/doc/en/cairo-invalid-matrix-error.html +0 -47
- data/doc/en/cairo-invalid-path-data-error.html +0 -47
- data/doc/en/cairo-invalid-pop-group-error.html +0 -47
- data/doc/en/cairo-invalid-restore-error.html +0 -47
- data/doc/en/cairo-invalid-slant.html +0 -47
- data/doc/en/cairo-invalid-status-error.html +0 -47
- data/doc/en/cairo-invalid-stride-error.html +0 -47
- data/doc/en/cairo-invalid-string-error.html +0 -47
- data/doc/en/cairo-invalid-visual-error.html +0 -47
- data/doc/en/cairo-invalid-weight.html +0 -47
- data/doc/en/cairo-line-cap.html +0 -37
- data/doc/en/cairo-line-join.html +0 -37
- data/doc/en/cairo-linear-pattern.html +0 -60
- data/doc/en/cairo-matrix.html +0 -259
- data/doc/en/cairo-negative-count.html +0 -47
- data/doc/en/cairo-no-current-point-error.html +0 -47
- data/doc/en/cairo-null-pointer-error.html +0 -47
- data/doc/en/cairo-operator.html +0 -48
- data/doc/en/cairo-paper-parse-error.html +0 -47
- data/doc/en/cairo-paper-unknown-paper-name.html +0 -66
- data/doc/en/cairo-paper-unknown-unit.html +0 -66
- data/doc/en/cairo-paper-unrecognized-paper-description.html +0 -66
- data/doc/en/cairo-paper.html +0 -184
- data/doc/en/cairo-path-close-path.html +0 -49
- data/doc/en/cairo-path-curve-to.html +0 -49
- data/doc/en/cairo-path-data-type.html +0 -38
- data/doc/en/cairo-path-data.html +0 -98
- data/doc/en/cairo-path-line-to.html +0 -49
- data/doc/en/cairo-path-move-to.html +0 -49
- data/doc/en/cairo-path.html +0 -155
- data/doc/en/cairo-pattern-type-mismatch-error.html +0 -47
- data/doc/en/cairo-pattern.html +0 -99
- data/doc/en/cairo-pdf-surface.html +0 -57
- data/doc/en/cairo-point.html +0 -74
- data/doc/en/cairo-ps-level.html +0 -49
- data/doc/en/cairo-ps-surface.html +0 -92
- data/doc/en/cairo-quartz-image-surface.html +0 -57
- data/doc/en/cairo-quartz-surface.html +0 -57
- data/doc/en/cairo-radial-pattern.html +0 -60
- data/doc/en/cairo-read-error.html +0 -47
- data/doc/en/cairo-rectangle.html +0 -89
- data/doc/en/cairo-scaled-font.html +0 -94
- data/doc/en/cairo-solid-pattern.html +0 -62
- data/doc/en/cairo-subpixel-order.html +0 -39
- data/doc/en/cairo-surface-finished-error.html +0 -47
- data/doc/en/cairo-surface-pattern.html +0 -57
- data/doc/en/cairo-surface-type-mismatch-error.html +0 -47
- data/doc/en/cairo-surface.html +0 -121
- data/doc/en/cairo-svg-surface.html +0 -77
- data/doc/en/cairo-svg-version.html +0 -49
- data/doc/en/cairo-temp-file-error.html +0 -47
- data/doc/en/cairo-text-cluster-flag.html +0 -35
- data/doc/en/cairo-text-cluster.html +0 -84
- data/doc/en/cairo-text-extents.html +0 -144
- data/doc/en/cairo-toy-font-face.html +0 -67
- data/doc/en/cairo-user-font-error.html +0 -47
- data/doc/en/cairo-user-font-face-text-to-glyphs-data.html +0 -94
- data/doc/en/cairo-user-font-face.html +0 -72
- data/doc/en/cairo-user-font-immutable.html +0 -47
- data/doc/en/cairo-win32-printing-surface.html +0 -57
- data/doc/en/cairo-win32-surface.html +0 -62
- data/doc/en/cairo-write-error.html +0 -47
- data/doc/en/cairo.html +0 -131
- data/doc/en/index.html +0 -1154
- data/doc/index.html +0 -18
- data/doc/ja/cairo-antialias.html +0 -57
- data/doc/ja/cairo-clip-not-representable-error.html +0 -56
- data/doc/ja/cairo-color-base.html +0 -75
- data/doc/ja/cairo-color-cmyk.html +0 -152
- data/doc/ja/cairo-color-hsv.html +0 -135
- data/doc/ja/cairo-color-rgb.html +0 -145
- data/doc/ja/cairo-color-x11.html +0 -183
- data/doc/ja/cairo-color.html +0 -317
- data/doc/ja/cairo-content.html +0 -51
- data/doc/ja/cairo-context-blur.html +0 -53
- data/doc/ja/cairo-context-circle.html +0 -54
- data/doc/ja/cairo-context-color.html +0 -52
- data/doc/ja/cairo-context-path.html +0 -77
- data/doc/ja/cairo-context-rectangle.html +0 -60
- data/doc/ja/cairo-context-triangle.html +0 -47
- data/doc/ja/cairo-context.html +0 -1542
- data/doc/ja/cairo-error.html +0 -56
- data/doc/ja/cairo-extend.html +0 -56
- data/doc/ja/cairo-file-not-found.html +0 -51
- data/doc/ja/cairo-fill-rule.html +0 -58
- data/doc/ja/cairo-filter.html +0 -43
- data/doc/ja/cairo-font-extents.html +0 -164
- data/doc/ja/cairo-font-face.html +0 -55
- data/doc/ja/cairo-font-options.html +0 -189
- data/doc/ja/cairo-font-slant.html +0 -50
- data/doc/ja/cairo-font-type-mismatch.html +0 -52
- data/doc/ja/cairo-font-weight.html +0 -47
- data/doc/ja/cairo-format.html +0 -81
- data/doc/ja/cairo-glyph.html +0 -115
- data/doc/ja/cairo-gradient-pattern.html +0 -119
- data/doc/ja/cairo-hint-metrics.html +0 -57
- data/doc/ja/cairo-hint-style.html +0 -64
- data/doc/ja/cairo-image-surface.html +0 -131
- data/doc/ja/cairo-invalid-clusters.html +0 -55
- data/doc/ja/cairo-invalid-content-error.html +0 -54
- data/doc/ja/cairo-invalid-dash-error.html +0 -54
- data/doc/ja/cairo-invalid-dsc-comment-error.html +0 -54
- data/doc/ja/cairo-invalid-format-error.html +0 -54
- data/doc/ja/cairo-invalid-index-error.html +0 -54
- data/doc/ja/cairo-invalid-matrix-error.html +0 -54
- data/doc/ja/cairo-invalid-path-data-error.html +0 -54
- data/doc/ja/cairo-invalid-pop-group-error.html +0 -54
- data/doc/ja/cairo-invalid-restore-error.html +0 -55
- data/doc/ja/cairo-invalid-slant.html +0 -57
- data/doc/ja/cairo-invalid-status-error.html +0 -55
- data/doc/ja/cairo-invalid-stride-error.html +0 -55
- data/doc/ja/cairo-invalid-string-error.html +0 -54
- data/doc/ja/cairo-invalid-visual-error.html +0 -57
- data/doc/ja/cairo-invalid-weight.html +0 -57
- data/doc/ja/cairo-line-cap.html +0 -50
- data/doc/ja/cairo-line-join.html +0 -53
- data/doc/ja/cairo-linear-pattern.html +0 -87
- data/doc/ja/cairo-matrix.html +0 -354
- data/doc/ja/cairo-negative-count.html +0 -52
- data/doc/ja/cairo-no-current-point-error.html +0 -54
- data/doc/ja/cairo-null-pointer-error.html +0 -54
- data/doc/ja/cairo-operator.html +0 -51
- data/doc/ja/cairo-paper-parse-error.html +0 -55
- data/doc/ja/cairo-paper-unknown-paper-name.html +0 -76
- data/doc/ja/cairo-paper-unknown-unit.html +0 -75
- data/doc/ja/cairo-paper-unrecognized-paper-description.html +0 -76
- data/doc/ja/cairo-paper.html +0 -357
- data/doc/ja/cairo-path-close-path.html +0 -57
- data/doc/ja/cairo-path-curve-to.html +0 -70
- data/doc/ja/cairo-path-data-type.html +0 -53
- data/doc/ja/cairo-path-data.html +0 -127
- data/doc/ja/cairo-path-line-to.html +0 -62
- data/doc/ja/cairo-path-move-to.html +0 -62
- data/doc/ja/cairo-path.html +0 -144
- data/doc/ja/cairo-pattern-type-mismatch-error.html +0 -56
- data/doc/ja/cairo-pattern.html +0 -128
- data/doc/ja/cairo-pdf-surface.html +0 -86
- data/doc/ja/cairo-point.html +0 -90
- data/doc/ja/cairo-ps-level.html +0 -62
- data/doc/ja/cairo-ps-surface.html +0 -214
- data/doc/ja/cairo-quartz-image-surface.html +0 -75
- data/doc/ja/cairo-quartz-surface.html +0 -93
- data/doc/ja/cairo-radial-pattern.html +0 -93
- data/doc/ja/cairo-read-error.html +0 -55
- data/doc/ja/cairo-rectangle.html +0 -109
- data/doc/ja/cairo-scaled-font.html +0 -180
- data/doc/ja/cairo-solid-pattern.html +0 -87
- data/doc/ja/cairo-subpixel-order.html +0 -57
- data/doc/ja/cairo-surface-finished-error.html +0 -54
- data/doc/ja/cairo-surface-pattern.html +0 -68
- data/doc/ja/cairo-surface-type-mismatch-error.html +0 -56
- data/doc/ja/cairo-surface.html +0 -213
- data/doc/ja/cairo-svg-surface.html +0 -114
- data/doc/ja/cairo-svg-version.html +0 -66
- data/doc/ja/cairo-temp-file-error.html +0 -50
- data/doc/ja/cairo-text-cluster-flag.html +0 -46
- data/doc/ja/cairo-text-cluster.html +0 -102
- data/doc/ja/cairo-text-extents.html +0 -163
- data/doc/ja/cairo-toy-font-face.html +0 -107
- data/doc/ja/cairo-user-font-error.html +0 -55
- data/doc/ja/cairo-user-font-face-text-to-glyphs-data.html +0 -156
- data/doc/ja/cairo-user-font-face.html +0 -268
- data/doc/ja/cairo-user-font-immutable.html +0 -54
- data/doc/ja/cairo-win32-printing-surface.html +0 -80
- data/doc/ja/cairo-win32-surface.html +0 -100
- data/doc/ja/cairo-write-error.html +0 -55
- data/doc/ja/cairo.html +0 -177
- data/doc/ja/index.html +0 -1156
- data/pkg-config.rb +0 -313
- data/test-unit/Rakefile +0 -30
- data/test-unit/bin/testrb +0 -5
- data/test-unit/lib/test/unit.rb +0 -280
- data/test-unit/lib/test/unit/assertionfailederror.rb +0 -14
- data/test-unit/lib/test/unit/assertions.rb +0 -722
- data/test-unit/lib/test/unit/attribute.rb +0 -125
- data/test-unit/lib/test/unit/autorunner.rb +0 -254
- data/test-unit/lib/test/unit/collector.rb +0 -43
- data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
- data/test-unit/lib/test/unit/collector/dir.rb +0 -108
- data/test-unit/lib/test/unit/collector/load.rb +0 -135
- data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
- data/test-unit/lib/test/unit/color.rb +0 -61
- data/test-unit/lib/test/unit/diff.rb +0 -524
- data/test-unit/lib/test/unit/error.rb +0 -124
- data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
- data/test-unit/lib/test/unit/failure.rb +0 -110
- data/test-unit/lib/test/unit/fixture.rb +0 -185
- data/test-unit/lib/test/unit/notification.rb +0 -125
- data/test-unit/lib/test/unit/omission.rb +0 -143
- data/test-unit/lib/test/unit/pending.rb +0 -146
- data/test-unit/lib/test/unit/priority.rb +0 -146
- data/test-unit/lib/test/unit/runner/console.rb +0 -46
- data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
- data/test-unit/lib/test/unit/testcase.rb +0 -281
- data/test-unit/lib/test/unit/testresult.rb +0 -89
- data/test-unit/lib/test/unit/testsuite.rb +0 -110
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -195
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -49
- data/test-unit/lib/test/unit/ui/testrunner.rb +0 -20
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
- data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
- data/test-unit/lib/test/unit/util/observable.rb +0 -90
- data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
- data/test-unit/lib/test/unit/version.rb +0 -7
- data/test-unit/sample/adder.rb +0 -13
- data/test-unit/sample/subtracter.rb +0 -12
- data/test-unit/sample/tc_adder.rb +0 -18
- data/test-unit/sample/tc_subtracter.rb +0 -18
- data/test-unit/sample/ts_examples.rb +0 -7
- data/test-unit/test/collector/test_descendant.rb +0 -135
- data/test-unit/test/collector/test_dir.rb +0 -406
- data/test-unit/test/collector/test_load.rb +0 -333
- data/test-unit/test/collector/test_objectspace.rb +0 -98
- data/test-unit/test/run-test.rb +0 -13
- data/test-unit/test/test_assertions.rb +0 -693
- data/test-unit/test/test_attribute.rb +0 -86
- data/test-unit/test/test_color.rb +0 -37
- data/test-unit/test/test_diff.rb +0 -477
- data/test-unit/test/test_emacs_runner.rb +0 -60
- data/test-unit/test/test_error.rb +0 -26
- data/test-unit/test/test_failure.rb +0 -33
- data/test-unit/test/test_fixture.rb +0 -252
- data/test-unit/test/test_notification.rb +0 -33
- data/test-unit/test/test_omission.rb +0 -81
- data/test-unit/test/test_pending.rb +0 -70
- data/test-unit/test/test_priority.rb +0 -89
- data/test-unit/test/test_testcase.rb +0 -430
- data/test-unit/test/test_testresult.rb +0 -113
- data/test-unit/test/test_testsuite.rb +0 -129
- data/test-unit/test/testunit_test_util.rb +0 -14
- data/test-unit/test/ui/test_testrunmediator.rb +0 -20
- data/test-unit/test/util/test_backtracefilter.rb +0 -41
- data/test-unit/test/util/test_observable.rb +0 -102
- data/test-unit/test/util/test_procwrapper.rb +0 -36
- data/test/test_pkg_config.rb +0 -123
- data/vendor/local/include/libpng14/png.h +0 -2701
- data/vendor/local/include/libpng14/pngconf.h +0 -1525
- data/vendor/local/include/png.h +0 -2701
- data/vendor/local/include/pngconf.h +0 -1525
- data/vendor/local/include/zconf.h +0 -461
- data/vendor/local/include/zlib.h +0 -1589
- data/vendor/local/lib/libpng.def +0 -192
- data/vendor/local/lib/libpng.lib +0 -0
- data/vendor/local/lib/libpng14.dll.a +0 -0
- data/vendor/local/lib/libz.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/libpng.pc +0 -11
- data/vendor/local/lib/pkgconfig/libpng14.pc +0 -11
- data/vendor/local/lib/zdll.lib +0 -0
- data/vendor/local/lib/zlib.def +0 -67
- data/vendor/local/manifest/cairo_1.8.10-4_win32.mft +0 -5
- data/vendor/local/manifest/libpng-dev_1.4.3-1_win32.mft +0 -15
- data/vendor/local/manifest/zlib-dev_1.2.5-2_win32.mft +0 -8
- data/vendor/local/share/gtk-doc/html/cairo/cairo-context.html +0 -2643
- data/vendor/local/share/gtk-doc/html/cairo/cairo-error-status.html +0 -360
- data/vendor/local/share/gtk-doc/html/cairo/cairo-font-face.html +0 -408
- data/vendor/local/share/gtk-doc/html/cairo/cairo-font-options.html +0 -678
- data/vendor/local/share/gtk-doc/html/cairo/cairo-ft-font.html +0 -319
- data/vendor/local/share/gtk-doc/html/cairo/cairo-image-surface.html +0 -473
- data/vendor/local/share/gtk-doc/html/cairo/cairo-matrix.html +0 -596
- data/vendor/local/share/gtk-doc/html/cairo/cairo-paths.html +0 -1274
- data/vendor/local/share/gtk-doc/html/cairo/cairo-pattern.html +0 -1485
- data/vendor/local/share/gtk-doc/html/cairo/cairo-pdf-surface.html +0 -238
- data/vendor/local/share/gtk-doc/html/cairo/cairo-png-functions.html +0 -341
- data/vendor/local/share/gtk-doc/html/cairo/cairo-ps-surface.html +0 -622
- data/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-font.html +0 -151
- data/vendor/local/share/gtk-doc/html/cairo/cairo-quartz-surface.html +0 -219
- data/vendor/local/share/gtk-doc/html/cairo/cairo-scaled-font.html +0 -1023
- data/vendor/local/share/gtk-doc/html/cairo/cairo-surface.html +0 -1026
- data/vendor/local/share/gtk-doc/html/cairo/cairo-svg-surface.html +0 -321
- data/vendor/local/share/gtk-doc/html/cairo/cairo-transformations.html +0 -436
- data/vendor/local/share/gtk-doc/html/cairo/cairo-types.html +0 -133
- data/vendor/local/share/gtk-doc/html/cairo/cairo-user-font.html +0 -735
- data/vendor/local/share/gtk-doc/html/cairo/cairo-version-info.html +0 -345
- data/vendor/local/share/gtk-doc/html/cairo/cairo-win32-font.html +0 -358
- data/vendor/local/share/gtk-doc/html/cairo/cairo-win32-surface.html +0 -312
- data/vendor/local/share/gtk-doc/html/cairo/cairo-xlib-surface.html +0 -492
- data/vendor/local/share/man/man3/libpng.3 +0 -4455
- data/vendor/local/share/man/man3/libpngpf.3 +0 -808
- data/vendor/local/share/man/man5/png.5 +0 -74
- data/vendor/local/src/tml/packaging/cairo_1.8.10-4_win32.log +0 -920
- data/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.log +0 -272
- data/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.sh +0 -71
- data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.log +0 -42
- data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.sh +0 -189
@@ -0,0 +1,1396 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
+
<title>cairo_surface_t</title>
|
6
|
+
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
7
|
+
<link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
|
8
|
+
<link rel="up" href="cairo-surfaces.html" title="Surfaces">
|
9
|
+
<link rel="prev" href="cairo-cairo-device-t.html" title="cairo_device_t">
|
10
|
+
<link rel="next" href="cairo-Image-Surfaces.html" title="Image Surfaces">
|
11
|
+
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
|
12
|
+
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
+
</head>
|
14
|
+
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
+
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
16
|
+
<tr valign="middle">
|
17
|
+
<td><a accesskey="p" href="cairo-cairo-device-t.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
18
|
+
<td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
19
|
+
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
20
|
+
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
|
21
|
+
<td><a accesskey="n" href="cairo-Image-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
22
|
+
</tr>
|
23
|
+
<tr><td colspan="5" class="shortcuts">
|
24
|
+
<a href="#cairo-cairo-surface-t.synopsis" class="shortcut">Top</a>
|
25
|
+
|
|
26
|
+
<a href="#cairo-cairo-surface-t.description" class="shortcut">Description</a>
|
27
|
+
</td></tr>
|
28
|
+
</table>
|
29
|
+
<div class="refentry" title="cairo_surface_t">
|
30
|
+
<a name="cairo-cairo-surface-t"></a><div class="titlepage"></div>
|
31
|
+
<div class="refnamediv"><table width="100%"><tr>
|
32
|
+
<td valign="top">
|
33
|
+
<h2><span class="refentrytitle"><a name="cairo-cairo-surface-t.top_of_page"></a>cairo_surface_t</span></h2>
|
34
|
+
<p>cairo_surface_t — Base class for surfaces</p>
|
35
|
+
</td>
|
36
|
+
<td valign="top" align="right"></td>
|
37
|
+
</tr></table></div>
|
38
|
+
<div class="refsynopsisdiv" title="Synopsis">
|
39
|
+
<a name="cairo-cairo-surface-t.synopsis"></a><h2>Synopsis</h2>
|
40
|
+
<pre class="synopsis">#define <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JP2:CAPS" title="CAIRO_MIME_TYPE_JP2">CAIRO_MIME_TYPE_JP2</a>
|
41
|
+
#define <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JPEG:CAPS" title="CAIRO_MIME_TYPE_JPEG">CAIRO_MIME_TYPE_JPEG</a>
|
42
|
+
#define <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-PNG:CAPS" title="CAIRO_MIME_TYPE_PNG">CAIRO_MIME_TYPE_PNG</a>
|
43
|
+
#define <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-URI:CAPS" title="CAIRO_MIME_TYPE_URI">CAIRO_MIME_TYPE_URI</a>
|
44
|
+
typedef <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t">cairo_surface_t</a>;
|
45
|
+
enum <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t">cairo_content_t</a>;
|
46
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-similar" title="cairo_surface_create_similar ()">cairo_surface_create_similar</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *other</code></em>,
|
47
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>,
|
48
|
+
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
49
|
+
<em class="parameter"><code><span class="type">int</span> height</code></em>);
|
50
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-for-rectangle" title="cairo_surface_create_for_rectangle ()">cairo_surface_create_for_rectangle</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *target</code></em>,
|
51
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
52
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>,
|
53
|
+
<em class="parameter"><code><span class="type">double</span> width</code></em>,
|
54
|
+
<em class="parameter"><code><span class="type">double</span> height</code></em>);
|
55
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()">cairo_surface_reference</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
56
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()">cairo_surface_destroy</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
57
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()">cairo_surface_status</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
58
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-finish" title="cairo_surface_finish ()">cairo_surface_finish</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
59
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-flush" title="cairo_surface_flush ()">cairo_surface_flush</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
60
|
+
<a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="returnvalue">cairo_device_t</span></a> * <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-device" title="cairo_surface_get_device ()">cairo_surface_get_device</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
61
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-font-options" title="cairo_surface_get_font_options ()">cairo_surface_get_font_options</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
62
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> *options</code></em>);
|
63
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="returnvalue">cairo_content_t</span></a> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-content" title="cairo_surface_get_content ()">cairo_surface_get_content</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
64
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty" title="cairo_surface_mark_dirty ()">cairo_surface_mark_dirty</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
65
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty-rectangle" title="cairo_surface_mark_dirty_rectangle ()">cairo_surface_mark_dirty_rectangle</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
66
|
+
<em class="parameter"><code><span class="type">int</span> x</code></em>,
|
67
|
+
<em class="parameter"><code><span class="type">int</span> y</code></em>,
|
68
|
+
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
69
|
+
<em class="parameter"><code><span class="type">int</span> height</code></em>);
|
70
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-device-offset" title="cairo_surface_set_device_offset ()">cairo_surface_set_device_offset</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
71
|
+
<em class="parameter"><code><span class="type">double</span> x_offset</code></em>,
|
72
|
+
<em class="parameter"><code><span class="type">double</span> y_offset</code></em>);
|
73
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-device-offset" title="cairo_surface_get_device_offset ()">cairo_surface_get_device_offset</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
74
|
+
<em class="parameter"><code><span class="type">double</span> *x_offset</code></em>,
|
75
|
+
<em class="parameter"><code><span class="type">double</span> *y_offset</code></em>);
|
76
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-fallback-resolution" title="cairo_surface_set_fallback_resolution ()">cairo_surface_set_fallback_resolution</a>
|
77
|
+
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
78
|
+
<em class="parameter"><code><span class="type">double</span> x_pixels_per_inch</code></em>,
|
79
|
+
<em class="parameter"><code><span class="type">double</span> y_pixels_per_inch</code></em>);
|
80
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-fallback-resolution" title="cairo_surface_get_fallback_resolution ()">cairo_surface_get_fallback_resolution</a>
|
81
|
+
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
82
|
+
<em class="parameter"><code><span class="type">double</span> *x_pixels_per_inch</code></em>,
|
83
|
+
<em class="parameter"><code><span class="type">double</span> *y_pixels_per_inch</code></em>);
|
84
|
+
enum <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t" title="enum cairo_surface_type_t">cairo_surface_type_t</a>;
|
85
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t" title="enum cairo_surface_type_t"><span class="returnvalue">cairo_surface_type_t</span></a> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-type" title="cairo_surface_get_type ()">cairo_surface_get_type</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
86
|
+
unsigned <span class="returnvalue">int</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-reference-count" title="cairo_surface_get_reference_count ()">cairo_surface_get_reference_count</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
87
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-user-data" title="cairo_surface_set_user_data ()">cairo_surface_set_user_data</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
88
|
+
<em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>,
|
89
|
+
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
|
90
|
+
<em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>);
|
91
|
+
<span class="returnvalue">void</span> * <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-user-data" title="cairo_surface_get_user_data ()">cairo_surface_get_user_data</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
92
|
+
<em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>);
|
93
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-copy-page" title="cairo_surface_copy_page ()">cairo_surface_copy_page</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
94
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-show-page" title="cairo_surface_show_page ()">cairo_surface_show_page</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
95
|
+
<a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-has-show-text-glyphs" title="cairo_surface_has_show_text_glyphs ()">cairo_surface_has_show_text_glyphs</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);
|
96
|
+
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-mime-data" title="cairo_surface_set_mime_data ()">cairo_surface_set_mime_data</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
97
|
+
<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
|
98
|
+
<em class="parameter"><code>unsigned <span class="type">char</span> *data</code></em>,
|
99
|
+
<em class="parameter"><code><span class="type">unsigned long </span> length</code></em>,
|
100
|
+
<em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>,
|
101
|
+
<em class="parameter"><code><span class="type">void</span> *closure</code></em>);
|
102
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-mime-data" title="cairo_surface_get_mime_data ()">cairo_surface_get_mime_data</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
103
|
+
<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
|
104
|
+
<em class="parameter"><code>unsigned <span class="type">char</span> **data</code></em>,
|
105
|
+
<em class="parameter"><code>unsigned <span class="type">long</span> *length</code></em>);
|
106
|
+
</pre>
|
107
|
+
</div>
|
108
|
+
<div class="refsect1" title="Description">
|
109
|
+
<a name="cairo-cairo-surface-t.description"></a><h2>Description</h2>
|
110
|
+
<p>
|
111
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> is the abstract type representing all different drawing
|
112
|
+
targets that cairo can render to. The actual drawings are
|
113
|
+
performed using a cairo <em class="firstterm">context</em>.
|
114
|
+
</p>
|
115
|
+
<p>
|
116
|
+
A cairo surface is created by using <em class="firstterm">backend</em>-specific
|
117
|
+
constructors, typically of the form
|
118
|
+
cairo_<span class="emphasis"><em>backend</em></span><code class="function">_surface_create()</code>.
|
119
|
+
</p>
|
120
|
+
<p>
|
121
|
+
Most surface types allow accessing the surface without using Cairo
|
122
|
+
functions. If you do this, keep in mind that it is mandatory that you call
|
123
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-flush" title="cairo_surface_flush ()"><code class="function">cairo_surface_flush()</code></a> before reading from or writing to the surface and that
|
124
|
+
you must use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty" title="cairo_surface_mark_dirty ()"><code class="function">cairo_surface_mark_dirty()</code></a> after modifying it.
|
125
|
+
</p>
|
126
|
+
<div class="example">
|
127
|
+
<a name="id3054006"></a><p class="title"><b>Example 1. Directly modifying an image surface</b></p>
|
128
|
+
<div class="example-contents">
|
129
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
130
|
+
<tbody>
|
131
|
+
<tr>
|
132
|
+
<td class="listing_lines" align="right"><pre>1
|
133
|
+
2
|
134
|
+
3
|
135
|
+
4
|
136
|
+
5
|
137
|
+
6
|
138
|
+
7
|
139
|
+
8
|
140
|
+
9
|
141
|
+
10
|
142
|
+
11
|
143
|
+
12
|
144
|
+
13
|
145
|
+
14
|
146
|
+
15
|
147
|
+
16
|
148
|
+
17
|
149
|
+
18
|
150
|
+
19</pre></td>
|
151
|
+
<td class="listing_code"><pre class="programlisting"><span class="type">void</span>
|
152
|
+
<span class="function">modify_image_surface</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">cairo_surface_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">surface</span><span class="symbol">)</span>
|
153
|
+
<span class="cbracket">{</span>
|
154
|
+
<span class="normal"> </span><span class="type">unsigned</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">data</span><span class="symbol">;</span>
|
155
|
+
<span class="normal"> </span><span class="type">int</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">,</span><span class="normal"> stride</span><span class="symbol">;</span>
|
156
|
+
|
157
|
+
<span class="normal"> </span><span class="comment">// flush to ensure all writing to the image was done</span>
|
158
|
+
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-flush">cairo_surface_flush</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span>
|
159
|
+
|
160
|
+
<span class="normal"> </span><span class="comment">// modify the image</span>
|
161
|
+
<span class="normal"> data </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-data">cairo_image_surface_get_data</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span>
|
162
|
+
<span class="normal"> width </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-width">cairo_image_surface_get_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span>
|
163
|
+
<span class="normal"> height </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-height">cairo_image_surface_get_height</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span>
|
164
|
+
<span class="normal"> stride </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-image-surface-get-stride">cairo_image_surface_get_stride</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span>
|
165
|
+
<span class="normal"> </span><span class="function">modify_image_data</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">,</span><span class="normal"> stride</span><span class="symbol">);</span>
|
166
|
+
|
167
|
+
<span class="normal"> </span><span class="comment">// mark the image dirty so Cairo clears its caches.</span>
|
168
|
+
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-mark-dirty">cairo_surface_mark_dirty</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">surface</span><span class="symbol">);</span>
|
169
|
+
<span class="cbracket">}</span></pre></td>
|
170
|
+
</tr>
|
171
|
+
</tbody>
|
172
|
+
</table>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</div>
|
176
|
+
<p><br class="example-break">
|
177
|
+
Note that for other surface types it might be necessary to acquire the
|
178
|
+
surface's device first. See <a class="link" href="cairo-cairo-device-t.html#cairo-device-acquire" title="cairo_device_acquire ()"><code class="function">cairo_device_acquire()</code></a> for a discussion of
|
179
|
+
devices.
|
180
|
+
</p>
|
181
|
+
</div>
|
182
|
+
<div class="refsect1" title="Details">
|
183
|
+
<a name="cairo-cairo-surface-t.details"></a><h2>Details</h2>
|
184
|
+
<div class="refsect2" title="CAIRO_MIME_TYPE_JP2">
|
185
|
+
<a name="CAIRO-MIME-TYPE-JP2:CAPS"></a><h3>CAIRO_MIME_TYPE_JP2</h3>
|
186
|
+
<pre class="programlisting">#define CAIRO_MIME_TYPE_JP2 "image/jp2"
|
187
|
+
</pre>
|
188
|
+
<p>
|
189
|
+
The Joint Photographic Experts Group (JPEG) 2000 image coding standard (ISO/IEC 15444-1).
|
190
|
+
</p>
|
191
|
+
<p>
|
192
|
+
<em class="parameter"><code>Since</code></em>: 1.10
|
193
|
+
</p>
|
194
|
+
</div>
|
195
|
+
<hr>
|
196
|
+
<div class="refsect2" title="CAIRO_MIME_TYPE_JPEG">
|
197
|
+
<a name="CAIRO-MIME-TYPE-JPEG:CAPS"></a><h3>CAIRO_MIME_TYPE_JPEG</h3>
|
198
|
+
<pre class="programlisting">#define CAIRO_MIME_TYPE_JPEG "image/jpeg"
|
199
|
+
</pre>
|
200
|
+
<p>
|
201
|
+
The Joint Photographic Experts Group (JPEG) image coding standard (ISO/IEC 10918-1).
|
202
|
+
</p>
|
203
|
+
<p>
|
204
|
+
<em class="parameter"><code>Since</code></em>: 1.10
|
205
|
+
</p>
|
206
|
+
</div>
|
207
|
+
<hr>
|
208
|
+
<div class="refsect2" title="CAIRO_MIME_TYPE_PNG">
|
209
|
+
<a name="CAIRO-MIME-TYPE-PNG:CAPS"></a><h3>CAIRO_MIME_TYPE_PNG</h3>
|
210
|
+
<pre class="programlisting">#define CAIRO_MIME_TYPE_PNG "image/png"
|
211
|
+
</pre>
|
212
|
+
<p>
|
213
|
+
The Portable Network Graphics image file format (ISO/IEC 15948).
|
214
|
+
</p>
|
215
|
+
<p>
|
216
|
+
<em class="parameter"><code>Since</code></em>: 1.10
|
217
|
+
</p>
|
218
|
+
</div>
|
219
|
+
<hr>
|
220
|
+
<div class="refsect2" title="CAIRO_MIME_TYPE_URI">
|
221
|
+
<a name="CAIRO-MIME-TYPE-URI:CAPS"></a><h3>CAIRO_MIME_TYPE_URI</h3>
|
222
|
+
<pre class="programlisting">#define CAIRO_MIME_TYPE_URI "text/x-uri"
|
223
|
+
</pre>
|
224
|
+
<p>
|
225
|
+
URI for an image file (unofficial MIME type).
|
226
|
+
</p>
|
227
|
+
<p>
|
228
|
+
<em class="parameter"><code>Since</code></em>: 1.10
|
229
|
+
</p>
|
230
|
+
</div>
|
231
|
+
<hr>
|
232
|
+
<div class="refsect2" title="cairo_surface_t">
|
233
|
+
<a name="cairo-surface-t"></a><h3>cairo_surface_t</h3>
|
234
|
+
<pre class="programlisting">typedef struct _cairo_surface cairo_surface_t;
|
235
|
+
</pre>
|
236
|
+
<p>
|
237
|
+
A <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> represents an image, either as the destination
|
238
|
+
of a drawing operation or as source when drawing onto another
|
239
|
+
surface. To draw to a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>, create a cairo context
|
240
|
+
with the surface as the target, using <a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a>.
|
241
|
+
</p>
|
242
|
+
<p>
|
243
|
+
There are different subtypes of <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> for
|
244
|
+
different drawing backends; for example, <a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-create" title="cairo_image_surface_create ()"><code class="function">cairo_image_surface_create()</code></a>
|
245
|
+
creates a bitmap image in memory.
|
246
|
+
The type of a surface can be queried with <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-type" title="cairo_surface_get_type ()"><code class="function">cairo_surface_get_type()</code></a>.
|
247
|
+
</p>
|
248
|
+
<p>
|
249
|
+
The initial contents of a surface after creation depend upon the manner
|
250
|
+
of its creation. If cairo creates the surface and backing storage for
|
251
|
+
the user, it will be initially cleared; for example,
|
252
|
+
<a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-create" title="cairo_image_surface_create ()"><code class="function">cairo_image_surface_create()</code></a> and <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-similar" title="cairo_surface_create_similar ()"><code class="function">cairo_surface_create_similar()</code></a>.
|
253
|
+
Alternatively, if the user passes in a reference to some backing storage
|
254
|
+
and asks cairo to wrap that in a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>, then the contents are
|
255
|
+
not modified; for example, <a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-create-for-data" title="cairo_image_surface_create_for_data ()"><code class="function">cairo_image_surface_create_for_data()</code></a> and
|
256
|
+
<a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-create" title="cairo_xlib_surface_create ()"><code class="function">cairo_xlib_surface_create()</code></a>.
|
257
|
+
</p>
|
258
|
+
<p>
|
259
|
+
Memory management of <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> is done with
|
260
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a> and <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a>.
|
261
|
+
</p>
|
262
|
+
</div>
|
263
|
+
<hr>
|
264
|
+
<div class="refsect2" title="enum cairo_content_t">
|
265
|
+
<a name="cairo-content-t"></a><h3>enum cairo_content_t</h3>
|
266
|
+
<pre class="programlisting">typedef enum _cairo_content {
|
267
|
+
CAIRO_CONTENT_COLOR = 0x1000,
|
268
|
+
CAIRO_CONTENT_ALPHA = 0x2000,
|
269
|
+
CAIRO_CONTENT_COLOR_ALPHA = 0x3000
|
270
|
+
} cairo_content_t;
|
271
|
+
</pre>
|
272
|
+
<p>
|
273
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> is used to describe the content that a surface will
|
274
|
+
contain, whether color information, alpha information (translucence
|
275
|
+
vs. opacity), or both.
|
276
|
+
</p>
|
277
|
+
<p>
|
278
|
+
Note: The large values here are designed to keep <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a>
|
279
|
+
values distinct from <a class="link" href="cairo-Image-Surfaces.html#cairo-format-t" title="enum cairo_format_t"><span class="type">cairo_format_t</span></a> values so that the
|
280
|
+
implementation can detect the error if users confuse the two types.
|
281
|
+
</p>
|
282
|
+
<div class="variablelist"><table border="0">
|
283
|
+
<col align="left" valign="top">
|
284
|
+
<tbody>
|
285
|
+
<tr>
|
286
|
+
<td><p><a name="CAIRO-CONTENT-COLOR:CAPS"></a><span class="term"><code class="literal">CAIRO_CONTENT_COLOR</code></span></p></td>
|
287
|
+
<td>The surface will hold color content only.
|
288
|
+
</td>
|
289
|
+
</tr>
|
290
|
+
<tr>
|
291
|
+
<td><p><a name="CAIRO-CONTENT-ALPHA:CAPS"></a><span class="term"><code class="literal">CAIRO_CONTENT_ALPHA</code></span></p></td>
|
292
|
+
<td>The surface will hold alpha content only.
|
293
|
+
</td>
|
294
|
+
</tr>
|
295
|
+
<tr>
|
296
|
+
<td><p><a name="CAIRO-CONTENT-COLOR-ALPHA:CAPS"></a><span class="term"><code class="literal">CAIRO_CONTENT_COLOR_ALPHA</code></span></p></td>
|
297
|
+
<td>The surface will hold color and alpha content.
|
298
|
+
</td>
|
299
|
+
</tr>
|
300
|
+
</tbody>
|
301
|
+
</table></div>
|
302
|
+
</div>
|
303
|
+
<hr>
|
304
|
+
<div class="refsect2" title="cairo_surface_create_similar ()">
|
305
|
+
<a name="cairo-surface-create-similar"></a><h3>cairo_surface_create_similar ()</h3>
|
306
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * cairo_surface_create_similar (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *other</code></em>,
|
307
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a> content</code></em>,
|
308
|
+
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
309
|
+
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
|
310
|
+
<p>
|
311
|
+
Create a new surface that is as compatible as possible with an
|
312
|
+
existing surface. For example the new surface will have the same
|
313
|
+
fallback resolution and font options as <em class="parameter"><code>other</code></em>. Generally, the new
|
314
|
+
surface will also use the same backend as <em class="parameter"><code>other</code></em>, unless that is
|
315
|
+
not possible for some reason. The type of the returned surface may
|
316
|
+
be examined with <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-type" title="cairo_surface_get_type ()"><code class="function">cairo_surface_get_type()</code></a>.
|
317
|
+
</p>
|
318
|
+
<p>
|
319
|
+
Initially the surface contents are all 0 (transparent if contents
|
320
|
+
have transparency, black otherwise.)
|
321
|
+
</p>
|
322
|
+
<div class="variablelist"><table border="0">
|
323
|
+
<col align="left" valign="top">
|
324
|
+
<tbody>
|
325
|
+
<tr>
|
326
|
+
<td><p><span class="term"><em class="parameter"><code>other</code></em> :</span></p></td>
|
327
|
+
<td>an existing surface used to select the backend of the new surface
|
328
|
+
</td>
|
329
|
+
</tr>
|
330
|
+
<tr>
|
331
|
+
<td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td>
|
332
|
+
<td>the content for the new surface
|
333
|
+
</td>
|
334
|
+
</tr>
|
335
|
+
<tr>
|
336
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
337
|
+
<td>width of the new surface, (in device-space units)
|
338
|
+
</td>
|
339
|
+
</tr>
|
340
|
+
<tr>
|
341
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
342
|
+
<td>height of the new surface (in device-space units)
|
343
|
+
</td>
|
344
|
+
</tr>
|
345
|
+
<tr>
|
346
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
347
|
+
<td> a pointer to the newly allocated surface. The caller
|
348
|
+
owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
|
349
|
+
with it.
|
350
|
+
|
351
|
+
This function always returns a valid pointer, but it will return a
|
352
|
+
pointer to a "nil" surface if <em class="parameter"><code>other</code></em> is already in an error state
|
353
|
+
or any other error occurs.
|
354
|
+
</td>
|
355
|
+
</tr>
|
356
|
+
</tbody>
|
357
|
+
</table></div>
|
358
|
+
</div>
|
359
|
+
<hr>
|
360
|
+
<div class="refsect2" title="cairo_surface_create_for_rectangle ()">
|
361
|
+
<a name="cairo-surface-create-for-rectangle"></a><h3>cairo_surface_create_for_rectangle ()</h3>
|
362
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * cairo_surface_create_for_rectangle (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *target</code></em>,
|
363
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
364
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>,
|
365
|
+
<em class="parameter"><code><span class="type">double</span> width</code></em>,
|
366
|
+
<em class="parameter"><code><span class="type">double</span> height</code></em>);</pre>
|
367
|
+
<p>
|
368
|
+
Create a new surface that is a rectangle within the target surface.
|
369
|
+
All operations drawn to this surface are then clipped and translated
|
370
|
+
onto the target surface. Nothing drawn via this sub-surface outside of
|
371
|
+
its bounds is drawn onto the target surface, making this a useful method
|
372
|
+
for passing constrained child surfaces to library routines that draw
|
373
|
+
directly onto the parent surface, i.e. with no further backend allocations,
|
374
|
+
double buffering or copies.
|
375
|
+
</p>
|
376
|
+
<p>
|
377
|
+
</p>
|
378
|
+
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
379
|
+
<h3 class="title">Note</h3>
|
380
|
+
<p>The semantics of subsurfaces have not been finalized yet
|
381
|
+
unless the rectangle is in full device units, is contained within
|
382
|
+
the extents of the target surface, and the target or subsurface's
|
383
|
+
device transforms are not changed.</p>
|
384
|
+
</div>
|
385
|
+
<p>
|
386
|
+
</p>
|
387
|
+
<div class="variablelist"><table border="0">
|
388
|
+
<col align="left" valign="top">
|
389
|
+
<tbody>
|
390
|
+
<tr>
|
391
|
+
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
|
392
|
+
<td>an existing surface for which the sub-surface will point to
|
393
|
+
</td>
|
394
|
+
</tr>
|
395
|
+
<tr>
|
396
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
397
|
+
<td>the x-origin of the sub-surface from the top-left of the target surface (in device-space units)
|
398
|
+
</td>
|
399
|
+
</tr>
|
400
|
+
<tr>
|
401
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
402
|
+
<td>the y-origin of the sub-surface from the top-left of the target surface (in device-space units)
|
403
|
+
</td>
|
404
|
+
</tr>
|
405
|
+
<tr>
|
406
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
407
|
+
<td>width of the sub-surface (in device-space units)
|
408
|
+
</td>
|
409
|
+
</tr>
|
410
|
+
<tr>
|
411
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
412
|
+
<td>height of the sub-surface (in device-space units)
|
413
|
+
</td>
|
414
|
+
</tr>
|
415
|
+
<tr>
|
416
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
417
|
+
<td> a pointer to the newly allocated surface. The caller
|
418
|
+
owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
|
419
|
+
with it.
|
420
|
+
|
421
|
+
This function always returns a valid pointer, but it will return a
|
422
|
+
pointer to a "nil" surface if <em class="parameter"><code>other</code></em> is already in an error state
|
423
|
+
or any other error occurs.
|
424
|
+
|
425
|
+
</td>
|
426
|
+
</tr>
|
427
|
+
</tbody>
|
428
|
+
</table></div>
|
429
|
+
<p class="since">Since 1.10</p>
|
430
|
+
</div>
|
431
|
+
<hr>
|
432
|
+
<div class="refsect2" title="cairo_surface_reference ()">
|
433
|
+
<a name="cairo-surface-reference"></a><h3>cairo_surface_reference ()</h3>
|
434
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * cairo_surface_reference (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
435
|
+
<p>
|
436
|
+
Increases the reference count on <em class="parameter"><code>surface</code></em> by one. This prevents
|
437
|
+
<em class="parameter"><code>surface</code></em> from being destroyed until a matching call to
|
438
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> is made.
|
439
|
+
</p>
|
440
|
+
<p>
|
441
|
+
The number of references to a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> can be get using
|
442
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-reference-count" title="cairo_surface_get_reference_count ()"><code class="function">cairo_surface_get_reference_count()</code></a>.
|
443
|
+
</p>
|
444
|
+
<div class="variablelist"><table border="0">
|
445
|
+
<col align="left" valign="top">
|
446
|
+
<tbody>
|
447
|
+
<tr>
|
448
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
449
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
450
|
+
</td>
|
451
|
+
</tr>
|
452
|
+
<tr>
|
453
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
454
|
+
<td> the referenced <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>.
|
455
|
+
</td>
|
456
|
+
</tr>
|
457
|
+
</tbody>
|
458
|
+
</table></div>
|
459
|
+
</div>
|
460
|
+
<hr>
|
461
|
+
<div class="refsect2" title="cairo_surface_destroy ()">
|
462
|
+
<a name="cairo-surface-destroy"></a><h3>cairo_surface_destroy ()</h3>
|
463
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_destroy (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
464
|
+
<p>
|
465
|
+
Decreases the reference count on <em class="parameter"><code>surface</code></em> by one. If the result is
|
466
|
+
zero, then <em class="parameter"><code>surface</code></em> and all associated resources are freed. See
|
467
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.
|
468
|
+
</p>
|
469
|
+
<div class="variablelist"><table border="0">
|
470
|
+
<col align="left" valign="top">
|
471
|
+
<tbody><tr>
|
472
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
473
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
474
|
+
</td>
|
475
|
+
</tr></tbody>
|
476
|
+
</table></div>
|
477
|
+
</div>
|
478
|
+
<hr>
|
479
|
+
<div class="refsect2" title="cairo_surface_status ()">
|
480
|
+
<a name="cairo-surface-status"></a><h3>cairo_surface_status ()</h3>
|
481
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> cairo_surface_status (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
482
|
+
<p>
|
483
|
+
Checks whether an error has previously occurred for this
|
484
|
+
surface.
|
485
|
+
</p>
|
486
|
+
<div class="variablelist"><table border="0">
|
487
|
+
<col align="left" valign="top">
|
488
|
+
<tbody>
|
489
|
+
<tr>
|
490
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
491
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
492
|
+
</td>
|
493
|
+
</tr>
|
494
|
+
<tr>
|
495
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
496
|
+
<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NULL-POINTER:CAPS"><code class="literal">CAIRO_STATUS_NULL_POINTER</code></a>,
|
497
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>,
|
498
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-CONTENT:CAPS"><code class="literal">CAIRO_STATUS_INVALID_CONTENT</code></a>, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-FORMAT:CAPS"><code class="literal">CAIRO_STATUS_INVALID_FORMAT</code></a>, or
|
499
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-VISUAL:CAPS"><code class="literal">CAIRO_STATUS_INVALID_VISUAL</code></a>.
|
500
|
+
</td>
|
501
|
+
</tr>
|
502
|
+
</tbody>
|
503
|
+
</table></div>
|
504
|
+
</div>
|
505
|
+
<hr>
|
506
|
+
<div class="refsect2" title="cairo_surface_finish ()">
|
507
|
+
<a name="cairo-surface-finish"></a><h3>cairo_surface_finish ()</h3>
|
508
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_finish (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
509
|
+
<p>
|
510
|
+
This function finishes the surface and drops all references to
|
511
|
+
external resources. For example, for the Xlib backend it means
|
512
|
+
that cairo will no longer access the drawable, which can be freed.
|
513
|
+
After calling <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-finish" title="cairo_surface_finish ()"><code class="function">cairo_surface_finish()</code></a> the only valid operations on a
|
514
|
+
surface are getting and setting user, referencing and
|
515
|
+
destroying, and flushing and finishing it.
|
516
|
+
Further drawing to the surface will not affect the
|
517
|
+
surface but will instead trigger a <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SURFACE-FINISHED:CAPS"><code class="literal">CAIRO_STATUS_SURFACE_FINISHED</code></a>
|
518
|
+
error.
|
519
|
+
</p>
|
520
|
+
<p>
|
521
|
+
When the last call to <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> decreases the
|
522
|
+
reference count to zero, cairo will call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-finish" title="cairo_surface_finish ()"><code class="function">cairo_surface_finish()</code></a> if
|
523
|
+
it hasn't been called already, before freeing the resources
|
524
|
+
associated with the surface.
|
525
|
+
</p>
|
526
|
+
<div class="variablelist"><table border="0">
|
527
|
+
<col align="left" valign="top">
|
528
|
+
<tbody><tr>
|
529
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
530
|
+
<td>the <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> to finish
|
531
|
+
</td>
|
532
|
+
</tr></tbody>
|
533
|
+
</table></div>
|
534
|
+
</div>
|
535
|
+
<hr>
|
536
|
+
<div class="refsect2" title="cairo_surface_flush ()">
|
537
|
+
<a name="cairo-surface-flush"></a><h3>cairo_surface_flush ()</h3>
|
538
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_flush (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
539
|
+
<p>
|
540
|
+
Do any pending drawing for the surface and also restore any
|
541
|
+
temporary modifications cairo has made to the surface's
|
542
|
+
state. This function must be called before switching from
|
543
|
+
drawing on the surface with cairo to drawing on it directly
|
544
|
+
with native APIs. If the surface doesn't support direct access,
|
545
|
+
then this function does nothing.
|
546
|
+
</p>
|
547
|
+
<div class="variablelist"><table border="0">
|
548
|
+
<col align="left" valign="top">
|
549
|
+
<tbody><tr>
|
550
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
551
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
552
|
+
</td>
|
553
|
+
</tr></tbody>
|
554
|
+
</table></div>
|
555
|
+
</div>
|
556
|
+
<hr>
|
557
|
+
<div class="refsect2" title="cairo_surface_get_device ()">
|
558
|
+
<a name="cairo-surface-get-device"></a><h3>cairo_surface_get_device ()</h3>
|
559
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="returnvalue">cairo_device_t</span></a> * cairo_surface_get_device (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
560
|
+
<p>
|
561
|
+
This function returns the device for a <em class="parameter"><code>surface</code></em>.
|
562
|
+
See <a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a>.
|
563
|
+
</p>
|
564
|
+
<div class="variablelist"><table border="0">
|
565
|
+
<col align="left" valign="top">
|
566
|
+
<tbody>
|
567
|
+
<tr>
|
568
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
569
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
570
|
+
</td>
|
571
|
+
</tr>
|
572
|
+
<tr>
|
573
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
574
|
+
<td> The device for <em class="parameter"><code>surface</code></em> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the surface does
|
575
|
+
not have an associated device.
|
576
|
+
|
577
|
+
</td>
|
578
|
+
</tr>
|
579
|
+
</tbody>
|
580
|
+
</table></div>
|
581
|
+
<p class="since">Since 1.10</p>
|
582
|
+
</div>
|
583
|
+
<hr>
|
584
|
+
<div class="refsect2" title="cairo_surface_get_font_options ()">
|
585
|
+
<a name="cairo-surface-get-font-options"></a><h3>cairo_surface_get_font_options ()</h3>
|
586
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_get_font_options (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
587
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> *options</code></em>);</pre>
|
588
|
+
<p>
|
589
|
+
Retrieves the default font rendering options for the surface.
|
590
|
+
This allows display surfaces to report the correct subpixel order
|
591
|
+
for rendering on them, print surfaces to disable hinting of
|
592
|
+
metrics and so forth. The result can then be used with
|
593
|
+
<a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a>.
|
594
|
+
</p>
|
595
|
+
<div class="variablelist"><table border="0">
|
596
|
+
<col align="left" valign="top">
|
597
|
+
<tbody>
|
598
|
+
<tr>
|
599
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
600
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
601
|
+
</td>
|
602
|
+
</tr>
|
603
|
+
<tr>
|
604
|
+
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
|
605
|
+
<td>a <a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> object into which to store
|
606
|
+
the retrieved options. All existing values are overwritten
|
607
|
+
</td>
|
608
|
+
</tr>
|
609
|
+
</tbody>
|
610
|
+
</table></div>
|
611
|
+
</div>
|
612
|
+
<hr>
|
613
|
+
<div class="refsect2" title="cairo_surface_get_content ()">
|
614
|
+
<a name="cairo-surface-get-content"></a><h3>cairo_surface_get_content ()</h3>
|
615
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="returnvalue">cairo_content_t</span></a> cairo_surface_get_content (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
616
|
+
<p>
|
617
|
+
This function returns the content type of <em class="parameter"><code>surface</code></em> which indicates
|
618
|
+
whether the surface contains color and/or alpha information. See
|
619
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-content-t" title="enum cairo_content_t"><span class="type">cairo_content_t</span></a>.
|
620
|
+
</p>
|
621
|
+
<div class="variablelist"><table border="0">
|
622
|
+
<col align="left" valign="top">
|
623
|
+
<tbody>
|
624
|
+
<tr>
|
625
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
626
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
627
|
+
</td>
|
628
|
+
</tr>
|
629
|
+
<tr>
|
630
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
631
|
+
<td> The content type of <em class="parameter"><code>surface</code></em>.
|
632
|
+
|
633
|
+
</td>
|
634
|
+
</tr>
|
635
|
+
</tbody>
|
636
|
+
</table></div>
|
637
|
+
<p class="since">Since 1.2</p>
|
638
|
+
</div>
|
639
|
+
<hr>
|
640
|
+
<div class="refsect2" title="cairo_surface_mark_dirty ()">
|
641
|
+
<a name="cairo-surface-mark-dirty"></a><h3>cairo_surface_mark_dirty ()</h3>
|
642
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_mark_dirty (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
643
|
+
<p>
|
644
|
+
Tells cairo that drawing has been done to surface using means other
|
645
|
+
than cairo, and that cairo should reread any cached areas. Note
|
646
|
+
that you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-flush" title="cairo_surface_flush ()"><code class="function">cairo_surface_flush()</code></a> before doing such drawing.
|
647
|
+
</p>
|
648
|
+
<div class="variablelist"><table border="0">
|
649
|
+
<col align="left" valign="top">
|
650
|
+
<tbody><tr>
|
651
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
652
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
653
|
+
</td>
|
654
|
+
</tr></tbody>
|
655
|
+
</table></div>
|
656
|
+
</div>
|
657
|
+
<hr>
|
658
|
+
<div class="refsect2" title="cairo_surface_mark_dirty_rectangle ()">
|
659
|
+
<a name="cairo-surface-mark-dirty-rectangle"></a><h3>cairo_surface_mark_dirty_rectangle ()</h3>
|
660
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_mark_dirty_rectangle (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
661
|
+
<em class="parameter"><code><span class="type">int</span> x</code></em>,
|
662
|
+
<em class="parameter"><code><span class="type">int</span> y</code></em>,
|
663
|
+
<em class="parameter"><code><span class="type">int</span> width</code></em>,
|
664
|
+
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
|
665
|
+
<p>
|
666
|
+
Like <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-mark-dirty" title="cairo_surface_mark_dirty ()"><code class="function">cairo_surface_mark_dirty()</code></a>, but drawing has been done only to
|
667
|
+
the specified rectangle, so that cairo can retain cached contents
|
668
|
+
for other parts of the surface.
|
669
|
+
</p>
|
670
|
+
<p>
|
671
|
+
Any cached clip set on the surface will be reset by this function,
|
672
|
+
to make sure that future cairo calls have the clip set that they
|
673
|
+
expect.
|
674
|
+
</p>
|
675
|
+
<div class="variablelist"><table border="0">
|
676
|
+
<col align="left" valign="top">
|
677
|
+
<tbody>
|
678
|
+
<tr>
|
679
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
680
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
681
|
+
</td>
|
682
|
+
</tr>
|
683
|
+
<tr>
|
684
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
685
|
+
<td>X coordinate of dirty rectangle
|
686
|
+
</td>
|
687
|
+
</tr>
|
688
|
+
<tr>
|
689
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
690
|
+
<td>Y coordinate of dirty rectangle
|
691
|
+
</td>
|
692
|
+
</tr>
|
693
|
+
<tr>
|
694
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
695
|
+
<td>width of dirty rectangle
|
696
|
+
</td>
|
697
|
+
</tr>
|
698
|
+
<tr>
|
699
|
+
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
|
700
|
+
<td>height of dirty rectangle
|
701
|
+
</td>
|
702
|
+
</tr>
|
703
|
+
</tbody>
|
704
|
+
</table></div>
|
705
|
+
</div>
|
706
|
+
<hr>
|
707
|
+
<div class="refsect2" title="cairo_surface_set_device_offset ()">
|
708
|
+
<a name="cairo-surface-set-device-offset"></a><h3>cairo_surface_set_device_offset ()</h3>
|
709
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_set_device_offset (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
710
|
+
<em class="parameter"><code><span class="type">double</span> x_offset</code></em>,
|
711
|
+
<em class="parameter"><code><span class="type">double</span> y_offset</code></em>);</pre>
|
712
|
+
<p>
|
713
|
+
Sets an offset that is added to the device coordinates determined
|
714
|
+
by the CTM when drawing to <em class="parameter"><code>surface</code></em>. One use case for this function
|
715
|
+
is when we want to create a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> that redirects drawing
|
716
|
+
for a portion of an onscreen surface to an offscreen surface in a
|
717
|
+
way that is completely invisible to the user of the cairo
|
718
|
+
API. Setting a transformation via <a class="link" href="cairo-Transformations.html#cairo-translate" title="cairo_translate ()"><code class="function">cairo_translate()</code></a> isn't
|
719
|
+
sufficient to do this, since functions like
|
720
|
+
<a class="link" href="cairo-Transformations.html#cairo-device-to-user" title="cairo_device_to_user ()"><code class="function">cairo_device_to_user()</code></a> will expose the hidden offset.
|
721
|
+
</p>
|
722
|
+
<p>
|
723
|
+
Note that the offset affects drawing to the surface as well as
|
724
|
+
using the surface in a source pattern.
|
725
|
+
</p>
|
726
|
+
<div class="variablelist"><table border="0">
|
727
|
+
<col align="left" valign="top">
|
728
|
+
<tbody>
|
729
|
+
<tr>
|
730
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
731
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
732
|
+
</td>
|
733
|
+
</tr>
|
734
|
+
<tr>
|
735
|
+
<td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
|
736
|
+
<td>the offset in the X direction, in device units
|
737
|
+
</td>
|
738
|
+
</tr>
|
739
|
+
<tr>
|
740
|
+
<td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
|
741
|
+
<td>the offset in the Y direction, in device units
|
742
|
+
</td>
|
743
|
+
</tr>
|
744
|
+
</tbody>
|
745
|
+
</table></div>
|
746
|
+
</div>
|
747
|
+
<hr>
|
748
|
+
<div class="refsect2" title="cairo_surface_get_device_offset ()">
|
749
|
+
<a name="cairo-surface-get-device-offset"></a><h3>cairo_surface_get_device_offset ()</h3>
|
750
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_get_device_offset (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
751
|
+
<em class="parameter"><code><span class="type">double</span> *x_offset</code></em>,
|
752
|
+
<em class="parameter"><code><span class="type">double</span> *y_offset</code></em>);</pre>
|
753
|
+
<p>
|
754
|
+
This function returns the previous device offset set by
|
755
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-device-offset" title="cairo_surface_set_device_offset ()"><code class="function">cairo_surface_set_device_offset()</code></a>.
|
756
|
+
</p>
|
757
|
+
<div class="variablelist"><table border="0">
|
758
|
+
<col align="left" valign="top">
|
759
|
+
<tbody>
|
760
|
+
<tr>
|
761
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
762
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
763
|
+
</td>
|
764
|
+
</tr>
|
765
|
+
<tr>
|
766
|
+
<td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
|
767
|
+
<td>the offset in the X direction, in device units
|
768
|
+
</td>
|
769
|
+
</tr>
|
770
|
+
<tr>
|
771
|
+
<td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
|
772
|
+
<td>the offset in the Y direction, in device units
|
773
|
+
</td>
|
774
|
+
</tr>
|
775
|
+
</tbody>
|
776
|
+
</table></div>
|
777
|
+
<p class="since">Since 1.2</p>
|
778
|
+
</div>
|
779
|
+
<hr>
|
780
|
+
<div class="refsect2" title="cairo_surface_set_fallback_resolution ()">
|
781
|
+
<a name="cairo-surface-set-fallback-resolution"></a><h3>cairo_surface_set_fallback_resolution ()</h3>
|
782
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_set_fallback_resolution
|
783
|
+
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
784
|
+
<em class="parameter"><code><span class="type">double</span> x_pixels_per_inch</code></em>,
|
785
|
+
<em class="parameter"><code><span class="type">double</span> y_pixels_per_inch</code></em>);</pre>
|
786
|
+
<p>
|
787
|
+
Set the horizontal and vertical resolution for image fallbacks.
|
788
|
+
</p>
|
789
|
+
<p>
|
790
|
+
When certain operations aren't supported natively by a backend,
|
791
|
+
cairo will fallback by rendering operations to an image and then
|
792
|
+
overlaying that image onto the output. For backends that are
|
793
|
+
natively vector-oriented, this function can be used to set the
|
794
|
+
resolution used for these image fallbacks, (larger values will
|
795
|
+
result in more detailed images, but also larger file sizes).
|
796
|
+
</p>
|
797
|
+
<p>
|
798
|
+
Some examples of natively vector-oriented backends are the ps, pdf,
|
799
|
+
and svg backends.
|
800
|
+
</p>
|
801
|
+
<p>
|
802
|
+
For backends that are natively raster-oriented, image fallbacks are
|
803
|
+
still possible, but they are always performed at the native
|
804
|
+
device resolution. So this function has no effect on those
|
805
|
+
backends.
|
806
|
+
</p>
|
807
|
+
<p>
|
808
|
+
Note: The fallback resolution only takes effect at the time of
|
809
|
+
completing a page (with <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a>) so
|
810
|
+
there is currently no way to have more than one fallback resolution
|
811
|
+
in effect on a single page.
|
812
|
+
</p>
|
813
|
+
<p>
|
814
|
+
The default fallback resoultion is 300 pixels per inch in both
|
815
|
+
dimensions.
|
816
|
+
</p>
|
817
|
+
<div class="variablelist"><table border="0">
|
818
|
+
<col align="left" valign="top">
|
819
|
+
<tbody>
|
820
|
+
<tr>
|
821
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
822
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
823
|
+
</td>
|
824
|
+
</tr>
|
825
|
+
<tr>
|
826
|
+
<td><p><span class="term"><em class="parameter"><code>x_pixels_per_inch</code></em> :</span></p></td>
|
827
|
+
<td>horizontal setting for pixels per inch
|
828
|
+
</td>
|
829
|
+
</tr>
|
830
|
+
<tr>
|
831
|
+
<td><p><span class="term"><em class="parameter"><code>y_pixels_per_inch</code></em> :</span></p></td>
|
832
|
+
<td>vertical setting for pixels per inch
|
833
|
+
</td>
|
834
|
+
</tr>
|
835
|
+
</tbody>
|
836
|
+
</table></div>
|
837
|
+
<p class="since">Since 1.2</p>
|
838
|
+
</div>
|
839
|
+
<hr>
|
840
|
+
<div class="refsect2" title="cairo_surface_get_fallback_resolution ()">
|
841
|
+
<a name="cairo-surface-get-fallback-resolution"></a><h3>cairo_surface_get_fallback_resolution ()</h3>
|
842
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_get_fallback_resolution
|
843
|
+
(<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
844
|
+
<em class="parameter"><code><span class="type">double</span> *x_pixels_per_inch</code></em>,
|
845
|
+
<em class="parameter"><code><span class="type">double</span> *y_pixels_per_inch</code></em>);</pre>
|
846
|
+
<p>
|
847
|
+
This function returns the previous fallback resolution set by
|
848
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-set-fallback-resolution" title="cairo_surface_set_fallback_resolution ()"><code class="function">cairo_surface_set_fallback_resolution()</code></a>, or default fallback
|
849
|
+
resolution if never set.
|
850
|
+
</p>
|
851
|
+
<div class="variablelist"><table border="0">
|
852
|
+
<col align="left" valign="top">
|
853
|
+
<tbody>
|
854
|
+
<tr>
|
855
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
856
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
857
|
+
</td>
|
858
|
+
</tr>
|
859
|
+
<tr>
|
860
|
+
<td><p><span class="term"><em class="parameter"><code>x_pixels_per_inch</code></em> :</span></p></td>
|
861
|
+
<td>horizontal pixels per inch
|
862
|
+
</td>
|
863
|
+
</tr>
|
864
|
+
<tr>
|
865
|
+
<td><p><span class="term"><em class="parameter"><code>y_pixels_per_inch</code></em> :</span></p></td>
|
866
|
+
<td>vertical pixels per inch
|
867
|
+
</td>
|
868
|
+
</tr>
|
869
|
+
</tbody>
|
870
|
+
</table></div>
|
871
|
+
<p class="since">Since 1.8</p>
|
872
|
+
</div>
|
873
|
+
<hr>
|
874
|
+
<div class="refsect2" title="enum cairo_surface_type_t">
|
875
|
+
<a name="cairo-surface-type-t"></a><h3>enum cairo_surface_type_t</h3>
|
876
|
+
<pre class="programlisting">typedef enum _cairo_surface_type {
|
877
|
+
CAIRO_SURFACE_TYPE_IMAGE,
|
878
|
+
CAIRO_SURFACE_TYPE_PDF,
|
879
|
+
CAIRO_SURFACE_TYPE_PS,
|
880
|
+
CAIRO_SURFACE_TYPE_XLIB,
|
881
|
+
CAIRO_SURFACE_TYPE_XCB,
|
882
|
+
CAIRO_SURFACE_TYPE_GLITZ,
|
883
|
+
CAIRO_SURFACE_TYPE_QUARTZ,
|
884
|
+
CAIRO_SURFACE_TYPE_WIN32,
|
885
|
+
CAIRO_SURFACE_TYPE_BEOS,
|
886
|
+
CAIRO_SURFACE_TYPE_DIRECTFB,
|
887
|
+
CAIRO_SURFACE_TYPE_SVG,
|
888
|
+
CAIRO_SURFACE_TYPE_OS2,
|
889
|
+
CAIRO_SURFACE_TYPE_WIN32_PRINTING,
|
890
|
+
CAIRO_SURFACE_TYPE_QUARTZ_IMAGE,
|
891
|
+
CAIRO_SURFACE_TYPE_SCRIPT,
|
892
|
+
CAIRO_SURFACE_TYPE_QT,
|
893
|
+
CAIRO_SURFACE_TYPE_RECORDING,
|
894
|
+
CAIRO_SURFACE_TYPE_VG,
|
895
|
+
CAIRO_SURFACE_TYPE_GL,
|
896
|
+
CAIRO_SURFACE_TYPE_DRM,
|
897
|
+
CAIRO_SURFACE_TYPE_TEE,
|
898
|
+
CAIRO_SURFACE_TYPE_XML,
|
899
|
+
CAIRO_SURFACE_TYPE_SKIA,
|
900
|
+
CAIRO_SURFACE_TYPE_SUBSURFACE
|
901
|
+
} cairo_surface_type_t;
|
902
|
+
</pre>
|
903
|
+
<p>
|
904
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t" title="enum cairo_surface_type_t"><span class="type">cairo_surface_type_t</span></a> is used to describe the type of a given
|
905
|
+
surface. The surface types are also known as "backends" or "surface
|
906
|
+
backends" within cairo.
|
907
|
+
</p>
|
908
|
+
<p>
|
909
|
+
The type of a surface is determined by the function used to create
|
910
|
+
it, which will generally be of the form cairo_<span class="emphasis"><em>type</em></span><code class="function">_surface_create()</code>,
|
911
|
+
(though see <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-similar" title="cairo_surface_create_similar ()"><code class="function">cairo_surface_create_similar()</code></a> as well).
|
912
|
+
</p>
|
913
|
+
<p>
|
914
|
+
The surface type can be queried with <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-get-type" title="cairo_surface_get_type ()"><code class="function">cairo_surface_get_type()</code></a>
|
915
|
+
</p>
|
916
|
+
<p>
|
917
|
+
The various <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> functions can be used with surfaces of
|
918
|
+
any type, but some backends also provide type-specific functions
|
919
|
+
that must only be called with a surface of the appropriate
|
920
|
+
type. These functions have names that begin with
|
921
|
+
cairo_<span class="emphasis"><em>type</em></span>_surface such as <a class="link" href="cairo-Image-Surfaces.html#cairo-image-surface-get-width" title="cairo_image_surface_get_width ()"><code class="function">cairo_image_surface_get_width()</code></a>.
|
922
|
+
</p>
|
923
|
+
<p>
|
924
|
+
The behavior of calling a type-specific function with a surface of
|
925
|
+
the wrong type is undefined.
|
926
|
+
</p>
|
927
|
+
<p>
|
928
|
+
New entries may be added in future versions.
|
929
|
+
</p>
|
930
|
+
<div class="variablelist"><table border="0">
|
931
|
+
<col align="left" valign="top">
|
932
|
+
<tbody>
|
933
|
+
<tr>
|
934
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-IMAGE:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_IMAGE</code></span></p></td>
|
935
|
+
<td>The surface is of type image
|
936
|
+
</td>
|
937
|
+
</tr>
|
938
|
+
<tr>
|
939
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-PDF:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_PDF</code></span></p></td>
|
940
|
+
<td>The surface is of type pdf
|
941
|
+
</td>
|
942
|
+
</tr>
|
943
|
+
<tr>
|
944
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-PS:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_PS</code></span></p></td>
|
945
|
+
<td>The surface is of type ps
|
946
|
+
</td>
|
947
|
+
</tr>
|
948
|
+
<tr>
|
949
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-XLIB:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_XLIB</code></span></p></td>
|
950
|
+
<td>The surface is of type xlib
|
951
|
+
</td>
|
952
|
+
</tr>
|
953
|
+
<tr>
|
954
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-XCB:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_XCB</code></span></p></td>
|
955
|
+
<td>The surface is of type xcb
|
956
|
+
</td>
|
957
|
+
</tr>
|
958
|
+
<tr>
|
959
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-GLITZ:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_GLITZ</code></span></p></td>
|
960
|
+
<td>The surface is of type glitz
|
961
|
+
</td>
|
962
|
+
</tr>
|
963
|
+
<tr>
|
964
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-QUARTZ:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_QUARTZ</code></span></p></td>
|
965
|
+
<td>The surface is of type quartz
|
966
|
+
</td>
|
967
|
+
</tr>
|
968
|
+
<tr>
|
969
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-WIN32:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_WIN32</code></span></p></td>
|
970
|
+
<td>The surface is of type win32
|
971
|
+
</td>
|
972
|
+
</tr>
|
973
|
+
<tr>
|
974
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-BEOS:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_BEOS</code></span></p></td>
|
975
|
+
<td>The surface is of type beos
|
976
|
+
</td>
|
977
|
+
</tr>
|
978
|
+
<tr>
|
979
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-DIRECTFB:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_DIRECTFB</code></span></p></td>
|
980
|
+
<td>The surface is of type directfb
|
981
|
+
</td>
|
982
|
+
</tr>
|
983
|
+
<tr>
|
984
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-SVG:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_SVG</code></span></p></td>
|
985
|
+
<td>The surface is of type svg
|
986
|
+
</td>
|
987
|
+
</tr>
|
988
|
+
<tr>
|
989
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-OS2:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_OS2</code></span></p></td>
|
990
|
+
<td>The surface is of type os2
|
991
|
+
</td>
|
992
|
+
</tr>
|
993
|
+
<tr>
|
994
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-WIN32-PRINTING:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_WIN32_PRINTING</code></span></p></td>
|
995
|
+
<td>The surface is a win32 printing surface
|
996
|
+
</td>
|
997
|
+
</tr>
|
998
|
+
<tr>
|
999
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-QUARTZ-IMAGE:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_QUARTZ_IMAGE</code></span></p></td>
|
1000
|
+
<td>The surface is of type quartz_image
|
1001
|
+
</td>
|
1002
|
+
</tr>
|
1003
|
+
<tr>
|
1004
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-SCRIPT:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_SCRIPT</code></span></p></td>
|
1005
|
+
<td>The surface is of type script, since 1.10
|
1006
|
+
</td>
|
1007
|
+
</tr>
|
1008
|
+
<tr>
|
1009
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-QT:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_QT</code></span></p></td>
|
1010
|
+
<td>The surface is of type Qt, since 1.10
|
1011
|
+
</td>
|
1012
|
+
</tr>
|
1013
|
+
<tr>
|
1014
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-RECORDING:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_RECORDING</code></span></p></td>
|
1015
|
+
<td>The surface is of type recording, since 1.10
|
1016
|
+
</td>
|
1017
|
+
</tr>
|
1018
|
+
<tr>
|
1019
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-VG:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_VG</code></span></p></td>
|
1020
|
+
<td>The surface is a OpenVG surface, since 1.10
|
1021
|
+
</td>
|
1022
|
+
</tr>
|
1023
|
+
<tr>
|
1024
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-GL:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_GL</code></span></p></td>
|
1025
|
+
<td>The surface is of type OpenGL, since 1.10
|
1026
|
+
</td>
|
1027
|
+
</tr>
|
1028
|
+
<tr>
|
1029
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-DRM:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_DRM</code></span></p></td>
|
1030
|
+
<td>The surface is of type Direct Render Manager, since 1.10
|
1031
|
+
</td>
|
1032
|
+
</tr>
|
1033
|
+
<tr>
|
1034
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-TEE:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_TEE</code></span></p></td>
|
1035
|
+
<td>The surface is of type 'tee' (a multiplexing surface), since 1.10
|
1036
|
+
</td>
|
1037
|
+
</tr>
|
1038
|
+
<tr>
|
1039
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-XML:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_XML</code></span></p></td>
|
1040
|
+
<td>The surface is of type XML (for debugging), since 1.10
|
1041
|
+
</td>
|
1042
|
+
</tr>
|
1043
|
+
<tr>
|
1044
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-SKIA:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_SKIA</code></span></p></td>
|
1045
|
+
<td>The surface is of type Skia, since 1.10
|
1046
|
+
</td>
|
1047
|
+
</tr>
|
1048
|
+
<tr>
|
1049
|
+
<td><p><a name="CAIRO-SURFACE-TYPE-SUBSURFACE:CAPS"></a><span class="term"><code class="literal">CAIRO_SURFACE_TYPE_SUBSURFACE</code></span></p></td>
|
1050
|
+
<td>The surface is a subsurface created with
|
1051
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-create-for-rectangle" title="cairo_surface_create_for_rectangle ()"><code class="function">cairo_surface_create_for_rectangle()</code></a>, since 1.10
|
1052
|
+
</td>
|
1053
|
+
</tr>
|
1054
|
+
</tbody>
|
1055
|
+
</table></div>
|
1056
|
+
<p class="since">Since 1.2</p>
|
1057
|
+
</div>
|
1058
|
+
<hr>
|
1059
|
+
<div class="refsect2" title="cairo_surface_get_type ()">
|
1060
|
+
<a name="cairo-surface-get-type"></a><h3>cairo_surface_get_type ()</h3>
|
1061
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t" title="enum cairo_surface_type_t"><span class="returnvalue">cairo_surface_type_t</span></a> cairo_surface_get_type (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
1062
|
+
<p>
|
1063
|
+
This function returns the type of the backend used to create
|
1064
|
+
a surface. See <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t" title="enum cairo_surface_type_t"><span class="type">cairo_surface_type_t</span></a> for available types.
|
1065
|
+
</p>
|
1066
|
+
<div class="variablelist"><table border="0">
|
1067
|
+
<col align="left" valign="top">
|
1068
|
+
<tbody>
|
1069
|
+
<tr>
|
1070
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1071
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1072
|
+
</td>
|
1073
|
+
</tr>
|
1074
|
+
<tr>
|
1075
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1076
|
+
<td> The type of <em class="parameter"><code>surface</code></em>.
|
1077
|
+
|
1078
|
+
</td>
|
1079
|
+
</tr>
|
1080
|
+
</tbody>
|
1081
|
+
</table></div>
|
1082
|
+
<p class="since">Since 1.2</p>
|
1083
|
+
</div>
|
1084
|
+
<hr>
|
1085
|
+
<div class="refsect2" title="cairo_surface_get_reference_count ()">
|
1086
|
+
<a name="cairo-surface-get-reference-count"></a><h3>cairo_surface_get_reference_count ()</h3>
|
1087
|
+
<pre class="programlisting">unsigned <span class="returnvalue">int</span> cairo_surface_get_reference_count (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
1088
|
+
<p>
|
1089
|
+
Returns the current reference count of <em class="parameter"><code>surface</code></em>.
|
1090
|
+
</p>
|
1091
|
+
<div class="variablelist"><table border="0">
|
1092
|
+
<col align="left" valign="top">
|
1093
|
+
<tbody>
|
1094
|
+
<tr>
|
1095
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1096
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1097
|
+
</td>
|
1098
|
+
</tr>
|
1099
|
+
<tr>
|
1100
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1101
|
+
<td> the current reference count of <em class="parameter"><code>surface</code></em>. If the
|
1102
|
+
object is a nil object, 0 will be returned.
|
1103
|
+
|
1104
|
+
</td>
|
1105
|
+
</tr>
|
1106
|
+
</tbody>
|
1107
|
+
</table></div>
|
1108
|
+
<p class="since">Since 1.4</p>
|
1109
|
+
</div>
|
1110
|
+
<hr>
|
1111
|
+
<div class="refsect2" title="cairo_surface_set_user_data ()">
|
1112
|
+
<a name="cairo-surface-set-user-data"></a><h3>cairo_surface_set_user_data ()</h3>
|
1113
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> cairo_surface_set_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
1114
|
+
<em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>,
|
1115
|
+
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
|
1116
|
+
<em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>);</pre>
|
1117
|
+
<p>
|
1118
|
+
Attach user data to <em class="parameter"><code>surface</code></em>. To remove user data from a surface,
|
1119
|
+
call this function with the key that was used to set it and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
|
1120
|
+
for <em class="parameter"><code>data</code></em>.
|
1121
|
+
</p>
|
1122
|
+
<div class="variablelist"><table border="0">
|
1123
|
+
<col align="left" valign="top">
|
1124
|
+
<tbody>
|
1125
|
+
<tr>
|
1126
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1127
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1128
|
+
</td>
|
1129
|
+
</tr>
|
1130
|
+
<tr>
|
1131
|
+
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
|
1132
|
+
<td>the address of a <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
|
1133
|
+
</td>
|
1134
|
+
</tr>
|
1135
|
+
<tr>
|
1136
|
+
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
1137
|
+
<td>the user data to attach to the surface
|
1138
|
+
</td>
|
1139
|
+
</tr>
|
1140
|
+
<tr>
|
1141
|
+
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
|
1142
|
+
<td>a <a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
|
1143
|
+
surface is destroyed or when new user data is attached using the
|
1144
|
+
same key.
|
1145
|
+
</td>
|
1146
|
+
</tr>
|
1147
|
+
<tr>
|
1148
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1149
|
+
<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
|
1150
|
+
slot could not be allocated for the user data.
|
1151
|
+
</td>
|
1152
|
+
</tr>
|
1153
|
+
</tbody>
|
1154
|
+
</table></div>
|
1155
|
+
</div>
|
1156
|
+
<hr>
|
1157
|
+
<div class="refsect2" title="cairo_surface_get_user_data ()">
|
1158
|
+
<a name="cairo-surface-get-user-data"></a><h3>cairo_surface_get_user_data ()</h3>
|
1159
|
+
<pre class="programlisting"><span class="returnvalue">void</span> * cairo_surface_get_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
1160
|
+
<em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>);</pre>
|
1161
|
+
<p>
|
1162
|
+
Return user data previously attached to <em class="parameter"><code>surface</code></em> using the specified
|
1163
|
+
key. If no user data has been attached with the given key this
|
1164
|
+
function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
|
1165
|
+
</p>
|
1166
|
+
<div class="variablelist"><table border="0">
|
1167
|
+
<col align="left" valign="top">
|
1168
|
+
<tbody>
|
1169
|
+
<tr>
|
1170
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1171
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1172
|
+
</td>
|
1173
|
+
</tr>
|
1174
|
+
<tr>
|
1175
|
+
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
|
1176
|
+
<td>the address of the <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> the user data was
|
1177
|
+
attached to
|
1178
|
+
</td>
|
1179
|
+
</tr>
|
1180
|
+
<tr>
|
1181
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1182
|
+
<td> the user data previously attached or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
|
1183
|
+
</td>
|
1184
|
+
</tr>
|
1185
|
+
</tbody>
|
1186
|
+
</table></div>
|
1187
|
+
</div>
|
1188
|
+
<hr>
|
1189
|
+
<div class="refsect2" title="cairo_surface_copy_page ()">
|
1190
|
+
<a name="cairo-surface-copy-page"></a><h3>cairo_surface_copy_page ()</h3>
|
1191
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_copy_page (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
1192
|
+
<p>
|
1193
|
+
Emits the current page for backends that support multiple pages,
|
1194
|
+
but doesn't clear it, so that the contents of the current page will
|
1195
|
+
be retained for the next page. Use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-show-page" title="cairo_surface_show_page ()"><code class="function">cairo_surface_show_page()</code></a> if you
|
1196
|
+
want to get an empty page after the emission.
|
1197
|
+
</p>
|
1198
|
+
<p>
|
1199
|
+
There is a convenience function for this that takes a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>,
|
1200
|
+
namely <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a>.
|
1201
|
+
</p>
|
1202
|
+
<div class="variablelist"><table border="0">
|
1203
|
+
<col align="left" valign="top">
|
1204
|
+
<tbody><tr>
|
1205
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1206
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1207
|
+
</td>
|
1208
|
+
</tr></tbody>
|
1209
|
+
</table></div>
|
1210
|
+
<p class="since">Since 1.6</p>
|
1211
|
+
</div>
|
1212
|
+
<hr>
|
1213
|
+
<div class="refsect2" title="cairo_surface_show_page ()">
|
1214
|
+
<a name="cairo-surface-show-page"></a><h3>cairo_surface_show_page ()</h3>
|
1215
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_show_page (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
1216
|
+
<p>
|
1217
|
+
Emits and clears the current page for backends that support multiple
|
1218
|
+
pages. Use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-copy-page" title="cairo_surface_copy_page ()"><code class="function">cairo_surface_copy_page()</code></a> if you don't want to clear the page.
|
1219
|
+
</p>
|
1220
|
+
<p>
|
1221
|
+
There is a convenience function for this that takes a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>,
|
1222
|
+
namely <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a>.
|
1223
|
+
</p>
|
1224
|
+
<div class="variablelist"><table border="0">
|
1225
|
+
<col align="left" valign="top">
|
1226
|
+
<tbody><tr>
|
1227
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1228
|
+
<td>a <span class="type">cairo_Surface_t</span>
|
1229
|
+
</td>
|
1230
|
+
</tr></tbody>
|
1231
|
+
</table></div>
|
1232
|
+
<p class="since">Since 1.6</p>
|
1233
|
+
</div>
|
1234
|
+
<hr>
|
1235
|
+
<div class="refsect2" title="cairo_surface_has_show_text_glyphs ()">
|
1236
|
+
<a name="cairo-surface-has-show-text-glyphs"></a><h3>cairo_surface_has_show_text_glyphs ()</h3>
|
1237
|
+
<pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t" title="cairo_bool_t"><span class="returnvalue">cairo_bool_t</span></a> cairo_surface_has_show_text_glyphs (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre>
|
1238
|
+
<p>
|
1239
|
+
Returns whether the surface supports
|
1240
|
+
sophisticated <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a> operations. That is,
|
1241
|
+
whether it actually uses the provided text and cluster data
|
1242
|
+
to a <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a> call.
|
1243
|
+
</p>
|
1244
|
+
<p>
|
1245
|
+
Note: Even if this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, a
|
1246
|
+
<a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a> operation targeted at <em class="parameter"><code>surface</code></em> will
|
1247
|
+
still succeed. It just will
|
1248
|
+
act like a <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a> operation. Users can use this
|
1249
|
+
function to avoid computing UTF-8 text and cluster mapping if the
|
1250
|
+
target surface does not use it.
|
1251
|
+
</p>
|
1252
|
+
<div class="variablelist"><table border="0">
|
1253
|
+
<col align="left" valign="top">
|
1254
|
+
<tbody>
|
1255
|
+
<tr>
|
1256
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1257
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1258
|
+
</td>
|
1259
|
+
</tr>
|
1260
|
+
<tr>
|
1261
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1262
|
+
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>surface</code></em> supports
|
1263
|
+
<a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
|
1264
|
+
|
1265
|
+
</td>
|
1266
|
+
</tr>
|
1267
|
+
</tbody>
|
1268
|
+
</table></div>
|
1269
|
+
<p class="since">Since 1.8</p>
|
1270
|
+
</div>
|
1271
|
+
<hr>
|
1272
|
+
<div class="refsect2" title="cairo_surface_set_mime_data ()">
|
1273
|
+
<a name="cairo-surface-set-mime-data"></a><h3>cairo_surface_set_mime_data ()</h3>
|
1274
|
+
<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> cairo_surface_set_mime_data (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
1275
|
+
<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
|
1276
|
+
<em class="parameter"><code>unsigned <span class="type">char</span> *data</code></em>,
|
1277
|
+
<em class="parameter"><code><span class="type">unsigned long </span> length</code></em>,
|
1278
|
+
<em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>,
|
1279
|
+
<em class="parameter"><code><span class="type">void</span> *closure</code></em>);</pre>
|
1280
|
+
<p>
|
1281
|
+
Attach an image in the format <em class="parameter"><code>mime_type</code></em> to <em class="parameter"><code>surface</code></em>. To remove
|
1282
|
+
the data from a surface, call this function with same mime type
|
1283
|
+
and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for <em class="parameter"><code>data</code></em>.
|
1284
|
+
</p>
|
1285
|
+
<p>
|
1286
|
+
The attached image (or filename) data can later be used by backends
|
1287
|
+
which support it (currently: PDF, PS, SVG and Win32 Printing
|
1288
|
+
surfaces) to emit this data instead of making a snapshot of the
|
1289
|
+
<em class="parameter"><code>surface</code></em>. This approach tends to be faster and requires less
|
1290
|
+
memory and disk space.
|
1291
|
+
</p>
|
1292
|
+
<p>
|
1293
|
+
The recognized MIME types are the following: <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JPEG:CAPS" title="CAIRO_MIME_TYPE_JPEG"><code class="literal">CAIRO_MIME_TYPE_JPEG</code></a>,
|
1294
|
+
<a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-PNG:CAPS" title="CAIRO_MIME_TYPE_PNG"><code class="literal">CAIRO_MIME_TYPE_PNG</code></a>, <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JP2:CAPS" title="CAIRO_MIME_TYPE_JP2"><code class="literal">CAIRO_MIME_TYPE_JP2</code></a>, <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-URI:CAPS" title="CAIRO_MIME_TYPE_URI"><code class="literal">CAIRO_MIME_TYPE_URI</code></a>.
|
1295
|
+
</p>
|
1296
|
+
<p>
|
1297
|
+
See corresponding backend surface docs for details about which MIME
|
1298
|
+
types it can handle. Caution: the associated MIME data will be
|
1299
|
+
discarded if you draw on the surface afterwards. Use this function
|
1300
|
+
with care.
|
1301
|
+
</p>
|
1302
|
+
<div class="variablelist"><table border="0">
|
1303
|
+
<col align="left" valign="top">
|
1304
|
+
<tbody>
|
1305
|
+
<tr>
|
1306
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1307
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1308
|
+
</td>
|
1309
|
+
</tr>
|
1310
|
+
<tr>
|
1311
|
+
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
|
1312
|
+
<td>the MIME type of the image data
|
1313
|
+
</td>
|
1314
|
+
</tr>
|
1315
|
+
<tr>
|
1316
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
1317
|
+
<td>the image data to attach to the surface
|
1318
|
+
</td>
|
1319
|
+
</tr>
|
1320
|
+
<tr>
|
1321
|
+
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
|
1322
|
+
<td>the length of the image data
|
1323
|
+
</td>
|
1324
|
+
</tr>
|
1325
|
+
<tr>
|
1326
|
+
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
|
1327
|
+
<td>a <a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
|
1328
|
+
surface is destroyed or when new image data is attached using the
|
1329
|
+
same mime type.
|
1330
|
+
</td>
|
1331
|
+
</tr>
|
1332
|
+
<tr>
|
1333
|
+
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
|
1334
|
+
<td>the data to be passed to the <em class="parameter"><code>destroy</code></em> notifier
|
1335
|
+
</td>
|
1336
|
+
</tr>
|
1337
|
+
<tr>
|
1338
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1339
|
+
<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
|
1340
|
+
slot could not be allocated for the user data.
|
1341
|
+
</td>
|
1342
|
+
</tr>
|
1343
|
+
</tbody>
|
1344
|
+
</table></div>
|
1345
|
+
<p class="since">Since 1.10</p>
|
1346
|
+
</div>
|
1347
|
+
<hr>
|
1348
|
+
<div class="refsect2" title="cairo_surface_get_mime_data ()">
|
1349
|
+
<a name="cairo-surface-get-mime-data"></a><h3>cairo_surface_get_mime_data ()</h3>
|
1350
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_surface_get_mime_data (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
|
1351
|
+
<em class="parameter"><code>const <span class="type">char</span> *mime_type</code></em>,
|
1352
|
+
<em class="parameter"><code>unsigned <span class="type">char</span> **data</code></em>,
|
1353
|
+
<em class="parameter"><code>unsigned <span class="type">long</span> *length</code></em>);</pre>
|
1354
|
+
<p>
|
1355
|
+
Return mime data previously attached to <em class="parameter"><code>surface</code></em> using the
|
1356
|
+
specified mime type. If no data has been attached with the given
|
1357
|
+
mime type, <em class="parameter"><code>data</code></em> is set <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
|
1358
|
+
</p>
|
1359
|
+
<div class="variablelist"><table border="0">
|
1360
|
+
<col align="left" valign="top">
|
1361
|
+
<tbody>
|
1362
|
+
<tr>
|
1363
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
1364
|
+
<td>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
1365
|
+
</td>
|
1366
|
+
</tr>
|
1367
|
+
<tr>
|
1368
|
+
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
|
1369
|
+
<td>the mime type of the image data
|
1370
|
+
</td>
|
1371
|
+
</tr>
|
1372
|
+
<tr>
|
1373
|
+
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
|
1374
|
+
<td>the image data to attached to the surface
|
1375
|
+
</td>
|
1376
|
+
</tr>
|
1377
|
+
<tr>
|
1378
|
+
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
|
1379
|
+
<td>the length of the image data
|
1380
|
+
</td>
|
1381
|
+
</tr>
|
1382
|
+
</tbody>
|
1383
|
+
</table></div>
|
1384
|
+
<p class="since">Since 1.10</p>
|
1385
|
+
</div>
|
1386
|
+
</div>
|
1387
|
+
<div class="refsect1" title="See Also">
|
1388
|
+
<a name="cairo-cairo-surface-t.see-also"></a><h2>See Also</h2>
|
1389
|
+
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
|
1390
|
+
</div>
|
1391
|
+
</div>
|
1392
|
+
<div class="footer">
|
1393
|
+
<hr>
|
1394
|
+
Generated by GTK-Doc V1.15</div>
|
1395
|
+
</body>
|
1396
|
+
</html>
|