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,2743 @@
|
|
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_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-drawing.html" title="Drawing">
|
9
|
+
<link rel="prev" href="cairo-drawing.html" title="Drawing">
|
10
|
+
<link rel="next" href="cairo-Paths.html" title="Paths">
|
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-drawing.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
18
|
+
<td><a accesskey="u" href="cairo-drawing.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-Paths.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-t.synopsis" class="shortcut">Top</a>
|
25
|
+
|
|
26
|
+
<a href="#cairo-cairo-t.description" class="shortcut">Description</a>
|
27
|
+
</td></tr>
|
28
|
+
</table>
|
29
|
+
<div class="refentry" title="cairo_t">
|
30
|
+
<a name="cairo-cairo-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-t.top_of_page"></a>cairo_t</span></h2>
|
34
|
+
<p>cairo_t — The cairo drawing context</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-t.synopsis"></a><h2>Synopsis</h2>
|
40
|
+
<pre class="synopsis">typedef <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t">cairo_t</a>;
|
41
|
+
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> * <a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()">cairo_create</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>);
|
42
|
+
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> * <a class="link" href="cairo-cairo-t.html#cairo-reference" title="cairo_reference ()">cairo_reference</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
43
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()">cairo_destroy</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
44
|
+
<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-t.html#cairo-status" title="cairo_status ()">cairo_status</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
45
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()">cairo_save</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
46
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()">cairo_restore</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
47
|
+
<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-t.html#cairo-get-target" title="cairo_get_target ()">cairo_get_target</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
48
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()">cairo_push_group</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
49
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()">cairo_push_group_with_content</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
50
|
+
<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>);
|
51
|
+
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()">cairo_pop_group</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
52
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()">cairo_pop_group_to_source</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
53
|
+
<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-t.html#cairo-get-group-target" title="cairo_get_group_target ()">cairo_get_group_target</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
54
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()">cairo_set_source_rgb</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
55
|
+
<em class="parameter"><code><span class="type">double</span> red</code></em>,
|
56
|
+
<em class="parameter"><code><span class="type">double</span> green</code></em>,
|
57
|
+
<em class="parameter"><code><span class="type">double</span> blue</code></em>);
|
58
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba" title="cairo_set_source_rgba ()">cairo_set_source_rgba</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
59
|
+
<em class="parameter"><code><span class="type">double</span> red</code></em>,
|
60
|
+
<em class="parameter"><code><span class="type">double</span> green</code></em>,
|
61
|
+
<em class="parameter"><code><span class="type">double</span> blue</code></em>,
|
62
|
+
<em class="parameter"><code><span class="type">double</span> alpha</code></em>);
|
63
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()">cairo_set_source</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
64
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *source</code></em>);
|
65
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-source-surface" title="cairo_set_source_surface ()">cairo_set_source_surface</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
66
|
+
<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>,
|
67
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
68
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);
|
69
|
+
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * <a class="link" href="cairo-cairo-t.html#cairo-get-source" title="cairo_get_source ()">cairo_get_source</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
70
|
+
enum <a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t">cairo_antialias_t</a>;
|
71
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-antialias" title="cairo_set_antialias ()">cairo_set_antialias</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
72
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="type">cairo_antialias_t</span></a> antialias</code></em>);
|
73
|
+
<a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="returnvalue">cairo_antialias_t</span></a> <a class="link" href="cairo-cairo-t.html#cairo-get-antialias" title="cairo_get_antialias ()">cairo_get_antialias</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
74
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()">cairo_set_dash</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
75
|
+
<em class="parameter"><code>const <span class="type">double</span> *dashes</code></em>,
|
76
|
+
<em class="parameter"><code><span class="type">int</span> num_dashes</code></em>,
|
77
|
+
<em class="parameter"><code><span class="type">double</span> offset</code></em>);
|
78
|
+
<span class="returnvalue">int</span> <a class="link" href="cairo-cairo-t.html#cairo-get-dash-count" title="cairo_get_dash_count ()">cairo_get_dash_count</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
79
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-get-dash" title="cairo_get_dash ()">cairo_get_dash</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
80
|
+
<em class="parameter"><code><span class="type">double</span> *dashes</code></em>,
|
81
|
+
<em class="parameter"><code><span class="type">double</span> *offset</code></em>);
|
82
|
+
enum <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t">cairo_fill_rule_t</a>;
|
83
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()">cairo_set_fill_rule</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
84
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> fill_rule</code></em>);
|
85
|
+
<a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="returnvalue">cairo_fill_rule_t</span></a> <a class="link" href="cairo-cairo-t.html#cairo-get-fill-rule" title="cairo_get_fill_rule ()">cairo_get_fill_rule</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
86
|
+
enum <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t">cairo_line_cap_t</a>;
|
87
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()">cairo_set_line_cap</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
88
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> line_cap</code></em>);
|
89
|
+
<a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="returnvalue">cairo_line_cap_t</span></a> <a class="link" href="cairo-cairo-t.html#cairo-get-line-cap" title="cairo_get_line_cap ()">cairo_get_line_cap</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
90
|
+
enum <a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t">cairo_line_join_t</a>;
|
91
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()">cairo_set_line_join</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
92
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> line_join</code></em>);
|
93
|
+
<a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="returnvalue">cairo_line_join_t</span></a> <a class="link" href="cairo-cairo-t.html#cairo-get-line-join" title="cairo_get_line_join ()">cairo_get_line_join</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
94
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()">cairo_set_line_width</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
95
|
+
<em class="parameter"><code><span class="type">double</span> width</code></em>);
|
96
|
+
<span class="returnvalue">double</span> <a class="link" href="cairo-cairo-t.html#cairo-get-line-width" title="cairo_get_line_width ()">cairo_get_line_width</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
97
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()">cairo_set_miter_limit</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
98
|
+
<em class="parameter"><code><span class="type">double</span> limit</code></em>);
|
99
|
+
<span class="returnvalue">double</span> <a class="link" href="cairo-cairo-t.html#cairo-get-miter-limit" title="cairo_get_miter_limit ()">cairo_get_miter_limit</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
100
|
+
enum <a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t">cairo_operator_t</a>;
|
101
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-operator" title="cairo_set_operator ()">cairo_set_operator</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
102
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> op</code></em>);
|
103
|
+
<a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="returnvalue">cairo_operator_t</span></a> <a class="link" href="cairo-cairo-t.html#cairo-get-operator" title="cairo_get_operator ()">cairo_get_operator</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
104
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance" title="cairo_set_tolerance ()">cairo_set_tolerance</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
105
|
+
<em class="parameter"><code><span class="type">double</span> tolerance</code></em>);
|
106
|
+
<span class="returnvalue">double</span> <a class="link" href="cairo-cairo-t.html#cairo-get-tolerance" title="cairo_get_tolerance ()">cairo_get_tolerance</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
107
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()">cairo_clip</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
108
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()">cairo_clip_preserve</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
109
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-clip-extents" title="cairo_clip_extents ()">cairo_clip_extents</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
110
|
+
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
|
111
|
+
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
|
112
|
+
<em class="parameter"><code><span class="type">double</span> *x2</code></em>,
|
113
|
+
<em class="parameter"><code><span class="type">double</span> *y2</code></em>);
|
114
|
+
<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-t.html#cairo-in-clip" title="cairo_in_clip ()">cairo_in_clip</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
115
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
116
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);
|
117
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()">cairo_reset_clip</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
118
|
+
<a class="link" href="cairo-cairo-t.html#cairo-rectangle-t" title="cairo_rectangle_t">cairo_rectangle_t</a>;
|
119
|
+
<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t">cairo_rectangle_list_t</a>;
|
120
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-destroy" title="cairo_rectangle_list_destroy ()">cairo_rectangle_list_destroy</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="type">cairo_rectangle_list_t</span></a> *rectangle_list</code></em>);
|
121
|
+
<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="returnvalue">cairo_rectangle_list_t</span></a> * <a class="link" href="cairo-cairo-t.html#cairo-copy-clip-rectangle-list" title="cairo_copy_clip_rectangle_list ()">cairo_copy_clip_rectangle_list</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
122
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()">cairo_fill</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
123
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()">cairo_fill_preserve</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
124
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-fill-extents" title="cairo_fill_extents ()">cairo_fill_extents</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
125
|
+
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
|
126
|
+
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
|
127
|
+
<em class="parameter"><code><span class="type">double</span> *x2</code></em>,
|
128
|
+
<em class="parameter"><code><span class="type">double</span> *y2</code></em>);
|
129
|
+
<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-t.html#cairo-in-fill" title="cairo_in_fill ()">cairo_in_fill</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
130
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
131
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);
|
132
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-mask" title="cairo_mask ()">cairo_mask</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
133
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
|
134
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-mask-surface" title="cairo_mask_surface ()">cairo_mask_surface</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
135
|
+
<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>,
|
136
|
+
<em class="parameter"><code><span class="type">double</span> surface_x</code></em>,
|
137
|
+
<em class="parameter"><code><span class="type">double</span> surface_y</code></em>);
|
138
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-paint" title="cairo_paint ()">cairo_paint</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
139
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-paint-with-alpha" title="cairo_paint_with_alpha ()">cairo_paint_with_alpha</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
140
|
+
<em class="parameter"><code><span class="type">double</span> alpha</code></em>);
|
141
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()">cairo_stroke</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
142
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()">cairo_stroke_preserve</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
143
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()">cairo_stroke_extents</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
144
|
+
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
|
145
|
+
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
|
146
|
+
<em class="parameter"><code><span class="type">double</span> *x2</code></em>,
|
147
|
+
<em class="parameter"><code><span class="type">double</span> *y2</code></em>);
|
148
|
+
<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-t.html#cairo-in-stroke" title="cairo_in_stroke ()">cairo_in_stroke</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
149
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
150
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);
|
151
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()">cairo_copy_page</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
152
|
+
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()">cairo_show_page</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
153
|
+
unsigned <span class="returnvalue">int</span> <a class="link" href="cairo-cairo-t.html#cairo-get-reference-count" title="cairo_get_reference_count ()">cairo_get_reference_count</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);
|
154
|
+
<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-t.html#cairo-set-user-data" title="cairo_set_user_data ()">cairo_set_user_data</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
155
|
+
<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>,
|
156
|
+
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
|
157
|
+
<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>);
|
158
|
+
<span class="returnvalue">void</span> * <a class="link" href="cairo-cairo-t.html#cairo-get-user-data" title="cairo_get_user_data ()">cairo_get_user_data</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
159
|
+
<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>);
|
160
|
+
</pre>
|
161
|
+
</div>
|
162
|
+
<div class="refsect1" title="Description">
|
163
|
+
<a name="cairo-cairo-t.description"></a><h2>Description</h2>
|
164
|
+
<p>
|
165
|
+
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is the main object used when drawing with cairo. To
|
166
|
+
draw with cairo, you create a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, set the target surface,
|
167
|
+
and drawing options for the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>, create shapes with
|
168
|
+
functions like <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> and <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a>, and then
|
169
|
+
draw shapes with <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>.
|
170
|
+
</p>
|
171
|
+
<p>
|
172
|
+
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>'s can be pushed to a stack via <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>.
|
173
|
+
They may then safely be changed, without loosing the current state.
|
174
|
+
Use <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> to restore to the saved state.
|
175
|
+
</p>
|
176
|
+
</div>
|
177
|
+
<div class="refsect1" title="Details">
|
178
|
+
<a name="cairo-cairo-t.details"></a><h2>Details</h2>
|
179
|
+
<div class="refsect2" title="cairo_t">
|
180
|
+
<a name="cairo-t"></a><h3>cairo_t</h3>
|
181
|
+
<pre class="programlisting">typedef struct _cairo cairo_t;
|
182
|
+
</pre>
|
183
|
+
<p>
|
184
|
+
A <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> contains the current state of the rendering device,
|
185
|
+
including coordinates of yet to be drawn shapes.
|
186
|
+
</p>
|
187
|
+
<p>
|
188
|
+
Cairo contexts, as <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> objects are named, are central to
|
189
|
+
cairo and all drawing with cairo is always done to a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
190
|
+
object.
|
191
|
+
</p>
|
192
|
+
<p>
|
193
|
+
Memory management of <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is done with
|
194
|
+
<a class="link" href="cairo-cairo-t.html#cairo-reference" title="cairo_reference ()"><code class="function">cairo_reference()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>.
|
195
|
+
</p>
|
196
|
+
</div>
|
197
|
+
<hr>
|
198
|
+
<div class="refsect2" title="cairo_create ()">
|
199
|
+
<a name="cairo-create"></a><h3>cairo_create ()</h3>
|
200
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> * cairo_create (<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>);</pre>
|
201
|
+
<p>
|
202
|
+
Creates a new <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with all graphics state parameters set to
|
203
|
+
default values and with <em class="parameter"><code>target</code></em> as a target surface. The target
|
204
|
+
surface should be constructed with a backend-specific function such
|
205
|
+
as <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> (or any other
|
206
|
+
cairo_<span class="emphasis"><em>backend</em></span><code class="function">_surface_create()</code> variant).
|
207
|
+
</p>
|
208
|
+
<p>
|
209
|
+
This function references <em class="parameter"><code>target</code></em>, so you can immediately
|
210
|
+
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> on it if you don't need to
|
211
|
+
maintain a separate reference to it.
|
212
|
+
</p>
|
213
|
+
<div class="variablelist"><table border="0">
|
214
|
+
<col align="left" valign="top">
|
215
|
+
<tbody>
|
216
|
+
<tr>
|
217
|
+
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
|
218
|
+
<td>target surface for the context
|
219
|
+
</td>
|
220
|
+
</tr>
|
221
|
+
<tr>
|
222
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
223
|
+
<td> a newly allocated <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> with a reference
|
224
|
+
count of 1. The initial reference count should be released
|
225
|
+
with <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a> when you are done using the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
|
226
|
+
This function never returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If memory cannot be
|
227
|
+
allocated, a special <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> object will be returned on
|
228
|
+
which <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> returns <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.
|
229
|
+
You can use this object normally, but no drawing will
|
230
|
+
be done.
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
</tbody>
|
234
|
+
</table></div>
|
235
|
+
</div>
|
236
|
+
<hr>
|
237
|
+
<div class="refsect2" title="cairo_reference ()">
|
238
|
+
<a name="cairo-reference"></a><h3>cairo_reference ()</h3>
|
239
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="returnvalue">cairo_t</span></a> * cairo_reference (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
240
|
+
<p>
|
241
|
+
Increases the reference count on <em class="parameter"><code>cr</code></em> by one. This prevents
|
242
|
+
<em class="parameter"><code>cr</code></em> from being destroyed until a matching call to <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>
|
243
|
+
is made.
|
244
|
+
</p>
|
245
|
+
<p>
|
246
|
+
The number of references to a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> can be get using
|
247
|
+
<a class="link" href="cairo-cairo-t.html#cairo-get-reference-count" title="cairo_get_reference_count ()"><code class="function">cairo_get_reference_count()</code></a>.
|
248
|
+
</p>
|
249
|
+
<div class="variablelist"><table border="0">
|
250
|
+
<col align="left" valign="top">
|
251
|
+
<tbody>
|
252
|
+
<tr>
|
253
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
254
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
255
|
+
</td>
|
256
|
+
</tr>
|
257
|
+
<tr>
|
258
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
259
|
+
<td> the referenced <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
|
260
|
+
</td>
|
261
|
+
</tr>
|
262
|
+
</tbody>
|
263
|
+
</table></div>
|
264
|
+
</div>
|
265
|
+
<hr>
|
266
|
+
<div class="refsect2" title="cairo_destroy ()">
|
267
|
+
<a name="cairo-destroy"></a><h3>cairo_destroy ()</h3>
|
268
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_destroy (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
269
|
+
<p>
|
270
|
+
Decreases the reference count on <em class="parameter"><code>cr</code></em> by one. If the result
|
271
|
+
is zero, then <em class="parameter"><code>cr</code></em> and all associated resources are freed.
|
272
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-reference" title="cairo_reference ()"><code class="function">cairo_reference()</code></a>.
|
273
|
+
</p>
|
274
|
+
<div class="variablelist"><table border="0">
|
275
|
+
<col align="left" valign="top">
|
276
|
+
<tbody><tr>
|
277
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
278
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
279
|
+
</td>
|
280
|
+
</tr></tbody>
|
281
|
+
</table></div>
|
282
|
+
</div>
|
283
|
+
<hr>
|
284
|
+
<div class="refsect2" title="cairo_status ()">
|
285
|
+
<a name="cairo-status"></a><h3>cairo_status ()</h3>
|
286
|
+
<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_status (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
287
|
+
<p>
|
288
|
+
Checks whether an error has previously occurred for this context.
|
289
|
+
</p>
|
290
|
+
<div class="variablelist"><table border="0">
|
291
|
+
<col align="left" valign="top">
|
292
|
+
<tbody>
|
293
|
+
<tr>
|
294
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
295
|
+
<td>a cairo context
|
296
|
+
</td>
|
297
|
+
</tr>
|
298
|
+
<tr>
|
299
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
300
|
+
<td> the current status of this context, see <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a>
|
301
|
+
</td>
|
302
|
+
</tr>
|
303
|
+
</tbody>
|
304
|
+
</table></div>
|
305
|
+
</div>
|
306
|
+
<hr>
|
307
|
+
<div class="refsect2" title="cairo_save ()">
|
308
|
+
<a name="cairo-save"></a><h3>cairo_save ()</h3>
|
309
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_save (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
310
|
+
<p>
|
311
|
+
Makes a copy of the current state of <em class="parameter"><code>cr</code></em> and saves it
|
312
|
+
on an internal stack of saved states for <em class="parameter"><code>cr</code></em>. When
|
313
|
+
<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> is called, <em class="parameter"><code>cr</code></em> will be restored to
|
314
|
+
the saved state. Multiple calls to <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and
|
315
|
+
<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> can be nested; each call to <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
|
316
|
+
restores the state from the matching paired <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>.
|
317
|
+
</p>
|
318
|
+
<p>
|
319
|
+
It isn't necessary to clear all saved states before
|
320
|
+
a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is freed. If the reference count of a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
321
|
+
drops to zero in response to a call to <a class="link" href="cairo-cairo-t.html#cairo-destroy" title="cairo_destroy ()"><code class="function">cairo_destroy()</code></a>,
|
322
|
+
any saved states will be freed along with the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>.
|
323
|
+
</p>
|
324
|
+
<div class="variablelist"><table border="0">
|
325
|
+
<col align="left" valign="top">
|
326
|
+
<tbody><tr>
|
327
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
328
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
329
|
+
</td>
|
330
|
+
</tr></tbody>
|
331
|
+
</table></div>
|
332
|
+
</div>
|
333
|
+
<hr>
|
334
|
+
<div class="refsect2" title="cairo_restore ()">
|
335
|
+
<a name="cairo-restore"></a><h3>cairo_restore ()</h3>
|
336
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_restore (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
337
|
+
<p>
|
338
|
+
Restores <em class="parameter"><code>cr</code></em> to the state saved by a preceding call to
|
339
|
+
<a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and removes that state from the stack of
|
340
|
+
saved states.
|
341
|
+
</p>
|
342
|
+
<div class="variablelist"><table border="0">
|
343
|
+
<col align="left" valign="top">
|
344
|
+
<tbody><tr>
|
345
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
346
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
347
|
+
</td>
|
348
|
+
</tr></tbody>
|
349
|
+
</table></div>
|
350
|
+
</div>
|
351
|
+
<hr>
|
352
|
+
<div class="refsect2" title="cairo_get_target ()">
|
353
|
+
<a name="cairo-get-target"></a><h3>cairo_get_target ()</h3>
|
354
|
+
<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_get_target (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
355
|
+
<p>
|
356
|
+
Gets the target surface for the cairo context as passed to
|
357
|
+
<a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a>.
|
358
|
+
</p>
|
359
|
+
<p>
|
360
|
+
This function will always return a valid pointer, but the result
|
361
|
+
can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
|
362
|
+
(ie. <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
|
363
|
+
A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>
|
364
|
+
<code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.
|
365
|
+
</p>
|
366
|
+
<div class="variablelist"><table border="0">
|
367
|
+
<col align="left" valign="top">
|
368
|
+
<tbody>
|
369
|
+
<tr>
|
370
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
371
|
+
<td>a cairo context
|
372
|
+
</td>
|
373
|
+
</tr>
|
374
|
+
<tr>
|
375
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
376
|
+
<td> the target surface. This object is owned by cairo. To
|
377
|
+
keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.
|
378
|
+
</td>
|
379
|
+
</tr>
|
380
|
+
</tbody>
|
381
|
+
</table></div>
|
382
|
+
</div>
|
383
|
+
<hr>
|
384
|
+
<div class="refsect2" title="cairo_push_group ()">
|
385
|
+
<a name="cairo-push-group"></a><h3>cairo_push_group ()</h3>
|
386
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_push_group (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
387
|
+
<p>
|
388
|
+
Temporarily redirects drawing to an intermediate surface known as a
|
389
|
+
group. The redirection lasts until the group is completed by a call
|
390
|
+
to <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
|
391
|
+
provide the result of any drawing to the group as a pattern,
|
392
|
+
(either as an explicit object, or set as the source pattern).
|
393
|
+
</p>
|
394
|
+
<p>
|
395
|
+
This group functionality can be convenient for performing
|
396
|
+
intermediate compositing. One common use of a group is to render
|
397
|
+
objects as opaque within the group, (so that they occlude each
|
398
|
+
other), and then blend the result with translucence onto the
|
399
|
+
destination.
|
400
|
+
</p>
|
401
|
+
<p>
|
402
|
+
Groups can be nested arbitrarily deep by making balanced calls to
|
403
|
+
<a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a>. Each call pushes/pops the new
|
404
|
+
target group onto/from a stack.
|
405
|
+
</p>
|
406
|
+
<p>
|
407
|
+
The <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> so that any
|
408
|
+
changes to the graphics state will not be visible outside the
|
409
|
+
group, (the pop_group functions call <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>).
|
410
|
+
</p>
|
411
|
+
<p>
|
412
|
+
By default the intermediate group will have a content type of
|
413
|
+
<a class="link" href="cairo-cairo-surface-t.html#CAIRO-CONTENT-COLOR-ALPHA:CAPS"><code class="literal">CAIRO_CONTENT_COLOR_ALPHA</code></a>. Other content types can be chosen for
|
414
|
+
the group by using <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> instead.
|
415
|
+
</p>
|
416
|
+
<p>
|
417
|
+
As an example, here is how one might fill and stroke a path with
|
418
|
+
translucence, but without any portion of the fill being visible
|
419
|
+
under the stroke:
|
420
|
+
</p>
|
421
|
+
<p>
|
422
|
+
</p>
|
423
|
+
<div class="informalexample">
|
424
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
425
|
+
<tbody>
|
426
|
+
<tr>
|
427
|
+
<td class="listing_lines" align="right"><pre>1
|
428
|
+
2
|
429
|
+
3
|
430
|
+
4
|
431
|
+
5
|
432
|
+
6
|
433
|
+
7</pre></td>
|
434
|
+
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-push-group">cairo_push_group</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
435
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source">cairo_set_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> fill_pattern</span><span class="symbol">);</span>
|
436
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-fill-preserve">cairo_fill_preserve</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
437
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source">cairo_set_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> stroke_pattern</span><span class="symbol">);</span>
|
438
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
439
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-pop-group-to-source">cairo_pop_group_to_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
440
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-paint-with-alpha">cairo_paint_with_alpha</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> alpha</span><span class="symbol">);</span></pre></td>
|
441
|
+
</tr>
|
442
|
+
</tbody>
|
443
|
+
</table>
|
444
|
+
</div>
|
445
|
+
|
446
|
+
<p>
|
447
|
+
</p>
|
448
|
+
<div class="variablelist"><table border="0">
|
449
|
+
<col align="left" valign="top">
|
450
|
+
<tbody><tr>
|
451
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
452
|
+
<td>a cairo context
|
453
|
+
</td>
|
454
|
+
</tr></tbody>
|
455
|
+
</table></div>
|
456
|
+
<p class="since">Since 1.2</p>
|
457
|
+
</div>
|
458
|
+
<hr>
|
459
|
+
<div class="refsect2" title="cairo_push_group_with_content ()">
|
460
|
+
<a name="cairo-push-group-with-content"></a><h3>cairo_push_group_with_content ()</h3>
|
461
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_push_group_with_content (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
462
|
+
<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>);</pre>
|
463
|
+
<p>
|
464
|
+
Temporarily redirects drawing to an intermediate surface known as a
|
465
|
+
group. The redirection lasts until the group is completed by a call
|
466
|
+
to <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-pop-group-to-source" title="cairo_pop_group_to_source ()"><code class="function">cairo_pop_group_to_source()</code></a>. These calls
|
467
|
+
provide the result of any drawing to the group as a pattern,
|
468
|
+
(either as an explicit object, or set as the source pattern).
|
469
|
+
</p>
|
470
|
+
<p>
|
471
|
+
The group will have a content type of <em class="parameter"><code>content</code></em>. The ability to
|
472
|
+
control this content type is the only distinction between this
|
473
|
+
function and <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> which you should see for a more
|
474
|
+
detailed description of group rendering.
|
475
|
+
</p>
|
476
|
+
<div class="variablelist"><table border="0">
|
477
|
+
<col align="left" valign="top">
|
478
|
+
<tbody>
|
479
|
+
<tr>
|
480
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
481
|
+
<td>a cairo context
|
482
|
+
</td>
|
483
|
+
</tr>
|
484
|
+
<tr>
|
485
|
+
<td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td>
|
486
|
+
<td>a <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> indicating the type of group that
|
487
|
+
will be created
|
488
|
+
</td>
|
489
|
+
</tr>
|
490
|
+
</tbody>
|
491
|
+
</table></div>
|
492
|
+
<p class="since">Since 1.2</p>
|
493
|
+
</div>
|
494
|
+
<hr>
|
495
|
+
<div class="refsect2" title="cairo_pop_group ()">
|
496
|
+
<a name="cairo-pop-group"></a><h3>cairo_pop_group ()</h3>
|
497
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * cairo_pop_group (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
498
|
+
<p>
|
499
|
+
Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or
|
500
|
+
<a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> and returns a new pattern
|
501
|
+
containing the results of all drawing operations performed to the
|
502
|
+
group.
|
503
|
+
</p>
|
504
|
+
<p>
|
505
|
+
The <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>, (balancing a
|
506
|
+
call to <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> by the push_group function), so that any
|
507
|
+
changes to the graphics state will not be visible outside the
|
508
|
+
group.
|
509
|
+
</p>
|
510
|
+
<div class="variablelist"><table border="0">
|
511
|
+
<col align="left" valign="top">
|
512
|
+
<tbody>
|
513
|
+
<tr>
|
514
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
515
|
+
<td>a cairo context
|
516
|
+
</td>
|
517
|
+
</tr>
|
518
|
+
<tr>
|
519
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
520
|
+
<td> a newly created (surface) pattern containing the
|
521
|
+
results of all drawing operations performed to the group. The
|
522
|
+
caller owns the returned object and should call
|
523
|
+
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when finished with it.
|
524
|
+
|
525
|
+
</td>
|
526
|
+
</tr>
|
527
|
+
</tbody>
|
528
|
+
</table></div>
|
529
|
+
<p class="since">Since 1.2</p>
|
530
|
+
</div>
|
531
|
+
<hr>
|
532
|
+
<div class="refsect2" title="cairo_pop_group_to_source ()">
|
533
|
+
<a name="cairo-pop-group-to-source"></a><h3>cairo_pop_group_to_source ()</h3>
|
534
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_pop_group_to_source (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
535
|
+
<p>
|
536
|
+
Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or
|
537
|
+
<a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a> and installs the resulting pattern
|
538
|
+
as the source pattern in the given cairo context.
|
539
|
+
</p>
|
540
|
+
<p>
|
541
|
+
The behavior of this function is equivalent to the sequence of
|
542
|
+
operations:
|
543
|
+
</p>
|
544
|
+
<p>
|
545
|
+
</p>
|
546
|
+
<div class="informalexample">
|
547
|
+
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
548
|
+
<tbody>
|
549
|
+
<tr>
|
550
|
+
<td class="listing_lines" align="right"><pre>1
|
551
|
+
2
|
552
|
+
3</pre></td>
|
553
|
+
<td class="listing_code"><pre class="programlisting"><span class="symbol"><</span><span class="usertype">a</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"link"</span><span class="normal"> href</span><span class="symbol">=</span><span class="string">"cairo-cairo-pattern-t.html#cairo-pattern-t"</span><span class="normal"> title</span><span class="symbol">=</span><span class="string">"cairo_pattern_t"</span><span class="symbol">></span><span class="usertype">cairo_pattern_t</a></span><span class="normal"> </span><span class="symbol">*</span><span class="normal">group </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-pop-group">cairo_pop_group</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
|
554
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source">cairo_set_source</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> group</span><span class="symbol">);</span>
|
555
|
+
<span class="function"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html#cairo-pattern-destroy">cairo_pattern_destroy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">group</span><span class="symbol">);</span></pre></td>
|
556
|
+
</tr>
|
557
|
+
</tbody>
|
558
|
+
</table>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
<p>
|
562
|
+
</p>
|
563
|
+
<p>
|
564
|
+
but is more convenient as their is no need for a variable to store
|
565
|
+
the short-lived pointer to the pattern.
|
566
|
+
</p>
|
567
|
+
<p>
|
568
|
+
The <a class="link" href="cairo-cairo-t.html#cairo-pop-group" title="cairo_pop_group ()"><code class="function">cairo_pop_group()</code></a> function calls <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>, (balancing a
|
569
|
+
call to <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> by the push_group function), so that any
|
570
|
+
changes to the graphics state will not be visible outside the
|
571
|
+
group.
|
572
|
+
</p>
|
573
|
+
<div class="variablelist"><table border="0">
|
574
|
+
<col align="left" valign="top">
|
575
|
+
<tbody><tr>
|
576
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
577
|
+
<td>a cairo context
|
578
|
+
</td>
|
579
|
+
</tr></tbody>
|
580
|
+
</table></div>
|
581
|
+
<p class="since">Since 1.2</p>
|
582
|
+
</div>
|
583
|
+
<hr>
|
584
|
+
<div class="refsect2" title="cairo_get_group_target ()">
|
585
|
+
<a name="cairo-get-group-target"></a><h3>cairo_get_group_target ()</h3>
|
586
|
+
<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_get_group_target (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
587
|
+
<p>
|
588
|
+
Gets the current destination surface for the context. This is either
|
589
|
+
the original target surface as passed to <a class="link" href="cairo-cairo-t.html#cairo-create" title="cairo_create ()"><code class="function">cairo_create()</code></a> or the target
|
590
|
+
surface for the current group as started by the most recent call to
|
591
|
+
<a class="link" href="cairo-cairo-t.html#cairo-push-group" title="cairo_push_group ()"><code class="function">cairo_push_group()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-push-group-with-content" title="cairo_push_group_with_content ()"><code class="function">cairo_push_group_with_content()</code></a>.
|
592
|
+
</p>
|
593
|
+
<p>
|
594
|
+
This function will always return a valid pointer, but the result
|
595
|
+
can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state,
|
596
|
+
(ie. <a class="link" href="cairo-cairo-t.html#cairo-status" title="cairo_status ()"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>).
|
597
|
+
A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a>
|
598
|
+
<code class="literal">!=</code> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.
|
599
|
+
</p>
|
600
|
+
<div class="variablelist"><table border="0">
|
601
|
+
<col align="left" valign="top">
|
602
|
+
<tbody>
|
603
|
+
<tr>
|
604
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
605
|
+
<td>a cairo context
|
606
|
+
</td>
|
607
|
+
</tr>
|
608
|
+
<tr>
|
609
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
610
|
+
<td> the target surface. This object is owned by cairo. To
|
611
|
+
keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference" title="cairo_surface_reference ()"><code class="function">cairo_surface_reference()</code></a>.
|
612
|
+
|
613
|
+
</td>
|
614
|
+
</tr>
|
615
|
+
</tbody>
|
616
|
+
</table></div>
|
617
|
+
<p class="since">Since 1.2</p>
|
618
|
+
</div>
|
619
|
+
<hr>
|
620
|
+
<div class="refsect2" title="cairo_set_source_rgb ()">
|
621
|
+
<a name="cairo-set-source-rgb"></a><h3>cairo_set_source_rgb ()</h3>
|
622
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_source_rgb (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
623
|
+
<em class="parameter"><code><span class="type">double</span> red</code></em>,
|
624
|
+
<em class="parameter"><code><span class="type">double</span> green</code></em>,
|
625
|
+
<em class="parameter"><code><span class="type">double</span> blue</code></em>);</pre>
|
626
|
+
<p>
|
627
|
+
Sets the source pattern within <em class="parameter"><code>cr</code></em> to an opaque color. This opaque
|
628
|
+
color will then be used for any subsequent drawing operation until
|
629
|
+
a new source pattern is set.
|
630
|
+
</p>
|
631
|
+
<p>
|
632
|
+
The color components are floating point numbers in the range 0 to
|
633
|
+
1. If the values passed in are outside that range, they will be
|
634
|
+
clamped.
|
635
|
+
</p>
|
636
|
+
<p>
|
637
|
+
The default source pattern is opaque black, (that is, it is
|
638
|
+
equivalent to cairo_set_source_rgb(cr, 0.0, 0.0, 0.0)).
|
639
|
+
</p>
|
640
|
+
<div class="variablelist"><table border="0">
|
641
|
+
<col align="left" valign="top">
|
642
|
+
<tbody>
|
643
|
+
<tr>
|
644
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
645
|
+
<td>a cairo context
|
646
|
+
</td>
|
647
|
+
</tr>
|
648
|
+
<tr>
|
649
|
+
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
|
650
|
+
<td>red component of color
|
651
|
+
</td>
|
652
|
+
</tr>
|
653
|
+
<tr>
|
654
|
+
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
|
655
|
+
<td>green component of color
|
656
|
+
</td>
|
657
|
+
</tr>
|
658
|
+
<tr>
|
659
|
+
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
|
660
|
+
<td>blue component of color
|
661
|
+
</td>
|
662
|
+
</tr>
|
663
|
+
</tbody>
|
664
|
+
</table></div>
|
665
|
+
</div>
|
666
|
+
<hr>
|
667
|
+
<div class="refsect2" title="cairo_set_source_rgba ()">
|
668
|
+
<a name="cairo-set-source-rgba"></a><h3>cairo_set_source_rgba ()</h3>
|
669
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_source_rgba (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
670
|
+
<em class="parameter"><code><span class="type">double</span> red</code></em>,
|
671
|
+
<em class="parameter"><code><span class="type">double</span> green</code></em>,
|
672
|
+
<em class="parameter"><code><span class="type">double</span> blue</code></em>,
|
673
|
+
<em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre>
|
674
|
+
<p>
|
675
|
+
Sets the source pattern within <em class="parameter"><code>cr</code></em> to a translucent color. This
|
676
|
+
color will then be used for any subsequent drawing operation until
|
677
|
+
a new source pattern is set.
|
678
|
+
</p>
|
679
|
+
<p>
|
680
|
+
The color and alpha components are floating point numbers in the
|
681
|
+
range 0 to 1. If the values passed in are outside that range, they
|
682
|
+
will be clamped.
|
683
|
+
</p>
|
684
|
+
<p>
|
685
|
+
The default source pattern is opaque black, (that is, it is
|
686
|
+
equivalent to cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0)).
|
687
|
+
</p>
|
688
|
+
<div class="variablelist"><table border="0">
|
689
|
+
<col align="left" valign="top">
|
690
|
+
<tbody>
|
691
|
+
<tr>
|
692
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
693
|
+
<td>a cairo context
|
694
|
+
</td>
|
695
|
+
</tr>
|
696
|
+
<tr>
|
697
|
+
<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
|
698
|
+
<td>red component of color
|
699
|
+
</td>
|
700
|
+
</tr>
|
701
|
+
<tr>
|
702
|
+
<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
|
703
|
+
<td>green component of color
|
704
|
+
</td>
|
705
|
+
</tr>
|
706
|
+
<tr>
|
707
|
+
<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
|
708
|
+
<td>blue component of color
|
709
|
+
</td>
|
710
|
+
</tr>
|
711
|
+
<tr>
|
712
|
+
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
|
713
|
+
<td>alpha component of color
|
714
|
+
</td>
|
715
|
+
</tr>
|
716
|
+
</tbody>
|
717
|
+
</table></div>
|
718
|
+
</div>
|
719
|
+
<hr>
|
720
|
+
<div class="refsect2" title="cairo_set_source ()">
|
721
|
+
<a name="cairo-set-source"></a><h3>cairo_set_source ()</h3>
|
722
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_source (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
723
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *source</code></em>);</pre>
|
724
|
+
<p>
|
725
|
+
Sets the source pattern within <em class="parameter"><code>cr</code></em> to <em class="parameter"><code>source</code></em>. This pattern
|
726
|
+
will then be used for any subsequent drawing operation until a new
|
727
|
+
source pattern is set.
|
728
|
+
</p>
|
729
|
+
<p>
|
730
|
+
Note: The pattern's transformation matrix will be locked to the
|
731
|
+
user space in effect at the time of <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>. This means
|
732
|
+
that further modifications of the current transformation matrix
|
733
|
+
will not affect the source pattern. See <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.
|
734
|
+
</p>
|
735
|
+
<p>
|
736
|
+
The default source pattern is a solid pattern that is opaque black,
|
737
|
+
(that is, it is equivalent to cairo_set_source_rgb(cr, 0.0, 0.0,
|
738
|
+
0.0)).
|
739
|
+
</p>
|
740
|
+
<div class="variablelist"><table border="0">
|
741
|
+
<col align="left" valign="top">
|
742
|
+
<tbody>
|
743
|
+
<tr>
|
744
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
745
|
+
<td>a cairo context
|
746
|
+
</td>
|
747
|
+
</tr>
|
748
|
+
<tr>
|
749
|
+
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
|
750
|
+
<td>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> to be used as the source for
|
751
|
+
subsequent drawing operations.
|
752
|
+
</td>
|
753
|
+
</tr>
|
754
|
+
</tbody>
|
755
|
+
</table></div>
|
756
|
+
</div>
|
757
|
+
<hr>
|
758
|
+
<div class="refsect2" title="cairo_set_source_surface ()">
|
759
|
+
<a name="cairo-set-source-surface"></a><h3>cairo_set_source_surface ()</h3>
|
760
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_source_surface (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
761
|
+
<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>,
|
762
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
763
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
|
764
|
+
<p>
|
765
|
+
This is a convenience function for creating a pattern from <em class="parameter"><code>surface</code></em>
|
766
|
+
and setting it as the source in <em class="parameter"><code>cr</code></em> with <a class="link" href="cairo-cairo-t.html#cairo-set-source" title="cairo_set_source ()"><code class="function">cairo_set_source()</code></a>.
|
767
|
+
</p>
|
768
|
+
<p>
|
769
|
+
The <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> parameters give the user-space coordinate at which
|
770
|
+
the surface origin should appear. (The surface origin is its
|
771
|
+
upper-left corner before any transformation has been applied.) The
|
772
|
+
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> patterns are negated and then set as translation values
|
773
|
+
in the pattern matrix.
|
774
|
+
</p>
|
775
|
+
<p>
|
776
|
+
Other than the initial translation pattern matrix, as described
|
777
|
+
above, all other pattern attributes, (such as its extend mode), are
|
778
|
+
set to the default values as in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-for-surface" title="cairo_pattern_create_for_surface ()"><code class="function">cairo_pattern_create_for_surface()</code></a>.
|
779
|
+
The resulting pattern can be queried with <a class="link" href="cairo-cairo-t.html#cairo-get-source" title="cairo_get_source ()"><code class="function">cairo_get_source()</code></a> so
|
780
|
+
that these attributes can be modified if desired, (eg. to create a
|
781
|
+
repeating pattern with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-extend" title="cairo_pattern_set_extend ()"><code class="function">cairo_pattern_set_extend()</code></a>).
|
782
|
+
</p>
|
783
|
+
<div class="variablelist"><table border="0">
|
784
|
+
<col align="left" valign="top">
|
785
|
+
<tbody>
|
786
|
+
<tr>
|
787
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
788
|
+
<td>a cairo context
|
789
|
+
</td>
|
790
|
+
</tr>
|
791
|
+
<tr>
|
792
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
793
|
+
<td>a surface to be used to set the source pattern
|
794
|
+
</td>
|
795
|
+
</tr>
|
796
|
+
<tr>
|
797
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
798
|
+
<td>User-space X coordinate for surface origin
|
799
|
+
</td>
|
800
|
+
</tr>
|
801
|
+
<tr>
|
802
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
803
|
+
<td>User-space Y coordinate for surface origin
|
804
|
+
</td>
|
805
|
+
</tr>
|
806
|
+
</tbody>
|
807
|
+
</table></div>
|
808
|
+
</div>
|
809
|
+
<hr>
|
810
|
+
<div class="refsect2" title="cairo_get_source ()">
|
811
|
+
<a name="cairo-get-source"></a><h3>cairo_get_source ()</h3>
|
812
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * cairo_get_source (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
813
|
+
<p>
|
814
|
+
Gets the current source pattern for <em class="parameter"><code>cr</code></em>.
|
815
|
+
</p>
|
816
|
+
<div class="variablelist"><table border="0">
|
817
|
+
<col align="left" valign="top">
|
818
|
+
<tbody>
|
819
|
+
<tr>
|
820
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
821
|
+
<td>a cairo context
|
822
|
+
</td>
|
823
|
+
</tr>
|
824
|
+
<tr>
|
825
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
826
|
+
<td> the current source pattern. This object is owned by
|
827
|
+
cairo. To keep a reference to it, you must call
|
828
|
+
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-reference" title="cairo_pattern_reference ()"><code class="function">cairo_pattern_reference()</code></a>.
|
829
|
+
</td>
|
830
|
+
</tr>
|
831
|
+
</tbody>
|
832
|
+
</table></div>
|
833
|
+
</div>
|
834
|
+
<hr>
|
835
|
+
<div class="refsect2" title="enum cairo_antialias_t">
|
836
|
+
<a name="cairo-antialias-t"></a><h3>enum cairo_antialias_t</h3>
|
837
|
+
<pre class="programlisting">typedef enum _cairo_antialias {
|
838
|
+
CAIRO_ANTIALIAS_DEFAULT,
|
839
|
+
CAIRO_ANTIALIAS_NONE,
|
840
|
+
CAIRO_ANTIALIAS_GRAY,
|
841
|
+
CAIRO_ANTIALIAS_SUBPIXEL
|
842
|
+
} cairo_antialias_t;
|
843
|
+
</pre>
|
844
|
+
<p>
|
845
|
+
Specifies the type of antialiasing to do when rendering text or shapes.
|
846
|
+
</p>
|
847
|
+
<div class="variablelist"><table border="0">
|
848
|
+
<col align="left" valign="top">
|
849
|
+
<tbody>
|
850
|
+
<tr>
|
851
|
+
<td><p><a name="CAIRO-ANTIALIAS-DEFAULT:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_DEFAULT</code></span></p></td>
|
852
|
+
<td>Use the default antialiasing for
|
853
|
+
the subsystem and target device
|
854
|
+
</td>
|
855
|
+
</tr>
|
856
|
+
<tr>
|
857
|
+
<td><p><a name="CAIRO-ANTIALIAS-NONE:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_NONE</code></span></p></td>
|
858
|
+
<td>Use a bilevel alpha mask
|
859
|
+
</td>
|
860
|
+
</tr>
|
861
|
+
<tr>
|
862
|
+
<td><p><a name="CAIRO-ANTIALIAS-GRAY:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_GRAY</code></span></p></td>
|
863
|
+
<td>Perform single-color antialiasing (using
|
864
|
+
shades of gray for black text on a white background, for example).
|
865
|
+
</td>
|
866
|
+
</tr>
|
867
|
+
<tr>
|
868
|
+
<td><p><a name="CAIRO-ANTIALIAS-SUBPIXEL:CAPS"></a><span class="term"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></span></p></td>
|
869
|
+
<td>Perform antialiasing by taking
|
870
|
+
advantage of the order of subpixel elements on devices
|
871
|
+
such as LCD panels
|
872
|
+
</td>
|
873
|
+
</tr>
|
874
|
+
</tbody>
|
875
|
+
</table></div>
|
876
|
+
</div>
|
877
|
+
<hr>
|
878
|
+
<div class="refsect2" title="cairo_set_antialias ()">
|
879
|
+
<a name="cairo-set-antialias"></a><h3>cairo_set_antialias ()</h3>
|
880
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_antialias (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
881
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="type">cairo_antialias_t</span></a> antialias</code></em>);</pre>
|
882
|
+
<p>
|
883
|
+
Set the antialiasing mode of the rasterizer used for drawing shapes.
|
884
|
+
This value is a hint, and a particular backend may or may not support
|
885
|
+
a particular value. At the current time, no backend supports
|
886
|
+
<a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SUBPIXEL:CAPS"><code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code></a> when drawing shapes.
|
887
|
+
</p>
|
888
|
+
<p>
|
889
|
+
Note that this option does not affect text rendering, instead see
|
890
|
+
<a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-set-antialias" title="cairo_font_options_set_antialias ()"><code class="function">cairo_font_options_set_antialias()</code></a>.
|
891
|
+
</p>
|
892
|
+
<div class="variablelist"><table border="0">
|
893
|
+
<col align="left" valign="top">
|
894
|
+
<tbody>
|
895
|
+
<tr>
|
896
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
897
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
898
|
+
</td>
|
899
|
+
</tr>
|
900
|
+
<tr>
|
901
|
+
<td><p><span class="term"><em class="parameter"><code>antialias</code></em> :</span></p></td>
|
902
|
+
<td>the new antialiasing mode
|
903
|
+
</td>
|
904
|
+
</tr>
|
905
|
+
</tbody>
|
906
|
+
</table></div>
|
907
|
+
</div>
|
908
|
+
<hr>
|
909
|
+
<div class="refsect2" title="cairo_get_antialias ()">
|
910
|
+
<a name="cairo-get-antialias"></a><h3>cairo_get_antialias ()</h3>
|
911
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t" title="enum cairo_antialias_t"><span class="returnvalue">cairo_antialias_t</span></a> cairo_get_antialias (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
912
|
+
<p>
|
913
|
+
Gets the current shape antialiasing mode, as set by <code class="function">cairo_set_shape_antialias()</code>.
|
914
|
+
</p>
|
915
|
+
<div class="variablelist"><table border="0">
|
916
|
+
<col align="left" valign="top">
|
917
|
+
<tbody>
|
918
|
+
<tr>
|
919
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
920
|
+
<td>a cairo context
|
921
|
+
</td>
|
922
|
+
</tr>
|
923
|
+
<tr>
|
924
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
925
|
+
<td> the current shape antialiasing mode.
|
926
|
+
</td>
|
927
|
+
</tr>
|
928
|
+
</tbody>
|
929
|
+
</table></div>
|
930
|
+
</div>
|
931
|
+
<hr>
|
932
|
+
<div class="refsect2" title="cairo_set_dash ()">
|
933
|
+
<a name="cairo-set-dash"></a><h3>cairo_set_dash ()</h3>
|
934
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_dash (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
935
|
+
<em class="parameter"><code>const <span class="type">double</span> *dashes</code></em>,
|
936
|
+
<em class="parameter"><code><span class="type">int</span> num_dashes</code></em>,
|
937
|
+
<em class="parameter"><code><span class="type">double</span> offset</code></em>);</pre>
|
938
|
+
<p>
|
939
|
+
Sets the dash pattern to be used by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>. A dash pattern
|
940
|
+
is specified by <em class="parameter"><code>dashes</code></em>, an array of positive values. Each value
|
941
|
+
provides the length of alternate "on" and "off" portions of the
|
942
|
+
stroke. The <em class="parameter"><code>offset</code></em> specifies an offset into the pattern at which
|
943
|
+
the stroke begins.
|
944
|
+
</p>
|
945
|
+
<p>
|
946
|
+
Each "on" segment will have caps applied as if the segment were a
|
947
|
+
separate sub-path. In particular, it is valid to use an "on" length
|
948
|
+
of 0.0 with <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> in order
|
949
|
+
to distributed dots or squares along a path.
|
950
|
+
</p>
|
951
|
+
<p>
|
952
|
+
Note: The length values are in user-space units as evaluated at the
|
953
|
+
time of stroking. This is not necessarily the same as the user
|
954
|
+
space at the time of <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>.
|
955
|
+
</p>
|
956
|
+
<p>
|
957
|
+
If <em class="parameter"><code>num_dashes</code></em> is 0 dashing is disabled.
|
958
|
+
</p>
|
959
|
+
<p>
|
960
|
+
If <em class="parameter"><code>num_dashes</code></em> is 1 a symmetric pattern is assumed with alternating
|
961
|
+
on and off portions of the size specified by the single value in
|
962
|
+
<em class="parameter"><code>dashes</code></em>.
|
963
|
+
</p>
|
964
|
+
<p>
|
965
|
+
If any value in <em class="parameter"><code>dashes</code></em> is negative, or if all values are 0, then
|
966
|
+
<em class="parameter"><code>cr</code></em> will be put into an error state with a status of
|
967
|
+
<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-DASH:CAPS"><code class="literal">CAIRO_STATUS_INVALID_DASH</code></a>.
|
968
|
+
</p>
|
969
|
+
<div class="variablelist"><table border="0">
|
970
|
+
<col align="left" valign="top">
|
971
|
+
<tbody>
|
972
|
+
<tr>
|
973
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
974
|
+
<td>a cairo context
|
975
|
+
</td>
|
976
|
+
</tr>
|
977
|
+
<tr>
|
978
|
+
<td><p><span class="term"><em class="parameter"><code>dashes</code></em> :</span></p></td>
|
979
|
+
<td>an array specifying alternate lengths of on and off stroke portions
|
980
|
+
</td>
|
981
|
+
</tr>
|
982
|
+
<tr>
|
983
|
+
<td><p><span class="term"><em class="parameter"><code>num_dashes</code></em> :</span></p></td>
|
984
|
+
<td>the length of the dashes array
|
985
|
+
</td>
|
986
|
+
</tr>
|
987
|
+
<tr>
|
988
|
+
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
|
989
|
+
<td>an offset into the dash pattern at which the stroke should start
|
990
|
+
</td>
|
991
|
+
</tr>
|
992
|
+
</tbody>
|
993
|
+
</table></div>
|
994
|
+
</div>
|
995
|
+
<hr>
|
996
|
+
<div class="refsect2" title="cairo_get_dash_count ()">
|
997
|
+
<a name="cairo-get-dash-count"></a><h3>cairo_get_dash_count ()</h3>
|
998
|
+
<pre class="programlisting"><span class="returnvalue">int</span> cairo_get_dash_count (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
999
|
+
<p>
|
1000
|
+
This function returns the length of the dash array in <em class="parameter"><code>cr</code></em> (0 if dashing
|
1001
|
+
is not currently in effect).
|
1002
|
+
</p>
|
1003
|
+
<p>
|
1004
|
+
See also <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-get-dash" title="cairo_get_dash ()"><code class="function">cairo_get_dash()</code></a>.
|
1005
|
+
</p>
|
1006
|
+
<div class="variablelist"><table border="0">
|
1007
|
+
<col align="left" valign="top">
|
1008
|
+
<tbody>
|
1009
|
+
<tr>
|
1010
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1011
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1012
|
+
</td>
|
1013
|
+
</tr>
|
1014
|
+
<tr>
|
1015
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1016
|
+
<td> the length of the dash array, or 0 if no dash array set.
|
1017
|
+
|
1018
|
+
</td>
|
1019
|
+
</tr>
|
1020
|
+
</tbody>
|
1021
|
+
</table></div>
|
1022
|
+
<p class="since">Since 1.4</p>
|
1023
|
+
</div>
|
1024
|
+
<hr>
|
1025
|
+
<div class="refsect2" title="cairo_get_dash ()">
|
1026
|
+
<a name="cairo-get-dash"></a><h3>cairo_get_dash ()</h3>
|
1027
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_get_dash (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1028
|
+
<em class="parameter"><code><span class="type">double</span> *dashes</code></em>,
|
1029
|
+
<em class="parameter"><code><span class="type">double</span> *offset</code></em>);</pre>
|
1030
|
+
<p>
|
1031
|
+
Gets the current dash array. If not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>dashes</code></em> should be big
|
1032
|
+
enough to hold at least the number of values returned by
|
1033
|
+
<a class="link" href="cairo-cairo-t.html#cairo-get-dash-count" title="cairo_get_dash_count ()"><code class="function">cairo_get_dash_count()</code></a>.
|
1034
|
+
</p>
|
1035
|
+
<div class="variablelist"><table border="0">
|
1036
|
+
<col align="left" valign="top">
|
1037
|
+
<tbody>
|
1038
|
+
<tr>
|
1039
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1040
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1041
|
+
</td>
|
1042
|
+
</tr>
|
1043
|
+
<tr>
|
1044
|
+
<td><p><span class="term"><em class="parameter"><code>dashes</code></em> :</span></p></td>
|
1045
|
+
<td>return value for the dash array, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
|
1046
|
+
</td>
|
1047
|
+
</tr>
|
1048
|
+
<tr>
|
1049
|
+
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
|
1050
|
+
<td>return value for the current dash offset, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
|
1051
|
+
</td>
|
1052
|
+
</tr>
|
1053
|
+
</tbody>
|
1054
|
+
</table></div>
|
1055
|
+
<p class="since">Since 1.4</p>
|
1056
|
+
</div>
|
1057
|
+
<hr>
|
1058
|
+
<div class="refsect2" title="enum cairo_fill_rule_t">
|
1059
|
+
<a name="cairo-fill-rule-t"></a><h3>enum cairo_fill_rule_t</h3>
|
1060
|
+
<pre class="programlisting">typedef enum _cairo_fill_rule {
|
1061
|
+
CAIRO_FILL_RULE_WINDING,
|
1062
|
+
CAIRO_FILL_RULE_EVEN_ODD
|
1063
|
+
} cairo_fill_rule_t;
|
1064
|
+
</pre>
|
1065
|
+
<p>
|
1066
|
+
<a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> is used to select how paths are filled. For both
|
1067
|
+
fill rules, whether or not a point is included in the fill is
|
1068
|
+
determined by taking a ray from that point to infinity and looking
|
1069
|
+
at intersections with the path. The ray can be in any direction,
|
1070
|
+
as long as it doesn't pass through the end point of a segment
|
1071
|
+
or have a tricky intersection such as intersecting tangent to the path.
|
1072
|
+
(Note that filling is not actually implemented in this way. This
|
1073
|
+
is just a description of the rule that is applied.)
|
1074
|
+
</p>
|
1075
|
+
<p>
|
1076
|
+
The default fill rule is <a class="link" href="cairo-cairo-t.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.
|
1077
|
+
</p>
|
1078
|
+
<p>
|
1079
|
+
New entries may be added in future versions.
|
1080
|
+
</p>
|
1081
|
+
<div class="variablelist"><table border="0">
|
1082
|
+
<col align="left" valign="top">
|
1083
|
+
<tbody>
|
1084
|
+
<tr>
|
1085
|
+
<td><p><a name="CAIRO-FILL-RULE-WINDING:CAPS"></a><span class="term"><code class="literal">CAIRO_FILL_RULE_WINDING</code></span></p></td>
|
1086
|
+
<td>If the path crosses the ray from
|
1087
|
+
left-to-right, counts +1. If the path crosses the ray
|
1088
|
+
from right to left, counts -1. (Left and right are determined
|
1089
|
+
from the perspective of looking along the ray from the starting
|
1090
|
+
point.) If the total count is non-zero, the point will be filled.
|
1091
|
+
</td>
|
1092
|
+
</tr>
|
1093
|
+
<tr>
|
1094
|
+
<td><p><a name="CAIRO-FILL-RULE-EVEN-ODD:CAPS"></a><span class="term"><code class="literal">CAIRO_FILL_RULE_EVEN_ODD</code></span></p></td>
|
1095
|
+
<td>Counts the total number of
|
1096
|
+
intersections, without regard to the orientation of the contour. If
|
1097
|
+
the total number of intersections is odd, the point will be
|
1098
|
+
filled.
|
1099
|
+
</td>
|
1100
|
+
</tr>
|
1101
|
+
</tbody>
|
1102
|
+
</table></div>
|
1103
|
+
</div>
|
1104
|
+
<hr>
|
1105
|
+
<div class="refsect2" title="cairo_set_fill_rule ()">
|
1106
|
+
<a name="cairo-set-fill-rule"></a><h3>cairo_set_fill_rule ()</h3>
|
1107
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_fill_rule (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1108
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> fill_rule</code></em>);</pre>
|
1109
|
+
<p>
|
1110
|
+
Set the current fill rule within the cairo context. The fill rule
|
1111
|
+
is used to determine which regions are inside or outside a complex
|
1112
|
+
(potentially self-intersecting) path. The current fill rule affects
|
1113
|
+
both <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>. See <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a> for details
|
1114
|
+
on the semantics of each available fill rule.
|
1115
|
+
</p>
|
1116
|
+
<p>
|
1117
|
+
The default fill rule is <a class="link" href="cairo-cairo-t.html#CAIRO-FILL-RULE-WINDING:CAPS"><code class="literal">CAIRO_FILL_RULE_WINDING</code></a>.
|
1118
|
+
</p>
|
1119
|
+
<div class="variablelist"><table border="0">
|
1120
|
+
<col align="left" valign="top">
|
1121
|
+
<tbody>
|
1122
|
+
<tr>
|
1123
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1124
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1125
|
+
</td>
|
1126
|
+
</tr>
|
1127
|
+
<tr>
|
1128
|
+
<td><p><span class="term"><em class="parameter"><code>fill_rule</code></em> :</span></p></td>
|
1129
|
+
<td>a fill rule, specified as a <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="type">cairo_fill_rule_t</span></a>
|
1130
|
+
</td>
|
1131
|
+
</tr>
|
1132
|
+
</tbody>
|
1133
|
+
</table></div>
|
1134
|
+
</div>
|
1135
|
+
<hr>
|
1136
|
+
<div class="refsect2" title="cairo_get_fill_rule ()">
|
1137
|
+
<a name="cairo-get-fill-rule"></a><h3>cairo_get_fill_rule ()</h3>
|
1138
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t" title="enum cairo_fill_rule_t"><span class="returnvalue">cairo_fill_rule_t</span></a> cairo_get_fill_rule (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1139
|
+
<p>
|
1140
|
+
Gets the current fill rule, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>.
|
1141
|
+
</p>
|
1142
|
+
<div class="variablelist"><table border="0">
|
1143
|
+
<col align="left" valign="top">
|
1144
|
+
<tbody>
|
1145
|
+
<tr>
|
1146
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1147
|
+
<td>a cairo context
|
1148
|
+
</td>
|
1149
|
+
</tr>
|
1150
|
+
<tr>
|
1151
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1152
|
+
<td> the current fill rule.
|
1153
|
+
</td>
|
1154
|
+
</tr>
|
1155
|
+
</tbody>
|
1156
|
+
</table></div>
|
1157
|
+
</div>
|
1158
|
+
<hr>
|
1159
|
+
<div class="refsect2" title="enum cairo_line_cap_t">
|
1160
|
+
<a name="cairo-line-cap-t"></a><h3>enum cairo_line_cap_t</h3>
|
1161
|
+
<pre class="programlisting">typedef enum _cairo_line_cap {
|
1162
|
+
CAIRO_LINE_CAP_BUTT,
|
1163
|
+
CAIRO_LINE_CAP_ROUND,
|
1164
|
+
CAIRO_LINE_CAP_SQUARE
|
1165
|
+
} cairo_line_cap_t;
|
1166
|
+
</pre>
|
1167
|
+
<p>
|
1168
|
+
Specifies how to render the endpoints of the path when stroking.
|
1169
|
+
</p>
|
1170
|
+
<p>
|
1171
|
+
The default line cap style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.
|
1172
|
+
</p>
|
1173
|
+
<div class="variablelist"><table border="0">
|
1174
|
+
<col align="left" valign="top">
|
1175
|
+
<tbody>
|
1176
|
+
<tr>
|
1177
|
+
<td><p><a name="CAIRO-LINE-CAP-BUTT:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_BUTT</code></span></p></td>
|
1178
|
+
<td>start(stop) the line exactly at the start(end) point
|
1179
|
+
</td>
|
1180
|
+
</tr>
|
1181
|
+
<tr>
|
1182
|
+
<td><p><a name="CAIRO-LINE-CAP-ROUND:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_ROUND</code></span></p></td>
|
1183
|
+
<td>use a round ending, the center of the circle is the end point
|
1184
|
+
</td>
|
1185
|
+
</tr>
|
1186
|
+
<tr>
|
1187
|
+
<td><p><a name="CAIRO-LINE-CAP-SQUARE:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></span></p></td>
|
1188
|
+
<td>use squared ending, the center of the square is the end point
|
1189
|
+
</td>
|
1190
|
+
</tr>
|
1191
|
+
</tbody>
|
1192
|
+
</table></div>
|
1193
|
+
</div>
|
1194
|
+
<hr>
|
1195
|
+
<div class="refsect2" title="cairo_set_line_cap ()">
|
1196
|
+
<a name="cairo-set-line-cap"></a><h3>cairo_set_line_cap ()</h3>
|
1197
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_line_cap (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1198
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> line_cap</code></em>);</pre>
|
1199
|
+
<p>
|
1200
|
+
Sets the current line cap style within the cairo context. See
|
1201
|
+
<a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="type">cairo_line_cap_t</span></a> for details about how the available line cap
|
1202
|
+
styles are drawn.
|
1203
|
+
</p>
|
1204
|
+
<p>
|
1205
|
+
As with the other stroke parameters, the current line cap style is
|
1206
|
+
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1207
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1208
|
+
construction.
|
1209
|
+
</p>
|
1210
|
+
<p>
|
1211
|
+
The default line cap style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a>.
|
1212
|
+
</p>
|
1213
|
+
<div class="variablelist"><table border="0">
|
1214
|
+
<col align="left" valign="top">
|
1215
|
+
<tbody>
|
1216
|
+
<tr>
|
1217
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1218
|
+
<td>a cairo context
|
1219
|
+
</td>
|
1220
|
+
</tr>
|
1221
|
+
<tr>
|
1222
|
+
<td><p><span class="term"><em class="parameter"><code>line_cap</code></em> :</span></p></td>
|
1223
|
+
<td>a line cap style
|
1224
|
+
</td>
|
1225
|
+
</tr>
|
1226
|
+
</tbody>
|
1227
|
+
</table></div>
|
1228
|
+
</div>
|
1229
|
+
<hr>
|
1230
|
+
<div class="refsect2" title="cairo_get_line_cap ()">
|
1231
|
+
<a name="cairo-get-line-cap"></a><h3>cairo_get_line_cap ()</h3>
|
1232
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t" title="enum cairo_line_cap_t"><span class="returnvalue">cairo_line_cap_t</span></a> cairo_get_line_cap (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1233
|
+
<p>
|
1234
|
+
Gets the current line cap style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>.
|
1235
|
+
</p>
|
1236
|
+
<div class="variablelist"><table border="0">
|
1237
|
+
<col align="left" valign="top">
|
1238
|
+
<tbody>
|
1239
|
+
<tr>
|
1240
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1241
|
+
<td>a cairo context
|
1242
|
+
</td>
|
1243
|
+
</tr>
|
1244
|
+
<tr>
|
1245
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1246
|
+
<td> the current line cap style.
|
1247
|
+
</td>
|
1248
|
+
</tr>
|
1249
|
+
</tbody>
|
1250
|
+
</table></div>
|
1251
|
+
</div>
|
1252
|
+
<hr>
|
1253
|
+
<div class="refsect2" title="enum cairo_line_join_t">
|
1254
|
+
<a name="cairo-line-join-t"></a><h3>enum cairo_line_join_t</h3>
|
1255
|
+
<pre class="programlisting">typedef enum _cairo_line_join {
|
1256
|
+
CAIRO_LINE_JOIN_MITER,
|
1257
|
+
CAIRO_LINE_JOIN_ROUND,
|
1258
|
+
CAIRO_LINE_JOIN_BEVEL
|
1259
|
+
} cairo_line_join_t;
|
1260
|
+
</pre>
|
1261
|
+
<p>
|
1262
|
+
Specifies how to render the junction of two lines when stroking.
|
1263
|
+
</p>
|
1264
|
+
<p>
|
1265
|
+
The default line join style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.
|
1266
|
+
</p>
|
1267
|
+
<div class="variablelist"><table border="0">
|
1268
|
+
<col align="left" valign="top">
|
1269
|
+
<tbody>
|
1270
|
+
<tr>
|
1271
|
+
<td><p><a name="CAIRO-LINE-JOIN-MITER:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_MITER</code></span></p></td>
|
1272
|
+
<td>use a sharp (angled) corner, see
|
1273
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()"><code class="function">cairo_set_miter_limit()</code></a>
|
1274
|
+
</td>
|
1275
|
+
</tr>
|
1276
|
+
<tr>
|
1277
|
+
<td><p><a name="CAIRO-LINE-JOIN-ROUND:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_ROUND</code></span></p></td>
|
1278
|
+
<td>use a rounded join, the center of the circle is the
|
1279
|
+
joint point
|
1280
|
+
</td>
|
1281
|
+
</tr>
|
1282
|
+
<tr>
|
1283
|
+
<td><p><a name="CAIRO-LINE-JOIN-BEVEL:CAPS"></a><span class="term"><code class="literal">CAIRO_LINE_JOIN_BEVEL</code></span></p></td>
|
1284
|
+
<td>use a cut-off join, the join is cut off at half
|
1285
|
+
the line width from the joint point
|
1286
|
+
</td>
|
1287
|
+
</tr>
|
1288
|
+
</tbody>
|
1289
|
+
</table></div>
|
1290
|
+
</div>
|
1291
|
+
<hr>
|
1292
|
+
<div class="refsect2" title="cairo_set_line_join ()">
|
1293
|
+
<a name="cairo-set-line-join"></a><h3>cairo_set_line_join ()</h3>
|
1294
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_line_join (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1295
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> line_join</code></em>);</pre>
|
1296
|
+
<p>
|
1297
|
+
Sets the current line join style within the cairo context. See
|
1298
|
+
<a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="type">cairo_line_join_t</span></a> for details about how the available line join
|
1299
|
+
styles are drawn.
|
1300
|
+
</p>
|
1301
|
+
<p>
|
1302
|
+
As with the other stroke parameters, the current line join style is
|
1303
|
+
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1304
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1305
|
+
construction.
|
1306
|
+
</p>
|
1307
|
+
<p>
|
1308
|
+
The default line join style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>.
|
1309
|
+
</p>
|
1310
|
+
<div class="variablelist"><table border="0">
|
1311
|
+
<col align="left" valign="top">
|
1312
|
+
<tbody>
|
1313
|
+
<tr>
|
1314
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1315
|
+
<td>a cairo context
|
1316
|
+
</td>
|
1317
|
+
</tr>
|
1318
|
+
<tr>
|
1319
|
+
<td><p><span class="term"><em class="parameter"><code>line_join</code></em> :</span></p></td>
|
1320
|
+
<td>a line join style
|
1321
|
+
</td>
|
1322
|
+
</tr>
|
1323
|
+
</tbody>
|
1324
|
+
</table></div>
|
1325
|
+
</div>
|
1326
|
+
<hr>
|
1327
|
+
<div class="refsect2" title="cairo_get_line_join ()">
|
1328
|
+
<a name="cairo-get-line-join"></a><h3>cairo_get_line_join ()</h3>
|
1329
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-join-t" title="enum cairo_line_join_t"><span class="returnvalue">cairo_line_join_t</span></a> cairo_get_line_join (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1330
|
+
<p>
|
1331
|
+
Gets the current line join style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>.
|
1332
|
+
</p>
|
1333
|
+
<div class="variablelist"><table border="0">
|
1334
|
+
<col align="left" valign="top">
|
1335
|
+
<tbody>
|
1336
|
+
<tr>
|
1337
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1338
|
+
<td>a cairo context
|
1339
|
+
</td>
|
1340
|
+
</tr>
|
1341
|
+
<tr>
|
1342
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1343
|
+
<td> the current line join style.
|
1344
|
+
</td>
|
1345
|
+
</tr>
|
1346
|
+
</tbody>
|
1347
|
+
</table></div>
|
1348
|
+
</div>
|
1349
|
+
<hr>
|
1350
|
+
<div class="refsect2" title="cairo_set_line_width ()">
|
1351
|
+
<a name="cairo-set-line-width"></a><h3>cairo_set_line_width ()</h3>
|
1352
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_line_width (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1353
|
+
<em class="parameter"><code><span class="type">double</span> width</code></em>);</pre>
|
1354
|
+
<p>
|
1355
|
+
Sets the current line width within the cairo context. The line
|
1356
|
+
width value specifies the diameter of a pen that is circular in
|
1357
|
+
user space, (though device-space pen may be an ellipse in general
|
1358
|
+
due to scaling/shear/rotation of the CTM).
|
1359
|
+
</p>
|
1360
|
+
<p>
|
1361
|
+
Note: When the description above refers to user space and CTM it
|
1362
|
+
refers to the user space and CTM in effect at the time of the
|
1363
|
+
stroking operation, not the user space and CTM in effect at the
|
1364
|
+
time of the call to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>. The simplest usage
|
1365
|
+
makes both of these spaces identical. That is, if there is no
|
1366
|
+
change to the CTM between a call to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and the
|
1367
|
+
stroking operation, then one can just pass user-space values to
|
1368
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and ignore this note.
|
1369
|
+
</p>
|
1370
|
+
<p>
|
1371
|
+
As with the other stroke parameters, the current line width is
|
1372
|
+
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1373
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1374
|
+
construction.
|
1375
|
+
</p>
|
1376
|
+
<p>
|
1377
|
+
The default line width value is 2.0.
|
1378
|
+
</p>
|
1379
|
+
<div class="variablelist"><table border="0">
|
1380
|
+
<col align="left" valign="top">
|
1381
|
+
<tbody>
|
1382
|
+
<tr>
|
1383
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1384
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1385
|
+
</td>
|
1386
|
+
</tr>
|
1387
|
+
<tr>
|
1388
|
+
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
|
1389
|
+
<td>a line width
|
1390
|
+
</td>
|
1391
|
+
</tr>
|
1392
|
+
</tbody>
|
1393
|
+
</table></div>
|
1394
|
+
</div>
|
1395
|
+
<hr>
|
1396
|
+
<div class="refsect2" title="cairo_get_line_width ()">
|
1397
|
+
<a name="cairo-get-line-width"></a><h3>cairo_get_line_width ()</h3>
|
1398
|
+
<pre class="programlisting"><span class="returnvalue">double</span> cairo_get_line_width (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1399
|
+
<p>
|
1400
|
+
This function returns the current line width value exactly as set by
|
1401
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>. Note that the value is unchanged even if
|
1402
|
+
the CTM has changed between the calls to <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a> and
|
1403
|
+
<a class="link" href="cairo-cairo-t.html#cairo-get-line-width" title="cairo_get_line_width ()"><code class="function">cairo_get_line_width()</code></a>.
|
1404
|
+
</p>
|
1405
|
+
<div class="variablelist"><table border="0">
|
1406
|
+
<col align="left" valign="top">
|
1407
|
+
<tbody>
|
1408
|
+
<tr>
|
1409
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1410
|
+
<td>a cairo context
|
1411
|
+
</td>
|
1412
|
+
</tr>
|
1413
|
+
<tr>
|
1414
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1415
|
+
<td> the current line width.
|
1416
|
+
</td>
|
1417
|
+
</tr>
|
1418
|
+
</tbody>
|
1419
|
+
</table></div>
|
1420
|
+
</div>
|
1421
|
+
<hr>
|
1422
|
+
<div class="refsect2" title="cairo_set_miter_limit ()">
|
1423
|
+
<a name="cairo-set-miter-limit"></a><h3>cairo_set_miter_limit ()</h3>
|
1424
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_miter_limit (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1425
|
+
<em class="parameter"><code><span class="type">double</span> limit</code></em>);</pre>
|
1426
|
+
<p>
|
1427
|
+
Sets the current miter limit within the cairo context.
|
1428
|
+
</p>
|
1429
|
+
<p>
|
1430
|
+
If the current line join style is set to <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-JOIN-MITER:CAPS"><code class="literal">CAIRO_LINE_JOIN_MITER</code></a>
|
1431
|
+
(see <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>), the miter limit is used to determine
|
1432
|
+
whether the lines should be joined with a bevel instead of a miter.
|
1433
|
+
Cairo divides the length of the miter by the line width.
|
1434
|
+
If the result is greater than the miter limit, the style is
|
1435
|
+
converted to a bevel.
|
1436
|
+
</p>
|
1437
|
+
<p>
|
1438
|
+
As with the other stroke parameters, the current line miter limit is
|
1439
|
+
examined by <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a>, and
|
1440
|
+
<code class="function">cairo_stroke_to_path()</code>, but does not have any effect during path
|
1441
|
+
construction.
|
1442
|
+
</p>
|
1443
|
+
<p>
|
1444
|
+
The default miter limit value is 10.0, which will convert joins
|
1445
|
+
with interior angles less than 11 degrees to bevels instead of
|
1446
|
+
miters. For reference, a miter limit of 2.0 makes the miter cutoff
|
1447
|
+
at 60 degrees, and a miter limit of 1.414 makes the cutoff at 90
|
1448
|
+
degrees.
|
1449
|
+
</p>
|
1450
|
+
<p>
|
1451
|
+
A miter limit for a desired angle can be computed as: miter limit =
|
1452
|
+
1/sin(angle/2)
|
1453
|
+
</p>
|
1454
|
+
<div class="variablelist"><table border="0">
|
1455
|
+
<col align="left" valign="top">
|
1456
|
+
<tbody>
|
1457
|
+
<tr>
|
1458
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1459
|
+
<td>a cairo context
|
1460
|
+
</td>
|
1461
|
+
</tr>
|
1462
|
+
<tr>
|
1463
|
+
<td><p><span class="term"><em class="parameter"><code>limit</code></em> :</span></p></td>
|
1464
|
+
<td>miter limit to set
|
1465
|
+
</td>
|
1466
|
+
</tr>
|
1467
|
+
</tbody>
|
1468
|
+
</table></div>
|
1469
|
+
</div>
|
1470
|
+
<hr>
|
1471
|
+
<div class="refsect2" title="cairo_get_miter_limit ()">
|
1472
|
+
<a name="cairo-get-miter-limit"></a><h3>cairo_get_miter_limit ()</h3>
|
1473
|
+
<pre class="programlisting"><span class="returnvalue">double</span> cairo_get_miter_limit (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1474
|
+
<p>
|
1475
|
+
Gets the current miter limit, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit" title="cairo_set_miter_limit ()"><code class="function">cairo_set_miter_limit()</code></a>.
|
1476
|
+
</p>
|
1477
|
+
<div class="variablelist"><table border="0">
|
1478
|
+
<col align="left" valign="top">
|
1479
|
+
<tbody>
|
1480
|
+
<tr>
|
1481
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1482
|
+
<td>a cairo context
|
1483
|
+
</td>
|
1484
|
+
</tr>
|
1485
|
+
<tr>
|
1486
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1487
|
+
<td> the current miter limit.
|
1488
|
+
</td>
|
1489
|
+
</tr>
|
1490
|
+
</tbody>
|
1491
|
+
</table></div>
|
1492
|
+
</div>
|
1493
|
+
<hr>
|
1494
|
+
<div class="refsect2" title="enum cairo_operator_t">
|
1495
|
+
<a name="cairo-operator-t"></a><h3>enum cairo_operator_t</h3>
|
1496
|
+
<pre class="programlisting">typedef enum _cairo_operator {
|
1497
|
+
CAIRO_OPERATOR_CLEAR,
|
1498
|
+
|
1499
|
+
CAIRO_OPERATOR_SOURCE,
|
1500
|
+
CAIRO_OPERATOR_OVER,
|
1501
|
+
CAIRO_OPERATOR_IN,
|
1502
|
+
CAIRO_OPERATOR_OUT,
|
1503
|
+
CAIRO_OPERATOR_ATOP,
|
1504
|
+
|
1505
|
+
CAIRO_OPERATOR_DEST,
|
1506
|
+
CAIRO_OPERATOR_DEST_OVER,
|
1507
|
+
CAIRO_OPERATOR_DEST_IN,
|
1508
|
+
CAIRO_OPERATOR_DEST_OUT,
|
1509
|
+
CAIRO_OPERATOR_DEST_ATOP,
|
1510
|
+
|
1511
|
+
CAIRO_OPERATOR_XOR,
|
1512
|
+
CAIRO_OPERATOR_ADD,
|
1513
|
+
CAIRO_OPERATOR_SATURATE,
|
1514
|
+
|
1515
|
+
CAIRO_OPERATOR_MULTIPLY,
|
1516
|
+
CAIRO_OPERATOR_SCREEN,
|
1517
|
+
CAIRO_OPERATOR_OVERLAY,
|
1518
|
+
CAIRO_OPERATOR_DARKEN,
|
1519
|
+
CAIRO_OPERATOR_LIGHTEN,
|
1520
|
+
CAIRO_OPERATOR_COLOR_DODGE,
|
1521
|
+
CAIRO_OPERATOR_COLOR_BURN,
|
1522
|
+
CAIRO_OPERATOR_HARD_LIGHT,
|
1523
|
+
CAIRO_OPERATOR_SOFT_LIGHT,
|
1524
|
+
CAIRO_OPERATOR_DIFFERENCE,
|
1525
|
+
CAIRO_OPERATOR_EXCLUSION,
|
1526
|
+
CAIRO_OPERATOR_HSL_HUE,
|
1527
|
+
CAIRO_OPERATOR_HSL_SATURATION,
|
1528
|
+
CAIRO_OPERATOR_HSL_COLOR,
|
1529
|
+
CAIRO_OPERATOR_HSL_LUMINOSITY
|
1530
|
+
} cairo_operator_t;
|
1531
|
+
</pre>
|
1532
|
+
<p>
|
1533
|
+
<a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> is used to set the compositing operator for all cairo
|
1534
|
+
drawing operations.
|
1535
|
+
</p>
|
1536
|
+
<p>
|
1537
|
+
The default operator is <a class="link" href="cairo-cairo-t.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.
|
1538
|
+
</p>
|
1539
|
+
<p>
|
1540
|
+
The operators marked as <em class="firstterm">unbounded</em> modify their
|
1541
|
+
destination even outside of the mask layer (that is, their effect is not
|
1542
|
+
bound by the mask layer). However, their effect can still be limited by
|
1543
|
+
way of clipping.
|
1544
|
+
</p>
|
1545
|
+
<p>
|
1546
|
+
To keep things simple, the operator descriptions here
|
1547
|
+
document the behavior for when both source and destination are either fully
|
1548
|
+
transparent or fully opaque. The actual implementation works for
|
1549
|
+
translucent layers too.
|
1550
|
+
For a more detailed explanation of the effects of each operator, including
|
1551
|
+
the mathematical definitions, see
|
1552
|
+
<a class="ulink" href="http://cairographics.org/operators/" target="_top">http://cairographics.org/operators/</a>.
|
1553
|
+
</p>
|
1554
|
+
<div class="variablelist"><table border="0">
|
1555
|
+
<col align="left" valign="top">
|
1556
|
+
<tbody>
|
1557
|
+
<tr>
|
1558
|
+
<td><p><a name="CAIRO-OPERATOR-CLEAR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_CLEAR</code></span></p></td>
|
1559
|
+
<td>clear destination layer (bounded)
|
1560
|
+
</td>
|
1561
|
+
</tr>
|
1562
|
+
<tr>
|
1563
|
+
<td><p><a name="CAIRO-OPERATOR-SOURCE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SOURCE</code></span></p></td>
|
1564
|
+
<td>replace destination layer (bounded)
|
1565
|
+
</td>
|
1566
|
+
</tr>
|
1567
|
+
<tr>
|
1568
|
+
<td><p><a name="CAIRO-OPERATOR-OVER:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OVER</code></span></p></td>
|
1569
|
+
<td>draw source layer on top of destination layer
|
1570
|
+
(bounded)
|
1571
|
+
</td>
|
1572
|
+
</tr>
|
1573
|
+
<tr>
|
1574
|
+
<td><p><a name="CAIRO-OPERATOR-IN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_IN</code></span></p></td>
|
1575
|
+
<td>draw source where there was destination content
|
1576
|
+
(unbounded)
|
1577
|
+
</td>
|
1578
|
+
</tr>
|
1579
|
+
<tr>
|
1580
|
+
<td><p><a name="CAIRO-OPERATOR-OUT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OUT</code></span></p></td>
|
1581
|
+
<td>draw source where there was no destination
|
1582
|
+
content (unbounded)
|
1583
|
+
</td>
|
1584
|
+
</tr>
|
1585
|
+
<tr>
|
1586
|
+
<td><p><a name="CAIRO-OPERATOR-ATOP:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_ATOP</code></span></p></td>
|
1587
|
+
<td>draw source on top of destination content and
|
1588
|
+
only there
|
1589
|
+
</td>
|
1590
|
+
</tr>
|
1591
|
+
<tr>
|
1592
|
+
<td><p><a name="CAIRO-OPERATOR-DEST:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST</code></span></p></td>
|
1593
|
+
<td>ignore the source
|
1594
|
+
</td>
|
1595
|
+
</tr>
|
1596
|
+
<tr>
|
1597
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-OVER:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_OVER</code></span></p></td>
|
1598
|
+
<td>draw destination on top of source
|
1599
|
+
</td>
|
1600
|
+
</tr>
|
1601
|
+
<tr>
|
1602
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-IN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_IN</code></span></p></td>
|
1603
|
+
<td>leave destination only where there was
|
1604
|
+
source content (unbounded)
|
1605
|
+
</td>
|
1606
|
+
</tr>
|
1607
|
+
<tr>
|
1608
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-OUT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_OUT</code></span></p></td>
|
1609
|
+
<td>leave destination only where there was no
|
1610
|
+
source content
|
1611
|
+
</td>
|
1612
|
+
</tr>
|
1613
|
+
<tr>
|
1614
|
+
<td><p><a name="CAIRO-OPERATOR-DEST-ATOP:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DEST_ATOP</code></span></p></td>
|
1615
|
+
<td>leave destination on top of source content
|
1616
|
+
and only there (unbounded)
|
1617
|
+
</td>
|
1618
|
+
</tr>
|
1619
|
+
<tr>
|
1620
|
+
<td><p><a name="CAIRO-OPERATOR-XOR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_XOR</code></span></p></td>
|
1621
|
+
<td>source and destination are shown where there is only
|
1622
|
+
one of them
|
1623
|
+
</td>
|
1624
|
+
</tr>
|
1625
|
+
<tr>
|
1626
|
+
<td><p><a name="CAIRO-OPERATOR-ADD:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_ADD</code></span></p></td>
|
1627
|
+
<td>source and destination layers are accumulated
|
1628
|
+
</td>
|
1629
|
+
</tr>
|
1630
|
+
<tr>
|
1631
|
+
<td><p><a name="CAIRO-OPERATOR-SATURATE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SATURATE</code></span></p></td>
|
1632
|
+
<td>like over, but assuming source and dest are
|
1633
|
+
disjoint geometries
|
1634
|
+
</td>
|
1635
|
+
</tr>
|
1636
|
+
<tr>
|
1637
|
+
<td><p><a name="CAIRO-OPERATOR-MULTIPLY:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_MULTIPLY</code></span></p></td>
|
1638
|
+
<td>source and destination layers are multiplied.
|
1639
|
+
This causes the result to be at least as dark as the darker inputs.
|
1640
|
+
</td>
|
1641
|
+
</tr>
|
1642
|
+
<tr>
|
1643
|
+
<td><p><a name="CAIRO-OPERATOR-SCREEN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SCREEN</code></span></p></td>
|
1644
|
+
<td>source and destination are complemented and
|
1645
|
+
multiplied. This causes the result to be at least as light as the lighter
|
1646
|
+
inputs.
|
1647
|
+
</td>
|
1648
|
+
</tr>
|
1649
|
+
<tr>
|
1650
|
+
<td><p><a name="CAIRO-OPERATOR-OVERLAY:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_OVERLAY</code></span></p></td>
|
1651
|
+
<td>multiplies or screens, depending on the
|
1652
|
+
lightness of the destination color.
|
1653
|
+
</td>
|
1654
|
+
</tr>
|
1655
|
+
<tr>
|
1656
|
+
<td><p><a name="CAIRO-OPERATOR-DARKEN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DARKEN</code></span></p></td>
|
1657
|
+
<td>replaces the destination with the source if it
|
1658
|
+
is darker, otherwise keeps the source.
|
1659
|
+
</td>
|
1660
|
+
</tr>
|
1661
|
+
<tr>
|
1662
|
+
<td><p><a name="CAIRO-OPERATOR-LIGHTEN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_LIGHTEN</code></span></p></td>
|
1663
|
+
<td>replaces the destination with the source if it
|
1664
|
+
is lighter, otherwise keeps the source.
|
1665
|
+
</td>
|
1666
|
+
</tr>
|
1667
|
+
<tr>
|
1668
|
+
<td><p><a name="CAIRO-OPERATOR-COLOR-DODGE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_COLOR_DODGE</code></span></p></td>
|
1669
|
+
<td>brightens the destination color to reflect
|
1670
|
+
the source color.
|
1671
|
+
</td>
|
1672
|
+
</tr>
|
1673
|
+
<tr>
|
1674
|
+
<td><p><a name="CAIRO-OPERATOR-COLOR-BURN:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_COLOR_BURN</code></span></p></td>
|
1675
|
+
<td>darkens the destination color to reflect
|
1676
|
+
the source color.
|
1677
|
+
</td>
|
1678
|
+
</tr>
|
1679
|
+
<tr>
|
1680
|
+
<td><p><a name="CAIRO-OPERATOR-HARD-LIGHT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HARD_LIGHT</code></span></p></td>
|
1681
|
+
<td>Multiplies or screens, dependant on source
|
1682
|
+
color.
|
1683
|
+
</td>
|
1684
|
+
</tr>
|
1685
|
+
<tr>
|
1686
|
+
<td><p><a name="CAIRO-OPERATOR-SOFT-LIGHT:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_SOFT_LIGHT</code></span></p></td>
|
1687
|
+
<td>Darkens or lightens, dependant on source
|
1688
|
+
color.
|
1689
|
+
</td>
|
1690
|
+
</tr>
|
1691
|
+
<tr>
|
1692
|
+
<td><p><a name="CAIRO-OPERATOR-DIFFERENCE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_DIFFERENCE</code></span></p></td>
|
1693
|
+
<td>Takes the difference of the source and
|
1694
|
+
destination color.
|
1695
|
+
</td>
|
1696
|
+
</tr>
|
1697
|
+
<tr>
|
1698
|
+
<td><p><a name="CAIRO-OPERATOR-EXCLUSION:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_EXCLUSION</code></span></p></td>
|
1699
|
+
<td>Produces an effect similar to difference, but
|
1700
|
+
with lower contrast.
|
1701
|
+
</td>
|
1702
|
+
</tr>
|
1703
|
+
<tr>
|
1704
|
+
<td><p><a name="CAIRO-OPERATOR-HSL-HUE:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_HUE</code></span></p></td>
|
1705
|
+
<td>Creates a color with the hue of the source
|
1706
|
+
and the saturation and luminosity of the target.
|
1707
|
+
</td>
|
1708
|
+
</tr>
|
1709
|
+
<tr>
|
1710
|
+
<td><p><a name="CAIRO-OPERATOR-HSL-SATURATION:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_SATURATION</code></span></p></td>
|
1711
|
+
<td>Creates a color with the saturation
|
1712
|
+
of the source and the hue and luminosity of the target. Painting with
|
1713
|
+
this mode onto a gray area prduces no change.
|
1714
|
+
</td>
|
1715
|
+
</tr>
|
1716
|
+
<tr>
|
1717
|
+
<td><p><a name="CAIRO-OPERATOR-HSL-COLOR:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_COLOR</code></span></p></td>
|
1718
|
+
<td>Creates a color with the hue and saturation
|
1719
|
+
of the source and the luminosity of the target. This preserves the gray
|
1720
|
+
levels of the target and is useful for coloring monochrome images or
|
1721
|
+
tinting color images.
|
1722
|
+
</td>
|
1723
|
+
</tr>
|
1724
|
+
<tr>
|
1725
|
+
<td><p><a name="CAIRO-OPERATOR-HSL-LUMINOSITY:CAPS"></a><span class="term"><code class="literal">CAIRO_OPERATOR_HSL_LUMINOSITY</code></span></p></td>
|
1726
|
+
<td>Creates a color with the luminosity of
|
1727
|
+
the source and the hue and saturation of the target. This produces an
|
1728
|
+
inverse effect to <em class="parameter"><code>CAIRO_OPERATOR_HSL_COLOR</code></em>.
|
1729
|
+
</td>
|
1730
|
+
</tr>
|
1731
|
+
</tbody>
|
1732
|
+
</table></div>
|
1733
|
+
</div>
|
1734
|
+
<hr>
|
1735
|
+
<div class="refsect2" title="cairo_set_operator ()">
|
1736
|
+
<a name="cairo-set-operator"></a><h3>cairo_set_operator ()</h3>
|
1737
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_operator (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1738
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> op</code></em>);</pre>
|
1739
|
+
<p>
|
1740
|
+
Sets the compositing operator to be used for all drawing
|
1741
|
+
operations. See <a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a> for details on the semantics of
|
1742
|
+
each available compositing operator.
|
1743
|
+
</p>
|
1744
|
+
<p>
|
1745
|
+
The default operator is <a class="link" href="cairo-cairo-t.html#CAIRO-OPERATOR-OVER:CAPS"><code class="literal">CAIRO_OPERATOR_OVER</code></a>.
|
1746
|
+
</p>
|
1747
|
+
<div class="variablelist"><table border="0">
|
1748
|
+
<col align="left" valign="top">
|
1749
|
+
<tbody>
|
1750
|
+
<tr>
|
1751
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1752
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1753
|
+
</td>
|
1754
|
+
</tr>
|
1755
|
+
<tr>
|
1756
|
+
<td><p><span class="term"><em class="parameter"><code>op</code></em> :</span></p></td>
|
1757
|
+
<td>a compositing operator, specified as a <a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="type">cairo_operator_t</span></a>
|
1758
|
+
</td>
|
1759
|
+
</tr>
|
1760
|
+
</tbody>
|
1761
|
+
</table></div>
|
1762
|
+
</div>
|
1763
|
+
<hr>
|
1764
|
+
<div class="refsect2" title="cairo_get_operator ()">
|
1765
|
+
<a name="cairo-get-operator"></a><h3>cairo_get_operator ()</h3>
|
1766
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-operator-t" title="enum cairo_operator_t"><span class="returnvalue">cairo_operator_t</span></a> cairo_get_operator (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1767
|
+
<p>
|
1768
|
+
Gets the current compositing operator for a cairo context.
|
1769
|
+
</p>
|
1770
|
+
<div class="variablelist"><table border="0">
|
1771
|
+
<col align="left" valign="top">
|
1772
|
+
<tbody>
|
1773
|
+
<tr>
|
1774
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1775
|
+
<td>a cairo context
|
1776
|
+
</td>
|
1777
|
+
</tr>
|
1778
|
+
<tr>
|
1779
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1780
|
+
<td> the current compositing operator.
|
1781
|
+
</td>
|
1782
|
+
</tr>
|
1783
|
+
</tbody>
|
1784
|
+
</table></div>
|
1785
|
+
</div>
|
1786
|
+
<hr>
|
1787
|
+
<div class="refsect2" title="cairo_set_tolerance ()">
|
1788
|
+
<a name="cairo-set-tolerance"></a><h3>cairo_set_tolerance ()</h3>
|
1789
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_set_tolerance (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1790
|
+
<em class="parameter"><code><span class="type">double</span> tolerance</code></em>);</pre>
|
1791
|
+
<p>
|
1792
|
+
Sets the tolerance used when converting paths into trapezoids.
|
1793
|
+
Curved segments of the path will be subdivided until the maximum
|
1794
|
+
deviation between the original path and the polygonal approximation
|
1795
|
+
is less than <em class="parameter"><code>tolerance</code></em>. The default value is 0.1. A larger
|
1796
|
+
value will give better performance, a smaller value, better
|
1797
|
+
appearance. (Reducing the value from the default value of 0.1
|
1798
|
+
is unlikely to improve appearance significantly.) The accuracy of paths
|
1799
|
+
within Cairo is limited by the precision of its internal arithmetic, and
|
1800
|
+
the prescribed <em class="parameter"><code>tolerance</code></em> is restricted to the smallest
|
1801
|
+
representable internal value.
|
1802
|
+
</p>
|
1803
|
+
<div class="variablelist"><table border="0">
|
1804
|
+
<col align="left" valign="top">
|
1805
|
+
<tbody>
|
1806
|
+
<tr>
|
1807
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1808
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
1809
|
+
</td>
|
1810
|
+
</tr>
|
1811
|
+
<tr>
|
1812
|
+
<td><p><span class="term"><em class="parameter"><code>tolerance</code></em> :</span></p></td>
|
1813
|
+
<td>the tolerance, in device units (typically pixels)
|
1814
|
+
</td>
|
1815
|
+
</tr>
|
1816
|
+
</tbody>
|
1817
|
+
</table></div>
|
1818
|
+
</div>
|
1819
|
+
<hr>
|
1820
|
+
<div class="refsect2" title="cairo_get_tolerance ()">
|
1821
|
+
<a name="cairo-get-tolerance"></a><h3>cairo_get_tolerance ()</h3>
|
1822
|
+
<pre class="programlisting"><span class="returnvalue">double</span> cairo_get_tolerance (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1823
|
+
<p>
|
1824
|
+
Gets the current tolerance value, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance" title="cairo_set_tolerance ()"><code class="function">cairo_set_tolerance()</code></a>.
|
1825
|
+
</p>
|
1826
|
+
<div class="variablelist"><table border="0">
|
1827
|
+
<col align="left" valign="top">
|
1828
|
+
<tbody>
|
1829
|
+
<tr>
|
1830
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1831
|
+
<td>a cairo context
|
1832
|
+
</td>
|
1833
|
+
</tr>
|
1834
|
+
<tr>
|
1835
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1836
|
+
<td> the current tolerance value.
|
1837
|
+
</td>
|
1838
|
+
</tr>
|
1839
|
+
</tbody>
|
1840
|
+
</table></div>
|
1841
|
+
</div>
|
1842
|
+
<hr>
|
1843
|
+
<div class="refsect2" title="cairo_clip ()">
|
1844
|
+
<a name="cairo-clip"></a><h3>cairo_clip ()</h3>
|
1845
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_clip (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1846
|
+
<p>
|
1847
|
+
Establishes a new clip region by intersecting the current clip
|
1848
|
+
region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>
|
1849
|
+
and according to the current fill rule (see <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>).
|
1850
|
+
</p>
|
1851
|
+
<p>
|
1852
|
+
After <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, the current path will be cleared from the cairo
|
1853
|
+
context.
|
1854
|
+
</p>
|
1855
|
+
<p>
|
1856
|
+
The current clip region affects all drawing operations by
|
1857
|
+
effectively masking out any changes to the surface that are outside
|
1858
|
+
the current clip region.
|
1859
|
+
</p>
|
1860
|
+
<p>
|
1861
|
+
Calling <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> can only make the clip region smaller, never
|
1862
|
+
larger. But the current clip is part of the graphics state, so a
|
1863
|
+
temporary restriction of the clip region can be achieved by
|
1864
|
+
calling <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> within a <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
|
1865
|
+
pair. The only other means of increasing the size of the clip
|
1866
|
+
region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a>.
|
1867
|
+
</p>
|
1868
|
+
<div class="variablelist"><table border="0">
|
1869
|
+
<col align="left" valign="top">
|
1870
|
+
<tbody><tr>
|
1871
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1872
|
+
<td>a cairo context
|
1873
|
+
</td>
|
1874
|
+
</tr></tbody>
|
1875
|
+
</table></div>
|
1876
|
+
</div>
|
1877
|
+
<hr>
|
1878
|
+
<div class="refsect2" title="cairo_clip_preserve ()">
|
1879
|
+
<a name="cairo-clip-preserve"></a><h3>cairo_clip_preserve ()</h3>
|
1880
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_clip_preserve (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
1881
|
+
<p>
|
1882
|
+
Establishes a new clip region by intersecting the current clip
|
1883
|
+
region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>
|
1884
|
+
and according to the current fill rule (see <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a>).
|
1885
|
+
</p>
|
1886
|
+
<p>
|
1887
|
+
Unlike <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> preserves the path within
|
1888
|
+
the cairo context.
|
1889
|
+
</p>
|
1890
|
+
<p>
|
1891
|
+
The current clip region affects all drawing operations by
|
1892
|
+
effectively masking out any changes to the surface that are outside
|
1893
|
+
the current clip region.
|
1894
|
+
</p>
|
1895
|
+
<p>
|
1896
|
+
Calling <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> can only make the clip region smaller, never
|
1897
|
+
larger. But the current clip is part of the graphics state, so a
|
1898
|
+
temporary restriction of the clip region can be achieved by
|
1899
|
+
calling <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a> within a <a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a>/<a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a>
|
1900
|
+
pair. The only other means of increasing the size of the clip
|
1901
|
+
region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a>.
|
1902
|
+
</p>
|
1903
|
+
<div class="variablelist"><table border="0">
|
1904
|
+
<col align="left" valign="top">
|
1905
|
+
<tbody><tr>
|
1906
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1907
|
+
<td>a cairo context
|
1908
|
+
</td>
|
1909
|
+
</tr></tbody>
|
1910
|
+
</table></div>
|
1911
|
+
</div>
|
1912
|
+
<hr>
|
1913
|
+
<div class="refsect2" title="cairo_clip_extents ()">
|
1914
|
+
<a name="cairo-clip-extents"></a><h3>cairo_clip_extents ()</h3>
|
1915
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_clip_extents (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1916
|
+
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
|
1917
|
+
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
|
1918
|
+
<em class="parameter"><code><span class="type">double</span> *x2</code></em>,
|
1919
|
+
<em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
|
1920
|
+
<p>
|
1921
|
+
Computes a bounding box in user coordinates covering the area inside the
|
1922
|
+
current clip.
|
1923
|
+
</p>
|
1924
|
+
<div class="variablelist"><table border="0">
|
1925
|
+
<col align="left" valign="top">
|
1926
|
+
<tbody>
|
1927
|
+
<tr>
|
1928
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1929
|
+
<td>a cairo context
|
1930
|
+
</td>
|
1931
|
+
</tr>
|
1932
|
+
<tr>
|
1933
|
+
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
|
1934
|
+
<td>left of the resulting extents
|
1935
|
+
</td>
|
1936
|
+
</tr>
|
1937
|
+
<tr>
|
1938
|
+
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
|
1939
|
+
<td>top of the resulting extents
|
1940
|
+
</td>
|
1941
|
+
</tr>
|
1942
|
+
<tr>
|
1943
|
+
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
|
1944
|
+
<td>right of the resulting extents
|
1945
|
+
</td>
|
1946
|
+
</tr>
|
1947
|
+
<tr>
|
1948
|
+
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
|
1949
|
+
<td>bottom of the resulting extents
|
1950
|
+
</td>
|
1951
|
+
</tr>
|
1952
|
+
</tbody>
|
1953
|
+
</table></div>
|
1954
|
+
<p class="since">Since 1.4</p>
|
1955
|
+
</div>
|
1956
|
+
<hr>
|
1957
|
+
<div class="refsect2" title="cairo_in_clip ()">
|
1958
|
+
<a name="cairo-in-clip"></a><h3>cairo_in_clip ()</h3>
|
1959
|
+
<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_in_clip (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
1960
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
1961
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
|
1962
|
+
<p>
|
1963
|
+
Tests whether the given point is inside the area that would be
|
1964
|
+
visible through the current clip, i.e. the area that would be filled by
|
1965
|
+
a <a class="link" href="cairo-cairo-t.html#cairo-paint" title="cairo_paint ()"><code class="function">cairo_paint()</code></a> operation.
|
1966
|
+
</p>
|
1967
|
+
<p>
|
1968
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>, and <a class="link" href="cairo-cairo-t.html#cairo-clip-preserve" title="cairo_clip_preserve ()"><code class="function">cairo_clip_preserve()</code></a>.
|
1969
|
+
</p>
|
1970
|
+
<div class="variablelist"><table border="0">
|
1971
|
+
<col align="left" valign="top">
|
1972
|
+
<tbody>
|
1973
|
+
<tr>
|
1974
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
1975
|
+
<td>a cairo context
|
1976
|
+
</td>
|
1977
|
+
</tr>
|
1978
|
+
<tr>
|
1979
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
1980
|
+
<td>X coordinate of the point to test
|
1981
|
+
</td>
|
1982
|
+
</tr>
|
1983
|
+
<tr>
|
1984
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
1985
|
+
<td>Y coordinate of the point to test
|
1986
|
+
</td>
|
1987
|
+
</tr>
|
1988
|
+
<tr>
|
1989
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1990
|
+
<td> A non-zero value if the point is inside, or zero if
|
1991
|
+
outside.
|
1992
|
+
|
1993
|
+
</td>
|
1994
|
+
</tr>
|
1995
|
+
</tbody>
|
1996
|
+
</table></div>
|
1997
|
+
<p class="since">Since 1.10</p>
|
1998
|
+
</div>
|
1999
|
+
<hr>
|
2000
|
+
<div class="refsect2" title="cairo_reset_clip ()">
|
2001
|
+
<a name="cairo-reset-clip"></a><h3>cairo_reset_clip ()</h3>
|
2002
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_reset_clip (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2003
|
+
<p>
|
2004
|
+
Reset the current clip region to its original, unrestricted
|
2005
|
+
state. That is, set the clip region to an infinitely large shape
|
2006
|
+
containing the target surface. Equivalently, if infinity is too
|
2007
|
+
hard to grasp, one can imagine the clip region being reset to the
|
2008
|
+
exact bounds of the target surface.
|
2009
|
+
</p>
|
2010
|
+
<p>
|
2011
|
+
Note that code meant to be reusable should not call
|
2012
|
+
<a class="link" href="cairo-cairo-t.html#cairo-reset-clip" title="cairo_reset_clip ()"><code class="function">cairo_reset_clip()</code></a> as it will cause results unexpected by
|
2013
|
+
higher-level code which calls <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a>. Consider using
|
2014
|
+
<a class="link" href="cairo-cairo-t.html#cairo-save" title="cairo_save ()"><code class="function">cairo_save()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-restore" title="cairo_restore ()"><code class="function">cairo_restore()</code></a> around <a class="link" href="cairo-cairo-t.html#cairo-clip" title="cairo_clip ()"><code class="function">cairo_clip()</code></a> as a more
|
2015
|
+
robust means of temporarily restricting the clip region.
|
2016
|
+
</p>
|
2017
|
+
<div class="variablelist"><table border="0">
|
2018
|
+
<col align="left" valign="top">
|
2019
|
+
<tbody><tr>
|
2020
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2021
|
+
<td>a cairo context
|
2022
|
+
</td>
|
2023
|
+
</tr></tbody>
|
2024
|
+
</table></div>
|
2025
|
+
</div>
|
2026
|
+
<hr>
|
2027
|
+
<div class="refsect2" title="cairo_rectangle_t">
|
2028
|
+
<a name="cairo-rectangle-t"></a><h3>cairo_rectangle_t</h3>
|
2029
|
+
<pre class="programlisting">typedef struct {
|
2030
|
+
double x, y, width, height;
|
2031
|
+
} cairo_rectangle_t;
|
2032
|
+
</pre>
|
2033
|
+
<p>
|
2034
|
+
A data structure for holding a rectangle.
|
2035
|
+
</p>
|
2036
|
+
<div class="variablelist"><table border="0">
|
2037
|
+
<col align="left" valign="top">
|
2038
|
+
<tbody>
|
2039
|
+
<tr>
|
2040
|
+
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.x"></a>x</code></em>;</span></p></td>
|
2041
|
+
<td>X coordinate of the left side of the rectangle
|
2042
|
+
</td>
|
2043
|
+
</tr>
|
2044
|
+
<tr>
|
2045
|
+
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.y"></a>y</code></em>;</span></p></td>
|
2046
|
+
<td>Y coordinate of the the top side of the rectangle
|
2047
|
+
</td>
|
2048
|
+
</tr>
|
2049
|
+
<tr>
|
2050
|
+
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.width"></a>width</code></em>;</span></p></td>
|
2051
|
+
<td>width of the rectangle
|
2052
|
+
</td>
|
2053
|
+
</tr>
|
2054
|
+
<tr>
|
2055
|
+
<td><p><span class="term"><span class="type">double</span> <em class="structfield"><code><a name="cairo-rectangle-t.height"></a>height</code></em>;</span></p></td>
|
2056
|
+
<td>height of the rectangle
|
2057
|
+
</td>
|
2058
|
+
</tr>
|
2059
|
+
</tbody>
|
2060
|
+
</table></div>
|
2061
|
+
<p class="since">Since 1.4</p>
|
2062
|
+
</div>
|
2063
|
+
<hr>
|
2064
|
+
<div class="refsect2" title="cairo_rectangle_list_t">
|
2065
|
+
<a name="cairo-rectangle-list-t"></a><h3>cairo_rectangle_list_t</h3>
|
2066
|
+
<pre class="programlisting">typedef struct {
|
2067
|
+
cairo_status_t status;
|
2068
|
+
cairo_rectangle_t *rectangles;
|
2069
|
+
int num_rectangles;
|
2070
|
+
} cairo_rectangle_list_t;
|
2071
|
+
</pre>
|
2072
|
+
<p>
|
2073
|
+
A data structure for holding a dynamically allocated
|
2074
|
+
array of rectangles.
|
2075
|
+
</p>
|
2076
|
+
<div class="variablelist"><table border="0">
|
2077
|
+
<col align="left" valign="top">
|
2078
|
+
<tbody>
|
2079
|
+
<tr>
|
2080
|
+
<td><p><span class="term"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="type">cairo_status_t</span></a> <em class="structfield"><code><a name="cairo-rectangle-list-t.status"></a>status</code></em>;</span></p></td>
|
2081
|
+
<td>Error status of the rectangle list
|
2082
|
+
</td>
|
2083
|
+
</tr>
|
2084
|
+
<tr>
|
2085
|
+
<td><p><span class="term"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-t" title="cairo_rectangle_t"><span class="type">cairo_rectangle_t</span></a> *<em class="structfield"><code><a name="cairo-rectangle-list-t.rectangles"></a>rectangles</code></em>;</span></p></td>
|
2086
|
+
<td>Array containing the rectangles
|
2087
|
+
</td>
|
2088
|
+
</tr>
|
2089
|
+
<tr>
|
2090
|
+
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="cairo-rectangle-list-t.num-rectangles"></a>num_rectangles</code></em>;</span></p></td>
|
2091
|
+
<td>Number of rectangles in this list
|
2092
|
+
</td>
|
2093
|
+
</tr>
|
2094
|
+
</tbody>
|
2095
|
+
</table></div>
|
2096
|
+
<p class="since">Since 1.4</p>
|
2097
|
+
</div>
|
2098
|
+
<hr>
|
2099
|
+
<div class="refsect2" title="cairo_rectangle_list_destroy ()">
|
2100
|
+
<a name="cairo-rectangle-list-destroy"></a><h3>cairo_rectangle_list_destroy ()</h3>
|
2101
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_rectangle_list_destroy (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="type">cairo_rectangle_list_t</span></a> *rectangle_list</code></em>);</pre>
|
2102
|
+
<p>
|
2103
|
+
Unconditionally frees <em class="parameter"><code>rectangle_list</code></em> and all associated
|
2104
|
+
references. After this call, the <em class="parameter"><code>rectangle_list</code></em> pointer must not
|
2105
|
+
be dereferenced.
|
2106
|
+
</p>
|
2107
|
+
<div class="variablelist"><table border="0">
|
2108
|
+
<col align="left" valign="top">
|
2109
|
+
<tbody><tr>
|
2110
|
+
<td><p><span class="term"><em class="parameter"><code>rectangle_list</code></em> :</span></p></td>
|
2111
|
+
<td>a rectangle list, as obtained from <code class="function">cairo_copy_clip_rectangles()</code>
|
2112
|
+
</td>
|
2113
|
+
</tr></tbody>
|
2114
|
+
</table></div>
|
2115
|
+
<p class="since">Since 1.4</p>
|
2116
|
+
</div>
|
2117
|
+
<hr>
|
2118
|
+
<div class="refsect2" title="cairo_copy_clip_rectangle_list ()">
|
2119
|
+
<a name="cairo-copy-clip-rectangle-list"></a><h3>cairo_copy_clip_rectangle_list ()</h3>
|
2120
|
+
<pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t" title="cairo_rectangle_list_t"><span class="returnvalue">cairo_rectangle_list_t</span></a> * cairo_copy_clip_rectangle_list (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2121
|
+
<p>
|
2122
|
+
Gets the current clip region as a list of rectangles in user coordinates.
|
2123
|
+
Never returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
|
2124
|
+
</p>
|
2125
|
+
<p>
|
2126
|
+
The status in the list may be <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"><code class="literal">CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</code></a> to
|
2127
|
+
indicate that the clip region cannot be represented as a list of
|
2128
|
+
user-space rectangles. The status may have other values to indicate
|
2129
|
+
other errors.
|
2130
|
+
</p>
|
2131
|
+
<div class="variablelist"><table border="0">
|
2132
|
+
<col align="left" valign="top">
|
2133
|
+
<tbody>
|
2134
|
+
<tr>
|
2135
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2136
|
+
<td>a cairo context
|
2137
|
+
</td>
|
2138
|
+
</tr>
|
2139
|
+
<tr>
|
2140
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2141
|
+
<td> the current clip region as a list of rectangles in user coordinates,
|
2142
|
+
which should be destroyed using <a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-destroy" title="cairo_rectangle_list_destroy ()"><code class="function">cairo_rectangle_list_destroy()</code></a>.
|
2143
|
+
|
2144
|
+
</td>
|
2145
|
+
</tr>
|
2146
|
+
</tbody>
|
2147
|
+
</table></div>
|
2148
|
+
<p class="since">Since 1.4</p>
|
2149
|
+
</div>
|
2150
|
+
<hr>
|
2151
|
+
<div class="refsect2" title="cairo_fill ()">
|
2152
|
+
<a name="cairo-fill"></a><h3>cairo_fill ()</h3>
|
2153
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_fill (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2154
|
+
<p>
|
2155
|
+
A drawing operator that fills the current path according to the
|
2156
|
+
current fill rule, (each sub-path is implicitly closed before being
|
2157
|
+
filled). After <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, the current path will be cleared from
|
2158
|
+
the cairo context. See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and
|
2159
|
+
<a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.
|
2160
|
+
</p>
|
2161
|
+
<div class="variablelist"><table border="0">
|
2162
|
+
<col align="left" valign="top">
|
2163
|
+
<tbody><tr>
|
2164
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2165
|
+
<td>a cairo context
|
2166
|
+
</td>
|
2167
|
+
</tr></tbody>
|
2168
|
+
</table></div>
|
2169
|
+
</div>
|
2170
|
+
<hr>
|
2171
|
+
<div class="refsect2" title="cairo_fill_preserve ()">
|
2172
|
+
<a name="cairo-fill-preserve"></a><h3>cairo_fill_preserve ()</h3>
|
2173
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_fill_preserve (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2174
|
+
<p>
|
2175
|
+
A drawing operator that fills the current path according to the
|
2176
|
+
current fill rule, (each sub-path is implicitly closed before being
|
2177
|
+
filled). Unlike <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a> preserves the
|
2178
|
+
path within the cairo context.
|
2179
|
+
</p>
|
2180
|
+
<p>
|
2181
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>.
|
2182
|
+
</p>
|
2183
|
+
<div class="variablelist"><table border="0">
|
2184
|
+
<col align="left" valign="top">
|
2185
|
+
<tbody><tr>
|
2186
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2187
|
+
<td>a cairo context
|
2188
|
+
</td>
|
2189
|
+
</tr></tbody>
|
2190
|
+
</table></div>
|
2191
|
+
</div>
|
2192
|
+
<hr>
|
2193
|
+
<div class="refsect2" title="cairo_fill_extents ()">
|
2194
|
+
<a name="cairo-fill-extents"></a><h3>cairo_fill_extents ()</h3>
|
2195
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_fill_extents (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2196
|
+
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
|
2197
|
+
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
|
2198
|
+
<em class="parameter"><code><span class="type">double</span> *x2</code></em>,
|
2199
|
+
<em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
|
2200
|
+
<p>
|
2201
|
+
Computes a bounding box in user coordinates covering the area that
|
2202
|
+
would be affected, (the "inked" area), by a <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> operation
|
2203
|
+
given the current path and fill parameters. If the current path is
|
2204
|
+
empty, returns an empty rectangle ((0,0), (0,0)). Surface
|
2205
|
+
dimensions and clipping are not taken into account.
|
2206
|
+
</p>
|
2207
|
+
<p>
|
2208
|
+
Contrast with <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a>, which is similar, but returns
|
2209
|
+
non-zero extents for some paths with no inked area, (such as a
|
2210
|
+
simple line segment).
|
2211
|
+
</p>
|
2212
|
+
<p>
|
2213
|
+
Note that <a class="link" href="cairo-cairo-t.html#cairo-fill-extents" title="cairo_fill_extents ()"><code class="function">cairo_fill_extents()</code></a> must necessarily do more work to
|
2214
|
+
compute the precise inked areas in light of the fill rule, so
|
2215
|
+
<a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of performance
|
2216
|
+
if the non-inked path extents are desired.
|
2217
|
+
</p>
|
2218
|
+
<p>
|
2219
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.
|
2220
|
+
</p>
|
2221
|
+
<div class="variablelist"><table border="0">
|
2222
|
+
<col align="left" valign="top">
|
2223
|
+
<tbody>
|
2224
|
+
<tr>
|
2225
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2226
|
+
<td>a cairo context
|
2227
|
+
</td>
|
2228
|
+
</tr>
|
2229
|
+
<tr>
|
2230
|
+
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
|
2231
|
+
<td>left of the resulting extents
|
2232
|
+
</td>
|
2233
|
+
</tr>
|
2234
|
+
<tr>
|
2235
|
+
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
|
2236
|
+
<td>top of the resulting extents
|
2237
|
+
</td>
|
2238
|
+
</tr>
|
2239
|
+
<tr>
|
2240
|
+
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
|
2241
|
+
<td>right of the resulting extents
|
2242
|
+
</td>
|
2243
|
+
</tr>
|
2244
|
+
<tr>
|
2245
|
+
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
|
2246
|
+
<td>bottom of the resulting extents
|
2247
|
+
</td>
|
2248
|
+
</tr>
|
2249
|
+
</tbody>
|
2250
|
+
</table></div>
|
2251
|
+
</div>
|
2252
|
+
<hr>
|
2253
|
+
<div class="refsect2" title="cairo_in_fill ()">
|
2254
|
+
<a name="cairo-in-fill"></a><h3>cairo_in_fill ()</h3>
|
2255
|
+
<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_in_fill (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2256
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
2257
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
|
2258
|
+
<p>
|
2259
|
+
Tests whether the given point is inside the area that would be
|
2260
|
+
affected by a <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a> operation given the current path and
|
2261
|
+
filling parameters. Surface dimensions and clipping are not taken
|
2262
|
+
into account.
|
2263
|
+
</p>
|
2264
|
+
<p>
|
2265
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-fill" title="cairo_fill ()"><code class="function">cairo_fill()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule" title="cairo_set_fill_rule ()"><code class="function">cairo_set_fill_rule()</code></a> and <a class="link" href="cairo-cairo-t.html#cairo-fill-preserve" title="cairo_fill_preserve ()"><code class="function">cairo_fill_preserve()</code></a>.
|
2266
|
+
</p>
|
2267
|
+
<div class="variablelist"><table border="0">
|
2268
|
+
<col align="left" valign="top">
|
2269
|
+
<tbody>
|
2270
|
+
<tr>
|
2271
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2272
|
+
<td>a cairo context
|
2273
|
+
</td>
|
2274
|
+
</tr>
|
2275
|
+
<tr>
|
2276
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
2277
|
+
<td>X coordinate of the point to test
|
2278
|
+
</td>
|
2279
|
+
</tr>
|
2280
|
+
<tr>
|
2281
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
2282
|
+
<td>Y coordinate of the point to test
|
2283
|
+
</td>
|
2284
|
+
</tr>
|
2285
|
+
<tr>
|
2286
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2287
|
+
<td> A non-zero value if the point is inside, or zero if
|
2288
|
+
outside.
|
2289
|
+
</td>
|
2290
|
+
</tr>
|
2291
|
+
</tbody>
|
2292
|
+
</table></div>
|
2293
|
+
</div>
|
2294
|
+
<hr>
|
2295
|
+
<div class="refsect2" title="cairo_mask ()">
|
2296
|
+
<a name="cairo-mask"></a><h3>cairo_mask ()</h3>
|
2297
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_mask (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2298
|
+
<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre>
|
2299
|
+
<p>
|
2300
|
+
A drawing operator that paints the current source
|
2301
|
+
using the alpha channel of <em class="parameter"><code>pattern</code></em> as a mask. (Opaque
|
2302
|
+
areas of <em class="parameter"><code>pattern</code></em> are painted with the source, transparent
|
2303
|
+
areas are not painted.)
|
2304
|
+
</p>
|
2305
|
+
<div class="variablelist"><table border="0">
|
2306
|
+
<col align="left" valign="top">
|
2307
|
+
<tbody>
|
2308
|
+
<tr>
|
2309
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2310
|
+
<td>a cairo context
|
2311
|
+
</td>
|
2312
|
+
</tr>
|
2313
|
+
<tr>
|
2314
|
+
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
2315
|
+
<td>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>
|
2316
|
+
</td>
|
2317
|
+
</tr>
|
2318
|
+
</tbody>
|
2319
|
+
</table></div>
|
2320
|
+
</div>
|
2321
|
+
<hr>
|
2322
|
+
<div class="refsect2" title="cairo_mask_surface ()">
|
2323
|
+
<a name="cairo-mask-surface"></a><h3>cairo_mask_surface ()</h3>
|
2324
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_mask_surface (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2325
|
+
<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>,
|
2326
|
+
<em class="parameter"><code><span class="type">double</span> surface_x</code></em>,
|
2327
|
+
<em class="parameter"><code><span class="type">double</span> surface_y</code></em>);</pre>
|
2328
|
+
<p>
|
2329
|
+
A drawing operator that paints the current source
|
2330
|
+
using the alpha channel of <em class="parameter"><code>surface</code></em> as a mask. (Opaque
|
2331
|
+
areas of <em class="parameter"><code>surface</code></em> are painted with the source, transparent
|
2332
|
+
areas are not painted.)
|
2333
|
+
</p>
|
2334
|
+
<div class="variablelist"><table border="0">
|
2335
|
+
<col align="left" valign="top">
|
2336
|
+
<tbody>
|
2337
|
+
<tr>
|
2338
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2339
|
+
<td>a cairo context
|
2340
|
+
</td>
|
2341
|
+
</tr>
|
2342
|
+
<tr>
|
2343
|
+
<td><p><span class="term"><em class="parameter"><code>surface</code></em> :</span></p></td>
|
2344
|
+
<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>
|
2345
|
+
</td>
|
2346
|
+
</tr>
|
2347
|
+
<tr>
|
2348
|
+
<td><p><span class="term"><em class="parameter"><code>surface_x</code></em> :</span></p></td>
|
2349
|
+
<td>X coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
|
2350
|
+
</td>
|
2351
|
+
</tr>
|
2352
|
+
<tr>
|
2353
|
+
<td><p><span class="term"><em class="parameter"><code>surface_y</code></em> :</span></p></td>
|
2354
|
+
<td>Y coordinate at which to place the origin of <em class="parameter"><code>surface</code></em>
|
2355
|
+
</td>
|
2356
|
+
</tr>
|
2357
|
+
</tbody>
|
2358
|
+
</table></div>
|
2359
|
+
</div>
|
2360
|
+
<hr>
|
2361
|
+
<div class="refsect2" title="cairo_paint ()">
|
2362
|
+
<a name="cairo-paint"></a><h3>cairo_paint ()</h3>
|
2363
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_paint (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2364
|
+
<p>
|
2365
|
+
A drawing operator that paints the current source everywhere within
|
2366
|
+
the current clip region.
|
2367
|
+
</p>
|
2368
|
+
<div class="variablelist"><table border="0">
|
2369
|
+
<col align="left" valign="top">
|
2370
|
+
<tbody><tr>
|
2371
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2372
|
+
<td>a cairo context
|
2373
|
+
</td>
|
2374
|
+
</tr></tbody>
|
2375
|
+
</table></div>
|
2376
|
+
</div>
|
2377
|
+
<hr>
|
2378
|
+
<div class="refsect2" title="cairo_paint_with_alpha ()">
|
2379
|
+
<a name="cairo-paint-with-alpha"></a><h3>cairo_paint_with_alpha ()</h3>
|
2380
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_paint_with_alpha (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2381
|
+
<em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre>
|
2382
|
+
<p>
|
2383
|
+
A drawing operator that paints the current source everywhere within
|
2384
|
+
the current clip region using a mask of constant alpha value
|
2385
|
+
<em class="parameter"><code>alpha</code></em>. The effect is similar to <a class="link" href="cairo-cairo-t.html#cairo-paint" title="cairo_paint ()"><code class="function">cairo_paint()</code></a>, but the drawing
|
2386
|
+
is faded out using the alpha value.
|
2387
|
+
</p>
|
2388
|
+
<div class="variablelist"><table border="0">
|
2389
|
+
<col align="left" valign="top">
|
2390
|
+
<tbody>
|
2391
|
+
<tr>
|
2392
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2393
|
+
<td>a cairo context
|
2394
|
+
</td>
|
2395
|
+
</tr>
|
2396
|
+
<tr>
|
2397
|
+
<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
|
2398
|
+
<td>alpha value, between 0 (transparent) and 1 (opaque)
|
2399
|
+
</td>
|
2400
|
+
</tr>
|
2401
|
+
</tbody>
|
2402
|
+
</table></div>
|
2403
|
+
</div>
|
2404
|
+
<hr>
|
2405
|
+
<div class="refsect2" title="cairo_stroke ()">
|
2406
|
+
<a name="cairo-stroke"></a><h3>cairo_stroke ()</h3>
|
2407
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_stroke (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2408
|
+
<p>
|
2409
|
+
A drawing operator that strokes the current path according to the
|
2410
|
+
current line width, line join, line cap, and dash settings. After
|
2411
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, the current path will be cleared from the cairo
|
2412
|
+
context. See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2413
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2414
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
|
2415
|
+
</p>
|
2416
|
+
<p>
|
2417
|
+
Note: Degenerate segments and sub-paths are treated specially and
|
2418
|
+
provide a useful result. These can result in two different
|
2419
|
+
situations:
|
2420
|
+
</p>
|
2421
|
+
<p>
|
2422
|
+
1. Zero-length "on" segments set in <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>. If the cap
|
2423
|
+
style is <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> or <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> then these
|
2424
|
+
segments will be drawn as circular dots or squares respectively. In
|
2425
|
+
the case of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a>, the orientation of the squares
|
2426
|
+
is determined by the direction of the underlying path.
|
2427
|
+
</p>
|
2428
|
+
<p>
|
2429
|
+
2. A sub-path created by <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a> followed by either a
|
2430
|
+
<a class="link" href="cairo-Paths.html#cairo-close-path" title="cairo_close_path ()"><code class="function">cairo_close_path()</code></a> or one or more calls to <a class="link" href="cairo-Paths.html#cairo-line-to" title="cairo_line_to ()"><code class="function">cairo_line_to()</code></a> to the
|
2431
|
+
same coordinate as the <a class="link" href="cairo-Paths.html#cairo-move-to" title="cairo_move_to ()"><code class="function">cairo_move_to()</code></a>. If the cap style is
|
2432
|
+
<a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS"><code class="literal">CAIRO_LINE_CAP_ROUND</code></a> then these sub-paths will be drawn as circular
|
2433
|
+
dots. Note that in the case of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-SQUARE:CAPS"><code class="literal">CAIRO_LINE_CAP_SQUARE</code></a> a degenerate
|
2434
|
+
sub-path will not be drawn at all, (since the correct orientation
|
2435
|
+
is indeterminate).
|
2436
|
+
</p>
|
2437
|
+
<p>
|
2438
|
+
In no case will a cap style of <a class="link" href="cairo-cairo-t.html#CAIRO-LINE-CAP-BUTT:CAPS"><code class="literal">CAIRO_LINE_CAP_BUTT</code></a> cause anything
|
2439
|
+
to be drawn in the case of either degenerate segments or sub-paths.
|
2440
|
+
</p>
|
2441
|
+
<div class="variablelist"><table border="0">
|
2442
|
+
<col align="left" valign="top">
|
2443
|
+
<tbody><tr>
|
2444
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2445
|
+
<td>a cairo context
|
2446
|
+
</td>
|
2447
|
+
</tr></tbody>
|
2448
|
+
</table></div>
|
2449
|
+
</div>
|
2450
|
+
<hr>
|
2451
|
+
<div class="refsect2" title="cairo_stroke_preserve ()">
|
2452
|
+
<a name="cairo-stroke-preserve"></a><h3>cairo_stroke_preserve ()</h3>
|
2453
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_stroke_preserve (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2454
|
+
<p>
|
2455
|
+
A drawing operator that strokes the current path according to the
|
2456
|
+
current line width, line join, line cap, and dash settings. Unlike
|
2457
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a> preserves the path within the
|
2458
|
+
cairo context.
|
2459
|
+
</p>
|
2460
|
+
<p>
|
2461
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2462
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2463
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
|
2464
|
+
</p>
|
2465
|
+
<div class="variablelist"><table border="0">
|
2466
|
+
<col align="left" valign="top">
|
2467
|
+
<tbody><tr>
|
2468
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2469
|
+
<td>a cairo context
|
2470
|
+
</td>
|
2471
|
+
</tr></tbody>
|
2472
|
+
</table></div>
|
2473
|
+
</div>
|
2474
|
+
<hr>
|
2475
|
+
<div class="refsect2" title="cairo_stroke_extents ()">
|
2476
|
+
<a name="cairo-stroke-extents"></a><h3>cairo_stroke_extents ()</h3>
|
2477
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_stroke_extents (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2478
|
+
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
|
2479
|
+
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
|
2480
|
+
<em class="parameter"><code><span class="type">double</span> *x2</code></em>,
|
2481
|
+
<em class="parameter"><code><span class="type">double</span> *y2</code></em>);</pre>
|
2482
|
+
<p>
|
2483
|
+
Computes a bounding box in user coordinates covering the area that
|
2484
|
+
would be affected, (the "inked" area), by a <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>
|
2485
|
+
operation given the current path and stroke parameters.
|
2486
|
+
If the current path is empty, returns an empty rectangle ((0,0), (0,0)).
|
2487
|
+
Surface dimensions and clipping are not taken into account.
|
2488
|
+
</p>
|
2489
|
+
<p>
|
2490
|
+
Note that if the line width is set to exactly zero, then
|
2491
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> will return an empty rectangle. Contrast with
|
2492
|
+
<a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> which can be used to compute the non-empty
|
2493
|
+
bounds as the line width approaches zero.
|
2494
|
+
</p>
|
2495
|
+
<p>
|
2496
|
+
Note that <a class="link" href="cairo-cairo-t.html#cairo-stroke-extents" title="cairo_stroke_extents ()"><code class="function">cairo_stroke_extents()</code></a> must necessarily do more work to
|
2497
|
+
compute the precise inked areas in light of the stroke parameters,
|
2498
|
+
so <a class="link" href="cairo-Paths.html#cairo-path-extents" title="cairo_path_extents ()"><code class="function">cairo_path_extents()</code></a> may be more desirable for sake of
|
2499
|
+
performance if non-inked path extents are desired.
|
2500
|
+
</p>
|
2501
|
+
<p>
|
2502
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2503
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2504
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
|
2505
|
+
</p>
|
2506
|
+
<div class="variablelist"><table border="0">
|
2507
|
+
<col align="left" valign="top">
|
2508
|
+
<tbody>
|
2509
|
+
<tr>
|
2510
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2511
|
+
<td>a cairo context
|
2512
|
+
</td>
|
2513
|
+
</tr>
|
2514
|
+
<tr>
|
2515
|
+
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
|
2516
|
+
<td>left of the resulting extents
|
2517
|
+
</td>
|
2518
|
+
</tr>
|
2519
|
+
<tr>
|
2520
|
+
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
|
2521
|
+
<td>top of the resulting extents
|
2522
|
+
</td>
|
2523
|
+
</tr>
|
2524
|
+
<tr>
|
2525
|
+
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
|
2526
|
+
<td>right of the resulting extents
|
2527
|
+
</td>
|
2528
|
+
</tr>
|
2529
|
+
<tr>
|
2530
|
+
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
|
2531
|
+
<td>bottom of the resulting extents
|
2532
|
+
</td>
|
2533
|
+
</tr>
|
2534
|
+
</tbody>
|
2535
|
+
</table></div>
|
2536
|
+
</div>
|
2537
|
+
<hr>
|
2538
|
+
<div class="refsect2" title="cairo_in_stroke ()">
|
2539
|
+
<a name="cairo-in-stroke"></a><h3>cairo_in_stroke ()</h3>
|
2540
|
+
<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_in_stroke (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2541
|
+
<em class="parameter"><code><span class="type">double</span> x</code></em>,
|
2542
|
+
<em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
|
2543
|
+
<p>
|
2544
|
+
Tests whether the given point is inside the area that would be
|
2545
|
+
affected by a <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a> operation given the current path and
|
2546
|
+
stroking parameters. Surface dimensions and clipping are not taken
|
2547
|
+
into account.
|
2548
|
+
</p>
|
2549
|
+
<p>
|
2550
|
+
See <a class="link" href="cairo-cairo-t.html#cairo-stroke" title="cairo_stroke ()"><code class="function">cairo_stroke()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-width" title="cairo_set_line_width ()"><code class="function">cairo_set_line_width()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-line-join" title="cairo_set_line_join ()"><code class="function">cairo_set_line_join()</code></a>,
|
2551
|
+
<a class="link" href="cairo-cairo-t.html#cairo-set-line-cap" title="cairo_set_line_cap ()"><code class="function">cairo_set_line_cap()</code></a>, <a class="link" href="cairo-cairo-t.html#cairo-set-dash" title="cairo_set_dash ()"><code class="function">cairo_set_dash()</code></a>, and
|
2552
|
+
<a class="link" href="cairo-cairo-t.html#cairo-stroke-preserve" title="cairo_stroke_preserve ()"><code class="function">cairo_stroke_preserve()</code></a>.
|
2553
|
+
</p>
|
2554
|
+
<div class="variablelist"><table border="0">
|
2555
|
+
<col align="left" valign="top">
|
2556
|
+
<tbody>
|
2557
|
+
<tr>
|
2558
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2559
|
+
<td>a cairo context
|
2560
|
+
</td>
|
2561
|
+
</tr>
|
2562
|
+
<tr>
|
2563
|
+
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
|
2564
|
+
<td>X coordinate of the point to test
|
2565
|
+
</td>
|
2566
|
+
</tr>
|
2567
|
+
<tr>
|
2568
|
+
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
|
2569
|
+
<td>Y coordinate of the point to test
|
2570
|
+
</td>
|
2571
|
+
</tr>
|
2572
|
+
<tr>
|
2573
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2574
|
+
<td> A non-zero value if the point is inside, or zero if
|
2575
|
+
outside.
|
2576
|
+
</td>
|
2577
|
+
</tr>
|
2578
|
+
</tbody>
|
2579
|
+
</table></div>
|
2580
|
+
</div>
|
2581
|
+
<hr>
|
2582
|
+
<div class="refsect2" title="cairo_copy_page ()">
|
2583
|
+
<a name="cairo-copy-page"></a><h3>cairo_copy_page ()</h3>
|
2584
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_copy_page (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2585
|
+
<p>
|
2586
|
+
Emits the current page for backends that support multiple pages, but
|
2587
|
+
doesn't clear it, so, the contents of the current page will be retained
|
2588
|
+
for the next page too. Use <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a> if you want to get an
|
2589
|
+
empty page after the emission.
|
2590
|
+
</p>
|
2591
|
+
<p>
|
2592
|
+
This is a convenience function that simply calls
|
2593
|
+
<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> on <em class="parameter"><code>cr</code></em>'s target.
|
2594
|
+
</p>
|
2595
|
+
<div class="variablelist"><table border="0">
|
2596
|
+
<col align="left" valign="top">
|
2597
|
+
<tbody><tr>
|
2598
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2599
|
+
<td>a cairo context
|
2600
|
+
</td>
|
2601
|
+
</tr></tbody>
|
2602
|
+
</table></div>
|
2603
|
+
</div>
|
2604
|
+
<hr>
|
2605
|
+
<div class="refsect2" title="cairo_show_page ()">
|
2606
|
+
<a name="cairo-show-page"></a><h3>cairo_show_page ()</h3>
|
2607
|
+
<pre class="programlisting"><span class="returnvalue">void</span> cairo_show_page (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2608
|
+
<p>
|
2609
|
+
Emits and clears the current page for backends that support multiple
|
2610
|
+
pages. Use <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a> if you don't want to clear the page.
|
2611
|
+
</p>
|
2612
|
+
<p>
|
2613
|
+
This is a convenience function that simply calls
|
2614
|
+
<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> on <em class="parameter"><code>cr</code></em>'s target.
|
2615
|
+
</p>
|
2616
|
+
<div class="variablelist"><table border="0">
|
2617
|
+
<col align="left" valign="top">
|
2618
|
+
<tbody><tr>
|
2619
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2620
|
+
<td>a cairo context
|
2621
|
+
</td>
|
2622
|
+
</tr></tbody>
|
2623
|
+
</table></div>
|
2624
|
+
</div>
|
2625
|
+
<hr>
|
2626
|
+
<div class="refsect2" title="cairo_get_reference_count ()">
|
2627
|
+
<a name="cairo-get-reference-count"></a><h3>cairo_get_reference_count ()</h3>
|
2628
|
+
<pre class="programlisting">unsigned <span class="returnvalue">int</span> cairo_get_reference_count (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>);</pre>
|
2629
|
+
<p>
|
2630
|
+
Returns the current reference count of <em class="parameter"><code>cr</code></em>.
|
2631
|
+
</p>
|
2632
|
+
<div class="variablelist"><table border="0">
|
2633
|
+
<col align="left" valign="top">
|
2634
|
+
<tbody>
|
2635
|
+
<tr>
|
2636
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2637
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2638
|
+
</td>
|
2639
|
+
</tr>
|
2640
|
+
<tr>
|
2641
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2642
|
+
<td> the current reference count of <em class="parameter"><code>cr</code></em>. If the
|
2643
|
+
object is a nil object, 0 will be returned.
|
2644
|
+
|
2645
|
+
</td>
|
2646
|
+
</tr>
|
2647
|
+
</tbody>
|
2648
|
+
</table></div>
|
2649
|
+
<p class="since">Since 1.4</p>
|
2650
|
+
</div>
|
2651
|
+
<hr>
|
2652
|
+
<div class="refsect2" title="cairo_set_user_data ()">
|
2653
|
+
<a name="cairo-set-user-data"></a><h3>cairo_set_user_data ()</h3>
|
2654
|
+
<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_set_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2655
|
+
<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>,
|
2656
|
+
<em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
|
2657
|
+
<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>
|
2658
|
+
<p>
|
2659
|
+
Attach user data to <em class="parameter"><code>cr</code></em>. To remove user data from a surface,
|
2660
|
+
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>
|
2661
|
+
for <em class="parameter"><code>data</code></em>.
|
2662
|
+
</p>
|
2663
|
+
<div class="variablelist"><table border="0">
|
2664
|
+
<col align="left" valign="top">
|
2665
|
+
<tbody>
|
2666
|
+
<tr>
|
2667
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2668
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2669
|
+
</td>
|
2670
|
+
</tr>
|
2671
|
+
<tr>
|
2672
|
+
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
|
2673
|
+
<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
|
2674
|
+
</td>
|
2675
|
+
</tr>
|
2676
|
+
<tr>
|
2677
|
+
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
2678
|
+
<td>the user data to attach to the <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2679
|
+
</td>
|
2680
|
+
</tr>
|
2681
|
+
<tr>
|
2682
|
+
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
|
2683
|
+
<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
|
2684
|
+
<a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
|
2685
|
+
same key.
|
2686
|
+
</td>
|
2687
|
+
</tr>
|
2688
|
+
<tr>
|
2689
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2690
|
+
<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
|
2691
|
+
slot could not be allocated for the user data.
|
2692
|
+
|
2693
|
+
</td>
|
2694
|
+
</tr>
|
2695
|
+
</tbody>
|
2696
|
+
</table></div>
|
2697
|
+
<p class="since">Since 1.4</p>
|
2698
|
+
</div>
|
2699
|
+
<hr>
|
2700
|
+
<div class="refsect2" title="cairo_get_user_data ()">
|
2701
|
+
<a name="cairo-get-user-data"></a><h3>cairo_get_user_data ()</h3>
|
2702
|
+
<pre class="programlisting"><span class="returnvalue">void</span> * cairo_get_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> *cr</code></em>,
|
2703
|
+
<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>
|
2704
|
+
<p>
|
2705
|
+
Return user data previously attached to <em class="parameter"><code>cr</code></em> using the specified
|
2706
|
+
key. If no user data has been attached with the given key this
|
2707
|
+
function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
|
2708
|
+
</p>
|
2709
|
+
<div class="variablelist"><table border="0">
|
2710
|
+
<col align="left" valign="top">
|
2711
|
+
<tbody>
|
2712
|
+
<tr>
|
2713
|
+
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
|
2714
|
+
<td>a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a>
|
2715
|
+
</td>
|
2716
|
+
</tr>
|
2717
|
+
<tr>
|
2718
|
+
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
|
2719
|
+
<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
|
2720
|
+
attached to
|
2721
|
+
</td>
|
2722
|
+
</tr>
|
2723
|
+
<tr>
|
2724
|
+
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2725
|
+
<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>.
|
2726
|
+
|
2727
|
+
</td>
|
2728
|
+
</tr>
|
2729
|
+
</tbody>
|
2730
|
+
</table></div>
|
2731
|
+
<p class="since">Since 1.4</p>
|
2732
|
+
</div>
|
2733
|
+
</div>
|
2734
|
+
<div class="refsect1" title="See Also">
|
2735
|
+
<a name="cairo-cairo-t.see-also"></a><h2>See Also</h2>
|
2736
|
+
<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a>
|
2737
|
+
</div>
|
2738
|
+
</div>
|
2739
|
+
<div class="footer">
|
2740
|
+
<hr>
|
2741
|
+
Generated by GTK-Doc V1.15</div>
|
2742
|
+
</body>
|
2743
|
+
</html>
|