diff options
author | Loïc Minier <lool@dooz.org> | 2009-04-15 00:04:34 +0200 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2009-04-15 00:04:34 +0200 |
commit | c14a30c049d9e2911dad3d7243f8cf9c69603249 (patch) | |
tree | d2d1f68e1112c3442faef72c181f2efaca98b2ee | |
parent | 9389fe1633eba6995dc21d842f11877e9dc73d50 (diff) |
Imported Upstream version 1.5.6
195 files changed, 9307 insertions, 5375 deletions
@@ -1,3 +1,2060 @@ +commit ad8d03967a2b68ab88a428df6b9d68e76002a88f +Author: Carl Worth <cworth@cworth.org> +Date: Tue Jan 15 15:50:54 2008 -0800 + + Increment version to 1.5.6 and to 15:0:13 + + configure.in | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +commit fe27f4b9a34946b121b4259f057fdf3c52d1371b +Author: Carl Worth <cworth@cworth.org> +Date: Tue Jan 15 15:47:48 2008 -0800 + + NEWS: Add notes for cairo 1.5.6 + + NEWS | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 files changed, 95 insertions(+), 5 deletions(-) + +commit 1bccbd88c38c4438e94cf8936228c75e47be0af4 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 16 16:33:22 2008 +0000 + + [cairo-pdf-surface] Review error propagation from output stream. + + Ensure that errors encountered whilst processing the output stream are + propagated back to the surface (and the user). + + src/cairo-pdf-surface.c | 291 ++++++++++++++++++++++++----------------------- + 1 files changed, 147 insertions(+), 144 deletions(-) + +commit 20151fc53401dcc53ef3ab6a78c91a0a02afe497 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 16 16:33:22 2008 +0000 + + [cairo-ps-surface] Review error propagation during surface creation. + + Track the error during surface creation so that it can be returned to + the user via _cairo_surface_create_in_error(). + + src/cairo-ps-surface.c | 36 +++++++++++++++++------------------- + 1 files changed, 17 insertions(+), 19 deletions(-) + +commit 3daa63693c2f8f9cc3c7fa41ef1e4d69bd67b3cc +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 16 16:33:22 2008 +0000 + + [cairo-svg-surface] Review error propagation during surface creation. + + Track the error during surface creation so that it can be returned to + the user via _cairo_surface_create_in_error(). + + src/cairo-svg-surface.c | 124 +++++++++++++++++++++++++---------------------- + 1 files changed, 66 insertions(+), 58 deletions(-) + +commit 7111b18c27d7ee0439339a6aa72f0e4244f883f9 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 16 16:23:23 2008 +0000 + + [cairo-surface] Introduce _cairo_surface_create_in_error(). + + Unexport all the static error surfaces and use a function to select + the appropriate error surface for the status. + + src/cairo-array.c | 3 +- + src/cairo-glitz-surface.c | 20 ++---- + src/cairo-image-surface.c | 136 ++++-------------------------------- + src/cairo-meta-surface.c | 12 +-- + src/cairo-os2-surface.c | 22 +++---- + src/cairo-paginated-surface.c | 8 ++- + src/cairo-pdf-surface.c | 11 +-- + src/cairo-png.c | 38 ++++++---- + src/cairo-ps-surface.c | 9 +-- + src/cairo-quartz-surface.c | 32 +++----- + src/cairo-surface-fallback.c | 6 +- + src/cairo-surface.c | 62 +++++++++++----- + src/cairo-svg-surface.c | 20 ++---- + src/cairo-win32-printing-surface.c | 10 +-- + src/cairo-win32-surface.c | 37 ++++------ + src/cairo-xcb-surface.c | 18 ++--- + src/cairo-xlib-surface.c | 26 +++----- + src/cairo.c | 4 +- + src/cairoint.h | 6 +- + src/test-fallback-surface.c | 5 +- + src/test-meta-surface.c | 18 +++-- + src/test-paginated-surface.c | 5 +- + 22 files changed, 185 insertions(+), 323 deletions(-) + +commit 5cbc45488e276cb6e6ecfa7bc7dd4fae342de85e +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 16 16:29:19 2008 +0000 + + [cairo-output-stream] Introduce _cairo_output_stream_create_in_error() + + Use a utility function to wrap an incoming error status into a new + error stream. As a side-effect, all error streams must be destroyed as + in the general case the caller can not distinguish between a static + error object and one allocated to hold an unusual error status. + + src/cairo-base85-stream.c | 3 +++ + src/cairo-deflate-stream.c | 7 ++----- + src/cairo-output-stream-private.h | 3 +++ + src/cairo-output-stream.c | 26 ++++++++++++++++++++++++-- + src/cairo-ps-surface.c | 10 +++++++--- + src/cairo-type1-fallback.c | 8 ++++---- + src/cairo-type1-subset.c | 5 +++-- + 7 files changed, 46 insertions(+), 16 deletions(-) + +commit 2c10c7559db11ccf511e119f4d4fb2da97508786 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 16 13:37:48 2008 +0000 + + [Makefile.am] Add -I$(builddir) for .c.i target + + Updated the CPP command so that it can find <cairo-features.h> in the + local build directory. + + src/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit e49db8ed3ea5727e00e2734a8877af860371be69 +Author: Carl Worth <cworth@cworth.org> +Date: Wed Jan 16 08:11:51 2008 -0800 + + Fix create-for-stream test to log its failure properly + + Without this, a failure of this test won't be nicely reported + in the post-make-check summary. (Also fix a silly little typo + in the svg-clip test.) + + test/Makefile.am | 1 - + test/create-for-stream.c | 13 +++++++++++-- + test/svg-clip.c | 2 +- + 3 files changed, 12 insertions(+), 4 deletions(-) + +commit 57c2b75c229ac7811c573548ae50e6b0e4ecf862 +Author: Vladimir Vukicevic <vladimir@pobox.com> +Date: Tue Jan 15 14:27:14 2008 -0800 + + [quartz] Store the CGFontRef and reuse it for rendering + + Previously the CGFontRef was recreated each time in show_glyphs; this + caused the font to get re-embedded in any PDF files that were being + generated through Quartz. + + src/cairo-atsui-font.c | 18 ++++++++++++++++++ + src/cairo-quartz-private.h | 3 +++ + src/cairo-quartz-surface.c | 10 ++-------- + 3 files changed, 23 insertions(+), 8 deletions(-) + +commit 968eaf3c44f37ada9c1d7005fc84ead797e11b58 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Jan 14 18:09:32 2008 +0000 + + [cairo-xlib] Fixup --disable-xlib-xrender + + Fixup the headers and boilerplate to compile and run correctly when + configured with --disable-xlib-xrender. + + boilerplate/Makefile.am | 2 +- + boilerplate/cairo-boilerplate-xlib-private.h | 2 + + boilerplate/cairo-boilerplate-xlib.c | 29 +++++++++++++++---------- + boilerplate/cairo-boilerplate.c | 2 +- + src/Makefile.am | 2 +- + src/cairo-freelist-private.h | 3 +- + src/cairo-xlib-display.c | 1 + + src/cairo-xlib-private.h | 6 +---- + src/cairo-xlib-screen.c | 1 + + src/cairo-xlib-surface-private.h | 2 + + src/cairo-xlib-surface.c | 6 +++++ + src/cairo-xlib-xrender-private.h | 3 -- + src/cairo-xlib-xrender.h | 8 +++--- + test/xlib-surface.c | 1 - + 14 files changed, 38 insertions(+), 30 deletions(-) + +commit 22d7f311f7733a57ece5d91708b2b5da9b71de86 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Jan 14 16:14:02 2008 -0500 + + [scaled-font] Upgrade glyph mask as needed in case of mixed-format glyphs + + In ecb895803b9d2a3fd142f4a2c694ca08c5581f0e Carl made fallback show_glyphs + always use a A8 mask in case of mixed-format glyphs. That's suboptimal if + there are ARGB32 glyphs. Using masks smartly we can implement the desired + behavior. Done now. + + src/cairo-image-surface.c | 18 +++++++++++++++ + src/cairo-scaled-font.c | 54 +++++++++++++++++++++++++-------------------- + src/cairoint.h | 3 ++ + 3 files changed, 51 insertions(+), 24 deletions(-) + +commit a5e5c1b5b04dd1d1138e96b7f4c097f14a1cd2cd +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Jan 13 15:00:58 2008 +0000 + + [test] Add a custom hook to summarise the failures. + + Add a check-local hook that scans the log fails and displays a list + of failed tests (and the failing targets). + + test/Makefile.am | 18 ++++++++++++++++++ + 1 files changed, 18 insertions(+), 0 deletions(-) + +commit 8d6249b2c1200dfaf3e98c40e82ab2796e9ef28c +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Jan 13 11:40:53 2008 +0000 + + [cairo-scaled-font] Add missing matrix guard to cairo_scaled_font_create(). + + cairo_scaled_font_create() did not check the user supplied ctm was valid, + triggering an assertion later when computing the scale factors. + + src/cairo-scaled-font.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit 3f59ef95482db478230bb7634209bb826b6a06d0 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Jan 13 11:21:39 2008 +0000 + + [cairo-matrix] Tidy usage of HAVE_ISFINITE. + + Use a macro to switch between isfinite() and its fallback in order to + avoid using an #ifdef from within a function. + + src/cairo-gstate.c | 25 ++++++------------------- + src/cairo-matrix.c | 25 ++++++------------------- + 2 files changed, 12 insertions(+), 38 deletions(-) + +commit 5e32dcf863cc8f40e2679c8c8c42e3ac927ab3c9 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Jan 13 11:10:28 2008 +0000 + + [cairo-gstate] Check that the matrix remains invertible. + + Ensure that the ctm remains invertible after multiplying the user + supplied matrices. Although the arguments are checked so that they are + valid per se, we double check that the result after multiplication is + still a valid invertible matrix. This should catch pathological cases + where the user concatenates a long series of matrix operations, which + either exceed our numerical limits or become degenerate through rounding + errors. + + src/cairo-gstate.c | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+), 0 deletions(-) + +commit 2f600affaa9ac3537013c69643878731a2f4389e +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Jan 13 11:02:55 2008 +0000 + + [cairo-gstate] Add isfinite guards to the transformation ops. + + If we have isfinite() available use it to check that the user supplied + arguments are valid. + + src/cairo-gstate.c | 21 +++++++++++++++++++++ + 1 files changed, 21 insertions(+), 0 deletions(-) + +commit 3fed79d1c24f07618243bb197b44a9fd106aebbc +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun Jan 13 10:28:11 2008 +0000 + + [cairo-paginated-surface] Set error on surface for operations done its behalf. + + Ensure that the error is propagated to the target surface if we fail + whilst performing an operation on its behalf, for example set the size + of the paginated surface. + + src/cairo-paginated-surface.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +commit 481b88dd6b19c267feaf05652974225e86aa8007 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 12 20:35:56 2008 +0000 + + [cairo-pattern] Add an ASSERT_NOT_REACHED + + On the default case for an unknown pattern type, add an assert that the + code is never reached, and just in case upgrade the error to a fatal + PATTERN_TYPE_MISMATCH. + + src/cairo-pattern.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit 973d5fa8a50fbb0fb760f2e32a227a6238d074da +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 12 11:04:03 2008 +0000 + + [test] Sort TESTS + + A couple of tests were out of order, causing a bit of confusion in the + user. + + test/.gitignore | 2 +- + test/Makefile.am | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit ac98c9e572135f5f46303ce49e6a04f86efe2676 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 12 10:49:48 2008 +0000 + + [test/rel-path] Check that invalid relative paths raise an error. + + Check that NO_CURRENT_PATH is raised if a relative path op is used + on a new path. + + test/rel-path.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 66 insertions(+), 0 deletions(-) + +commit 6cc75cfe5b962566938189b5a7dd63135e981300 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 12 10:30:15 2008 +0000 + + [cairo] Harden the text API against NULL strings. + + Handle NULL strings in cairo_show_(text|glyph), + cairo_(text|glyph)_(extents|path) without crashing. + + src/cairo.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +commit 864dab828b4c860668adb48ff9361e9969b5259f +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 12 10:01:36 2008 +0000 + + [test/text-zero-len] Test passing NULLs to the API. + + Check that the public API handles NULL - at the moment the code + is a little inconsistent and crashes! + + test/text-zero-len.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 44 insertions(+), 1 deletions(-) + +commit ae1e044e328deec7a430de3724a7ae0ad958d22d +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 12 00:31:42 2008 +0000 + + [cairo-matrix] Use isfinite() to check matrix determinant. + + The current NaN check is insufficient as it classifies inf as a valid + determinant. We can improve the test by using isfinite() - but only + when it is available. We use the feature test macros as being the + simplest way of determining the presence of isfinite() as it may be + implemented as a macro, making checking for its usability troublesome + during configure. + + src/cairo-matrix.c | 20 ++++++++++++++++++++ + 1 files changed, 20 insertions(+), 0 deletions(-) + +commit 3610841910714f0bca07caeb606be9c69fd9d4c8 +Author: Kouhei Sutou <kou@cozmixng.org> +Date: Fri Jan 11 14:36:05 2008 -0800 + + Fix typo in comment. + + src/cairo-quartz-surface.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 0b9124069271593be390d9835fcd1527b20770e3 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 21:55:52 2008 +0000 + + [check-plt.sh] Ensure that $MAKE is defined. + + Copy the check from check-def.sh now that $MAKE is also used in + check-plt.sh + + src/check-plt.sh | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit 92c744978f0c08456cf0ec8dca87abebf6a6d150 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 21:54:58 2008 +0000 + + [Makefile.am] Tweak the flags passed to CPP. + + Adjust the flags passed to $(CPP) to match those used in the + surrounding targets (splint and sparse), which should improve their + reliability. + + src/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 36f5d69a1165f81e97b50c64dde33fa19db36326 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Fri Jan 11 16:48:55 2008 -0500 + + [src/Makefile.am] Tweak includes a bit + + src/Makefile.am | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit ed113ef4229e23d137b2673f233a23064f51ff24 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 21:13:05 2008 +0000 + + [check] Move the hidden symbol check into check-{def,plt}.sh + + Behdad, once again the arbiter of good taste, objected to the use of + the dotfile within the Makefile, and suggested that one calls $MAKE to + pre-process the source file from within the check scripts. + + Doing so removes the ugly wart added to Makefile.am... + + src/Makefile.am | 14 +++++--------- + src/check-def.sh | 4 ++-- + src/check-has-hidden-symbols.c | 11 +---------- + src/check-plt.sh | 4 ++-- + 4 files changed, 10 insertions(+), 23 deletions(-) + +commit bcf0c442b91b553b226c78d254906f7127013391 +Merge: ecb8958... 8a6a0b4... +Author: Carl Worth <cworth@cworth.org> +Date: Fri Jan 11 12:30:15 2008 -0800 + + Merge branch 'master' of git.cairographics.org:/git/cairo into cairo + +commit ecb895803b9d2a3fd142f4a2c694ca08c5581f0e +Author: Carl Worth <cworth@cworth.org> +Date: Fri Jan 11 12:28:49 2008 -0800 + + Migrate glyph mask to A8 in case of mixed-format glyphs. + + This fixes the remaining image-backend problems with bug 13479: + + Ugly Courier New font with cairo 1.4.12 + https://bugs.freedesktop.org/show_bug.cgi?id=13479 + + although the xlib-backend had been fixed previously. + + Specifically, if an A1 glyph is first encountered, then subsequent + glyphs will still be rendered with antialiasing, (previously they + would be rendered very poorly without antialiasing). + + Similarly, if the first glyph encountered has component-alpha + sub-pixel antialiasing and then an A1 or A8 glyph is encountered + then all glyphs will rendered in A8 (grayscale antialiasing). + Previously, the non-subpixel-antialiased glyphs would not appear + at all. + + src/cairo-scaled-font.c | 50 ++++++++++++++++++++++++++++++++++++++++++++-- + 1 files changed, 47 insertions(+), 3 deletions(-) + +commit 8a6a0b43dc249acb0ad8cb9c6f16360294bcfdc3 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 18:47:19 2008 +0000 + + [check] Replace compiled symbol visibility checker with shell script. + + Behdad Esfahbod objected to the execution of a compiled program to check + symbol visibility as it makes cross-compilation more difficult. + + Instead of executing the program, this method conditionally exports + a variable if cairo uses symbol hiding and scans the executable for + that symbol in a similar manner to check-def.sh. This has the slight + advantage of using the Makefile for performing the compilation, rather + than attempting to invoke $(CPP) from a shell script within the test + environment. + + src/Makefile.am | 12 ++++++++---- + src/cairo-compiler-private.h | 5 ++--- + src/check-def.sh | 11 ++++++----- + src/check-has-hidden-symbols.c | 12 ++++++++++++ + src/check-plt.sh | 14 ++++++++------ + src/compiler-supports-visibility.c | 6 ------ + 6 files changed, 36 insertions(+), 24 deletions(-) + +commit 982f65081f987e2c44f05942411c031bd32fd968 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 17:25:33 2008 +0000 + + [cairoint.h] Compile time check for a font backend. + + Add a paranoid check that at least one font backend is available - this + should have been already caught by configure, but it should help if a new + font backend is ever added. + + src/cairoint.h | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +commit 6d3ed950ea075ff2a5a569365b46c3cfc4152787 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 16:16:20 2008 +0000 + + [check] Skip def/plt tests if the compiler doesn't support symbol hiding. + + Compile a trivial program such that it reports whether cairo is hiding + its internal symbols and skip the tests that depend upon it. + + This prevents false errors, such as bug 12726, where the user is + presented with a scary make check failure. + + src/Makefile.am | 5 +++++ + src/cairo-compiler-private.h | 3 +++ + src/check-def.sh | 5 +++++ + src/check-plt.sh | 5 +++++ + src/compiler-supports-visibility.c | 6 ++++++ + 5 files changed, 24 insertions(+), 0 deletions(-) + +commit be146f02e0e220aa70217bf348beef301a56f898 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 15:28:52 2008 +0000 + + [Makefile.am] Update cairo.def after the set of enabled features is modified. + + Bug 13342 corresponds with a rebuild of cairo after removing + --enable-glitz from the configure line. Under these circumstances, + the remaining installable headers are not modified and therefore + cairo.def is not rebuilt and still expects to find a reference to + cairo_glitz_surface_create. The solution is to rebuild cairo.def after + any modification to the 'public' headers (installable or otherwise). + + src/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit c26784dbb6d3c90f9e3fa722efa0f9f4fd59bd4c +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 11 14:04:56 2008 +0000 + + [configure] Version bump for $(EXEEXT) + + Adrian Johnson found that adding $(EXEEXT) to TESTS broke the build + under mingw. After a bit of investigation, the issue was tracked down + to being caused by automake-1.7. Bump the autotools version + requirements to avoid the breakage. + + configure.in | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +commit 2574cc35b3478e7333bd4953e90a3edc5f7c4f16 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Fri Jan 11 22:07:26 2008 +1030 + + win32-printing: Do not clip and paint with an empty path + + For non solid patterns _fill and _show_glyphs sets a clip + path then paints the pattern. Previously if the path is empty + SelectClipPath did not set clip. This was probably the cause + of bug 13657 where the entire page was black. + + Fix this by not painting anything if the path is empty. + + src/cairo-win32-printing-surface.c | 8 ++++++-- + src/cairo-win32-private.h | 1 + + 2 files changed, 7 insertions(+), 2 deletions(-) + +commit 7ef4caaf11379cb50a08520f729552553de60660 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Fri Jan 11 22:06:51 2008 +1030 + + win32-printing: use fill instead of clip for non win32 fonts + + Non Windows fonts are drawn by getting the outline path, setting + this is the clip path, and painting the source pattern. For + solid colors this can avoid the clip and just do a fill. + + src/cairo-win32-printing-surface.c | 14 ++++++++++++-- + 1 files changed, 12 insertions(+), 2 deletions(-) + +commit ef56a6fd93d6192ee1f1948d11c75878aea40f4e +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Fri Jan 11 22:05:54 2008 +1030 + + PS: Don't use language level check in EPS + + As 'showpage' and 'quit' can not be used in EPS. + + src/cairo-ps-surface.c | 16 ++++++++-------- + 1 files changed, 8 insertions(+), 8 deletions(-) + +commit b703199525ca02274ef5a8474cdae0cb70705964 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Fri Jan 11 22:05:13 2008 +1030 + + Type1-subset: Font name may be NULL + + If the FreeType face->family_name is NULL use a CairoFont-x-y name. + + src/cairo-type1-subset.c | 37 ++++++++++++++++++++++++------------- + 1 files changed, 24 insertions(+), 13 deletions(-) + +commit 6418a8be8719c9a969d9ec1f8624c841db9d2b90 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 21:35:05 2008 +0000 + + [test/.valgrind-suppressions] Update for amd64/sid + + Update the valgrind suppressions for the libz and Xrm spam. + + test/.valgrind-suppressions | 20 +++++++++++++++++--- + 1 files changed, 17 insertions(+), 3 deletions(-) + +commit 2e5f278da11369073eefeeedff7211bacb31ace1 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 22:11:42 2008 +0000 + + [cairo-pattern] Free the copied pattern on error. + + Free the locally allocated pattern if the copy fails. + + src/cairo-pattern.c | 10 +++++++++- + 1 files changed, 9 insertions(+), 1 deletions(-) + +commit db246f2fa22920a996a32f11233228e9af1d1abb +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 21:32:47 2008 +0000 + + [cairo-traps] Typo caught by valgrind. + + ==3429== Conditional jump or move depends on uninitialised value(s) + ==3429== at 0x4E3FB0F: _cairo_box_round_to_rectangle (cairo-fixed-private.h:196) + ==3429== by 0x4E34B29: _cairo_clip_intersect_to_rectangle (cairo-clip.c:162) + ==3429== by 0x4E31943: cairo_push_group_with_content (cairo.c:495) + ==3429== by 0x403044: draw (clip-zero.c:48) + ==3429== by 0x404221: cairo_test_expecting (cairo-test.c:377) + ==3429== by 0x64701C3: (below main) (libc-start.c:222) + + Caused by setting extents->p2.y to zero twice. + + src/cairo-traps.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 10f6ef98f645d9f9f54d88fcf18683771258d36f +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 17:50:45 2008 +0000 + + [gitignore] Add mkinstalldirs. + + Ignore another autoconf utility script. + + .gitignore | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit da769b53e89b1f1ff91886a12a388e5fadec47bb +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 17:23:56 2008 +0000 + + [configure.in] Fixup usage of _CHECK_FUNCS_WITH_FLAGS within PKG_CHECK_MODULE. + + An unwanted side-effect of the recent fix for the paranoid extra check + for a usable library was that it broke the logic for the absence of the + module. + + configure.in | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +commit 409e91b576ad992b41c66c952931c4a3e652dbf9 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 15:53:54 2008 +0000 + + [cairo-pdf-surface] Review error handling. + + Ensure all errors are propagated back to the caller with locally + allocated resources destroy as required. + + src/cairo-pdf-surface.c | 261 ++++++++++++++++++++++++++++++++--------------- + 1 files changed, 177 insertions(+), 84 deletions(-) + +commit 6134600988a6b5fcbc72f7897bfc83b37949b677 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue Jan 8 14:14:33 2008 +0000 + + [cairo-pdf-surface] Skip emitting the font subset if not among resources. + + Do not emit the font_subset if we did not successfully add it to the list + of font resources - can only happen after an error + + src/cairo-pdf-surface.c | 35 +++++++++++++++++++++++------------ + 1 files changed, 23 insertions(+), 12 deletions(-) + +commit 755a4bb51b458fbc059b6306e371d9dc1c906b04 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 15:30:42 2008 +0000 + + [test] Win32 printing backend testing depends upon ghostscript + + Using the Win32 printing backend requires ghostscript, so only enable + those tests if we detect 'gs' during configure. + + boilerplate/cairo-boilerplate.c | 2 ++ + configure.in | 17 +++++++++++++++++ + 2 files changed, 19 insertions(+), 0 deletions(-) + +commit 02b0743458655f44ffc4d429b4ac355df42071f1 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 15:22:16 2008 +0000 + + [cairo-pattern] Rearrange CAIRO_MUTEX_INITIALIZE. + + test/pattern-get-type exposes a bug whereby we try to acquire the + _cairo_pattern_solid_pattern_cache_lock before initializing the + mutexes. To fix this move the CAIRO_MUTEX_INITIALIZE() from the + depths of _cairo_pattern_init() and perform it at the public entry + points. + + src/cairo-pattern.c | 14 ++++++++++++-- + 1 files changed, 12 insertions(+), 2 deletions(-) + +commit cbe8d3855efd1254089c1c855c337df326ea52d7 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 15:14:15 2008 +0000 + + [test] Fixup make check for mingw + + Add EXEEXT to TESTS so that mingw builds the correct target. + + perf/Makefile.am | 8 +- + test/Makefile.am | 313 +++++++++++++++++++++++++++--------------------------- + 2 files changed, 161 insertions(+), 160 deletions(-) + +commit 9ae4b219e1c5b7a8c139b004a97d86a1ce1d408c +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 14:47:16 2008 +0000 + + [test/solid-pattern-cache-stress] Check for drand48(). + + Apply an alternative rand() function if drand48() is not available for + the platform. + + configure.in | 2 +- + test/solid-pattern-cache-stress.c | 12 ++++++++++-- + 2 files changed, 11 insertions(+), 3 deletions(-) + +commit 648289c639618cc31394f889f6e329ddcaca41ee +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 14:36:57 2008 +0000 + + [configure.in] Add paranoid double checking for (svg|pdf)2png + + Due to my incomplete cross-build environment, configure detects the + presence of rsvg and poppler, but they cannot be used. To make my life + easier, add a check similar to that used for fontconfig to ensure the + libraries are usable before compiling the optional test utilites. + + configure.in | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +commit 909c57ce158e41bf2761f82b2678dc1f390051d2 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 12:45:58 2008 +0000 + + [cairo-pdf-operators] Be consistent in error checks. + + Consistently check the output status at the end of each function - + helps with early error detection and even improves test code coverage! + + src/cairo-pdf-operators.c | 39 ++++++++++++++++++++------------------- + 1 files changed, 20 insertions(+), 19 deletions(-) + +commit 4ffb0a80b3aa9e54804082a24c58db0d2527073d +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 12:51:07 2008 +0000 + + [cairo-paginated-surface] Call the abstract cairo_surface_show_page (). + + Use the generic surface layer cairo_surface_show_page() instead of + directly calling cairo_paginated_surface_show_page(), as the higher + level performs more error checking. + + src/cairo-paginated-surface.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 9d49c4b10e636c0868d15c50cb1d2a724000fc07 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 14:18:25 2008 +0000 + + [configure] Print version info in summary. + + Add the cairo version to the configure summary. + + configure.in | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit ea4dec08f7c62ad3c3e81aa06ce0dd5a08936c45 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 13:50:42 2008 +0000 + + [configure.in] Fixup fontconfig check. + + Correct the check for FcFini() so that the result is actually used. + + configure.in | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit f4e7e7d6b4bb8e96dc8aef1ac673b8d64f65634c +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 13:08:23 2008 +0000 + + [cairo-path-bounds] _cairo_path_fixed_bounds() should never fail. + + _cairo_path_fixed_bounds() should never fail so change return type + to void and update caller. + + src/cairo-analysis-surface.c | 12 ++++-------- + src/cairo-path-bounds.c | 8 ++++---- + 2 files changed, 8 insertions(+), 12 deletions(-) + +commit 5fad969317186520ebbe09f3767907fb3bfd6164 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Jan 7 10:03:51 2008 +0000 + + [cairo-ft-font] Destroy unscaled font ref on error. + + Destroy the local reference taken to the unscaled font if we encounter + an error whilst creating the derived scaled font. + + src/cairo-ft-font.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit 3b1411167c7d9fd94536c69de54dacfaf820e916 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 10 12:55:08 2008 +0000 + + [headers] Brute force fixup of including cairoint.h from boilerplate. + + More the majority of the typedefs from cairoint.h to + cairo-types-private.h and fixup cairo-pdf-operators-private.h to + avoid including cairoint.h. + + A better approach would seem to be to rationalise cairoint.h so that it + only provides the symbol aliasing, moving the types and functions to + more appropriate private headers. However, this fixes the immediate + problem of running make check! + + src/cairo-pdf-operators-private.h | 3 +- + src/cairo-types-private.h | 169 ++++++++++++++++++++++++++++++++++++ + src/cairoint.h | 170 +------------------------------------ + 3 files changed, 172 insertions(+), 170 deletions(-) + +commit 40142d4bf4184dcae21c85d909d33ddaa4822636 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Thu Jan 10 02:57:30 2008 +1030 + + Set the PS level to to minimum required + + A problem with the previous commit for checking the PS level is that + with the default PS level of 3 it prevents PS files from printing on + Level 2 printers even if no Level 3 operators are used. + + As the PS header is created after the page content has been generated, + it is easy to check the PS Level actually required and set this in the + header and PS level check code. + + src/cairo-ps-surface-private.h | 1 + + src/cairo-ps-surface.c | 10 +++++++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +commit 9bccc968466e6b83ceccb76680d5f54912424e8e +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Thu Jan 10 02:34:02 2008 +1030 + + Add PS Level check to PS output + + http://bugzilla.mozilla.org/show_bug.cgi?id=406376 + + reported problems with cairo PostScipt output printing black boxes + instead of images. This was found to caused by printing Level 3 + PostScript to a Level 2 printer. + + Add some PostScript code to to the cairo PS prolog to check the + language level of the printer. If the printer can not print the job, a + message stating the required language level is printed and the job is + aborted. + + src/cairo-ps-surface.c | 16 ++++++++++++---- + 1 files changed, 12 insertions(+), 4 deletions(-) + +commit f20a1a40c3f6d95b4dc89ae4198ad81b7092450c +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Wed Jan 9 01:20:34 2008 +1030 + + Fix MSVC 2008 compiler warnings - bug 13698 + + src/cairo-win32-surface.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit 47bebc8f1d0b6524f8d1eff1fa3f981f1e4c4c33 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Wed Jan 9 01:18:44 2008 +1030 + + Fix win32-font problems with Type 1 fonts + + This should fix the problems reported in + + http://lists.cairographics.org/archives/cairo/2007-November/012172.html + + The problem is that GetCharacterPlacement() used in + _win32_scaled_font_text_to_glyphs returns utf16 instead of glyph + indices when Type 1 fonts are used. + + This has been fixed by using GetGlyphIndices instead of + GetCharacterPlacement if the font is a Type 1. + + _win32_scaled_font_map_glyphs_to_unicode has been fixed work with Type 1 + glyph indices. It now uses GetFontUnicodeRanges and GetGlyphIndices + to do the reverse lookup. + + src/cairo-win32-font.c | 261 ++++++++++++++++++++++++++++++++++++++++-------- + 1 files changed, 218 insertions(+), 43 deletions(-) + +commit 25f24e79f84e0c04a8c6944cc6e018e9eb2df997 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:19:35 2008 +1030 + + PDF: Update the PDF page structure comment + + src/cairo-pdf-surface.c | 68 +++++----------------------------------------- + 1 files changed, 8 insertions(+), 60 deletions(-) + +commit 21f842f0dfd5dd3cc1fd3b56db034fc4e209adaa +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:17:26 2008 +1030 + + PDF: Remove copy_page + + Now that the content stream is no longer split into multiple streams + it is not possible to implement a copy_page function that shares the + common content between pages. + + Remove this function so the paginated surface will rewrite the + content from the meta surface. + + src/cairo-pdf-surface.c | 15 +-------------- + 1 files changed, 1 insertions(+), 14 deletions(-) + +commit e2adb921f8b7619410db971d1524cbeab2dd6102 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:15:18 2008 +1030 + + PDF: Put each fallback image in a separate group + + Each fallback image needs to be in a separate group in the knockout + group. Otherwise transparent edges of adjacent fallback images will + composite with each other creating visible seams between the images. + + src/cairo-pdf-surface-private.h | 2 +- + src/cairo-pdf-surface.c | 26 ++++++++++++++++++++------ + 2 files changed, 21 insertions(+), 7 deletions(-) + +commit d6a84302a07d2b7e67584029fdb7a882ad246a09 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:11:46 2008 +1030 + + Fix analysis of transformed meta surfaces + + src/cairo-analysis-surface.c | 11 ++++++++--- + 1 files changed, 8 insertions(+), 3 deletions(-) + +commit 3c725d50db43b848b4ad8f35bcabd5b1d0395924 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:09:04 2008 +1030 + + PDF: Make _SOURCE operator work inside meta surface patterns + + src/cairo-pdf-surface.c | 16 +++++++++++++--- + 1 files changed, 13 insertions(+), 3 deletions(-) + +commit 6d6b74ac4ce3a9bcab45c338fc31e5a83823cde6 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:08:09 2008 +1030 + + PDF: Support _OPERATOR_SOURCE when nothing under the operation + + CAIRO_OPERATOR_SOURCE operations on the PDF backend are now natively + supported when there is nothing already underneath the operation. + + src/cairo-pdf-surface.c | 64 +++++++++++++++++++++------------------------- + 1 files changed, 29 insertions(+), 35 deletions(-) + +commit e195cb551caa40f309127ac7a39e4a17653966c8 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:05:36 2008 +1030 + + Add FALLBACK mode to paginated surface + + The PDF surface needs to know when the fallback images start so it can + close off the content stream and create a knockout transparency group + for the fallback images. Currently it does this by looking for + operations with CAIRO_OPERATOR_SOURCE. PDF returns unsupported for + _SOURCE during the analysis phase so _SOURCE will never appear during + native operations. However this prevents the PDF surface from + supporting _SOURCE operations that can be natively supported. For + example a _SOURCE operation with nothing painting under it can be + converted to _OVER and natively supported. + + A third mode, CAIRO_PAGINATED_MODE_FALLBACK, has been added. The + paginated surface will set this mode before it paints finer-grained + fallback images. + + src/cairo-paginated-private.h | 22 +++++++++++++--------- + src/cairo-paginated-surface.c | 4 +++- + src/cairo-pdf-surface.c | 2 +- + src/cairo-types-private.h | 3 ++- + 4 files changed, 19 insertions(+), 12 deletions(-) + +commit d2a5d1ace64cb9efabcb065e7fc28667dd8f779d +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 21:04:06 2008 +1030 + + PDF: Remove the remaining code for splitting the content + + across multiple streams. This fixes the problem reported here + + http://lists.cairographics.org/archives/cairo/2007-December/012197.html + + src/cairo-pdf-surface-private.h | 20 +-- + src/cairo-pdf-surface.c | 429 +++++++++++---------------------------- + 2 files changed, 123 insertions(+), 326 deletions(-) + +commit 099810b6c39cc6b5529f740282b64185cf56c8d7 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 20:59:22 2008 +1030 + + PDF: Perform all clipping in the content stream + + Previously this was done in a separate group. Now that the PDF backend + has been re-organized to not interrupt the content stream the clipping + can be done in the same stream. + + src/cairo-pdf-surface.c | 104 +++++----------------------------------------- + 1 files changed, 12 insertions(+), 92 deletions(-) + +commit 83630b1c70b24035b333ccfbbda8b67bd5fdd32e +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 20:55:56 2008 +1030 + + PDF: Emit all patterns after content stream + + To fix this performance issue + + http://lists.cairographics.org/archives/cairo/2007-December/012197.html + + the PDF surface needs to avoid starting and stopping the content + stream every time it emits a pattern. This patch makes the PDF surface + store a list of all patterns used while the content stream is written + out then write out all the patterns after the content stream is + closed. + + src/cairo-pdf-surface-private.h | 48 ++- + src/cairo-pdf-surface.c | 1128 ++++++++++++++++++++++----------------- + 2 files changed, 687 insertions(+), 489 deletions(-) + +commit b4e0864b960887fd71de85d514cb3e855c276080 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 20:42:15 2008 +1030 + + Use _cairo_pattern_create_copy() in cairo-surface.c + + Use _cairo_pattern_create_copy()/cairo_pattern_destroy() instead of + _cairo_pattern_init_copy()/_cairo_pattern_fini() so the PDF backend + can reference the patterns and destroy them later. + + src/cairo-surface.c | 84 +++++++++++++++++++++++++------------------------- + 1 files changed, 42 insertions(+), 42 deletions(-) + +commit 6ead8feaf3f87e12e686092386dddcc2faa62b7f +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 20:41:43 2008 +1030 + + Add _cairo_pattern_create_copy() + + src/cairo-pattern.c | 28 ++++++++++++++++++++++++++++ + src/cairoint.h | 4 ++++ + 2 files changed, 32 insertions(+), 0 deletions(-) + +commit 26c6159b1e2f5481fb18f5f06f01063002dd6c98 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 20:36:32 2008 +1030 + + Move the PDF drawing operators into cairo-pdf-operators.c + + By defining PostScript functions the same as the PDF drawing + operators, this code can be shared by both the PDF and PS backends. + + src/Makefile.am | 1 + + src/cairo-pdf-operators-private.h | 106 ++++++++ + src/cairo-pdf-operators.c | 531 +++++++++++++++++++++++++++++++++++++ + src/cairo-pdf-surface-private.h | 3 +- + src/cairo-pdf-surface.c | 442 ++++--------------------------- + 5 files changed, 687 insertions(+), 396 deletions(-) + +commit a0e0aae32dfe44cca088736d10d208f328d50a34 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Mon Jan 7 20:34:55 2008 +1030 + + PDF: Remove the Type 3 outline glyph code + + This code is never used because outline glyphs that go through the + fallback path are always embedded with Type 1 fallback. The only fonts + that are embedded as Type 3 are bitmap fonts. + + src/cairo-pdf-surface.c | 90 +++------------------------------------------- + 1 files changed, 6 insertions(+), 84 deletions(-) + +commit 5b3f6405d8045d73d31d7e2e30db08e81e9e2360 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Sun Jan 6 16:15:32 2008 +1030 + + PDF: Fix gradient-zero-stops test failure + + src/cairo-pdf-surface.c | 24 ++++++++++++++++++++++++ + 1 files changed, 24 insertions(+), 0 deletions(-) + +commit fb7407c9c4548fc033164790759c4e480b9d8fa0 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Sun Jan 6 15:58:46 2008 +1030 + + PS: Fix gradient-zero-stops test failure + + src/cairo-ps-surface.c | 18 ++++++++++++++++++ + 1 files changed, 18 insertions(+), 0 deletions(-) + +commit f440d894e668994721248dc6c95a936a839870db +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 5 21:20:45 2008 +0000 + + Check errno for appropriate error return. + + After using fopen() and friends check the global errno to determine the + most appropriate error return - especially important when running + memfault, where correct reporting of NO_MEMORY errors is required. + + src/cairo-output-stream.c | 12 ++++++++++-- + src/cairo-png.c | 10 ++++++++-- + src/cairo-ps-surface.c | 11 ++++++++++- + 3 files changed, 28 insertions(+), 5 deletions(-) + +commit 68a441e582c6c887e65800302906ddd35cb0291e +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 5 19:34:42 2008 +0000 + + [cairo-analysis-surface] Return early if the traps is empty. + + If the mask is empty, there is nothing to do, so return an early SUCCESS. + + src/cairo-analysis-surface.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +commit 481fd3b4c8d3972ce21399f81b2021a57ed58f00 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 5 19:33:21 2008 +0000 + + [cairo-traps] Return zero extents if it contains no traps. + + Previously, _cairo_traps_extents () returned the extents + p1={INT_MAX, INT_MAX} p2={INT_MIN, INT_MIN} for an empty traps leading + to integer overflow when computing the width using p2-p1 and causing + further overflows within libpixman. [For example this caused the + allocation of massive regions with test/mask and the PS backend.] + + src/cairo-gstate.c | 6 +++--- + src/cairo-traps.c | 6 +++++- + 2 files changed, 8 insertions(+), 4 deletions(-) + +commit be126b6842e979dbcb306b2f9f41a2114a149b9a +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sat Jan 5 19:22:57 2008 +0000 + + [cairo-analysis-surface] Check for an empty transformed bbox. + + After transforming the bbox, check that it has not been projected into + an empty box. + + src/cairo-analysis-surface.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +commit d9461733af36f2960525a9b33accf500447f5c64 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri Jan 4 16:43:54 2008 +0000 + + [cairo-ps-surface] Use ctime_r when available. + + Use the thread-safe (and non-allocating) ctime_r() instead of ctime() + if supported by the platform. + + configure.in | 2 +- + src/cairo-ps-surface.c | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +commit 7cf9a6e4e39b18f4967afdb7c3c71eca5f4ba8c7 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 3 18:37:53 2008 -0800 + + Directly check the miter corner to detect wild miters. + + The original test for wild miters would only work with a square transform + (and, in fact, the original code required an identity transform). Instead of + fixing that, I replaced it with a more obvious test which makes sure the + miter corner lies between the two faces and not out in space somewhere. + + src/cairo-path-stroke.c | 139 +++++++++++++++++++---------------------------- + 1 files changed, 57 insertions(+), 82 deletions(-) + +commit 552cf1dbd32eb5933bc93bb3c1ef0fca9d4066aa +Author: Vladimir Vukicevic <vladimir@pobox.com> +Date: Fri Jan 4 16:19:14 2008 -0800 + + Fix cairo_surface_fallback_snapshot's use of release_source_image + + &image_extra was being passed instead of image_extra to release; the + bug only manifested itself when the particular backend did something + with image_extra. + + src/cairo-surface-fallback.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit 81e029edda8c0404c6f0bd1b618e77fb55777c64 +Author: Keith Packard <keithp@keithp.com> +Date: Thu Jan 3 18:17:24 2008 -0800 + + Add new miter-precision test. Checks miter joins at many scales. + + This demonstrates an error in cairo where miter joins are replaced with + bevels at high scale factors due to a test added to eliminate wild miters + drawn when the line faces are nearly parallel. + + test/.gitignore | 1 + + test/Makefile.am | 1 + + test/miter-precision-ref.png | Bin 0 -> 931 bytes + test/miter-precision.c | 80 ++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 82 insertions(+), 0 deletions(-) + +commit b796a2f69d043f6884f42befdc156cb1c527d217 +Author: Chris Wilson <ickle@cube.(none)> +Date: Thu Jan 3 23:00:27 2008 +0000 + + [cairo] Update CAIRO_STATUS_LAST_STATUS + + A couple of new errors have been added without updating the LAST_STATUS + value... + + src/cairo.c | 2 +- + src/cairo.h | 1 + + 2 files changed, 2 insertions(+), 1 deletions(-) + +commit c67d99787cb75cd4d773871675b4201b3bf3d5bf +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 3 17:33:33 2008 +0000 + + [test/surface-pattern-big-scaled-down] Kill the surface leaks. + + Destroy the surface and pattern after use. + + test/Makefile.am | 1 + + test/surface-pattern-big-scale-down-ref.png | Bin 0 -> 226 bytes + test/surface-pattern-big-scale-down.c | 11 ++++++++--- + 3 files changed, 9 insertions(+), 3 deletions(-) + +commit 6a7a07adf98729fc054ea9e7727c5b3c099ae7ee +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 3 16:37:17 2008 +0000 + + [test] Update distribution list of ref images. + + Add missing *-ps-rgb24-ref.png images, and a couple of tests to .gitignore. + + test/.gitignore | 3 +++ + test/Makefile.am | 34 ++++++++++++++++++++++++++++++++++ + 2 files changed, 37 insertions(+), 0 deletions(-) + +commit 399f7c24e31a802e623cf9d63311f3ed7f3a3659 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue Oct 9 23:24:35 2007 +0100 + + [cairo-pdf-surface] Continue to close streams even after error. + + Do not return after encountering the first error whilst closing streams, + but continue to close any auxiliary streams before finally reporting the + error. Also during finalize check that we have closed any streams that + may have been left open after encountering an error. + + src/cairo-pdf-surface.c | 54 ++++++++++++++++++++++++++++++++++++++-------- + 1 files changed, 44 insertions(+), 10 deletions(-) + +commit 42e77c1077f389357faab214d7ad8bc18709cb31 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue Oct 9 16:59:45 2007 +0100 + + [cairo-pdf-surface] Destroy closed streams. + + Destroy the streams when closing groups in order to free the associated + resources. + + src/cairo-pdf-surface.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit 42bfe370f8df800419c1c7acbec1a7e51077d462 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 3 14:46:40 2008 +0000 + + [cairo-pdf-surface] Propagate error from emit_glyph(). + + Propagate the error and return early rather than setting the error on + the surface and continuing. + + src/cairo-pdf-surface.c | 31 ++++++++++++++++++++----------- + 1 files changed, 20 insertions(+), 11 deletions(-) + +commit 2a8e80f59ef61cff30d643bdd6ad2306d6068c5c +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Jan 3 10:34:37 2008 +0000 + + [cairo-gstate] Rearrange invalid-matrix guards. + + Test for an invalid matrix before use. Whilst this has no effect on the + result, an INVALID_MATRIX error will be raised on the context, placing + the guards first makes the code obviously safe and avoids manipulation + of invalid matrices. + + src/cairo-gstate.c | 15 ++++++++------- + 1 files changed, 8 insertions(+), 7 deletions(-) + +commit e89cc8fa15ac418175e58ee41359a923bbc26f73 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue Dec 18 09:23:29 2007 +0000 + + [cairo-scaled-fonts-subsets] Memleak and error reporting. + + Fix leaks of strings and hash table from + _cairo_scaled_font_subset_create_glyph_names(). + + Whilst we are in the vicinity, review the error handling. + + src/cairo-ft-font.c | 8 ++- + src/cairo-pdf-surface.c | 12 ++++- + src/cairo-scaled-font-subsets.c | 94 ++++++++++++++++++++------------------- + src/cairo-win32-font.c | 6 ++- + src/cairoint.h | 2 +- + 5 files changed, 68 insertions(+), 54 deletions(-) + +commit 51f37995c9cb5efa22a36a0199e24a684fa61279 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 11:06:03 2008 +0000 + + Remove cairo_private from *.c files. + + The cairo_private markup is only required in the headers, so cleanup the + couple of remaining occurrences in the source files. + + src/cairo-clip.c | 2 +- + src/cairo-scaled-font-subsets.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 48fd65cdb50cd1fa0a6ada5edf7ef307586eb5fd +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:59:44 2008 +0000 + + [cairo-svg-surface] Propagate the original error status. + + Return the error status from the paginated surface instead of + hard-coding a bare CAIRO_STATUS_NO_MEMORY. + + src/cairo-svg-surface.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit ba392488cb926c2697b8ccfa7337da1e66d78baa +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:58:13 2008 +0000 + + [cairo-ps-surface] Wrap error site with _cairo_error(). + + Wrap the original allocation error site with _cairo_error(). + + src/cairo-ps-surface.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 4442acc96601db21a788e088040cb1f2fccdf400 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:54:30 2008 +0000 + + [cairo-atsui-font] Minor _cairo_error() tidy. + + Inline the use of _cairo_error() for slightly improved readability. + + src/cairo-atsui-font.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +commit 2a0267639a39cacada89c59451faa8051041e436 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:52:28 2008 +0000 + + [cairo-ps-surface] Wrap error site with _cairo_error(). + + Markup the original error site for CAIRO_STATUS_TEMP_FILE_ERROR with + _cairo_error(). + + src/cairo-ps-surface.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit cc5bd4725564d0add79c764b35acff78e43d0c00 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:50:55 2008 +0000 + + [cairo-svg-surface] Wrap a couple of error sites with _cairo_error(). + + Wrap a couple of bare CAIRO_STATUS_NO_MEMORY with a call to + _cairo_error(). + + src/cairo-svg-surface.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +commit daf77ed3cb0d24f35ebb43760d6ba6de639d4636 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:41:06 2008 +0000 + + [cairo-type1-subset] Remove the unused return value. + + Nobody actually used the index returned by + cairo_type1_font_subset_use_glyph(), so remove it. + + src/cairo-type1-subset.c | 9 +++------ + 1 files changed, 3 insertions(+), 6 deletions(-) + +commit fd8bf678536877d9b016264d40a101a1fd2d9e25 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Jan 2 10:37:58 2008 +0000 + + [cairo-truetype-subset] Propagate error from failing to allocate padding. + + Before filling the padding, check that we have successfully allocated + the buffer - otherwise propagate the failure. + + src/cairo-truetype-subset.c | 51 +++++++++++++++++++++++++++---------------- + 1 files changed, 32 insertions(+), 19 deletions(-) + +commit ad0a2524ffdc9cc949d11de3aa51c429f13e12b7 +Author: Claudio Ciccani <klan@directfb.org> +Date: Wed Jan 2 15:09:58 2008 +0100 + + [cairo-directfb] Optimize blend functions in fill_rectangles(), too. + + src/cairo-directfb-surface.c | 25 ++++++++++++++++++++++++- + 1 files changed, 24 insertions(+), 1 deletions(-) + +commit 060f384310e887f7f431a98e847b8a36fc303a0c +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Sat Dec 29 00:26:11 2007 +1030 + + Fix PS/PDF meta surface patterns + + This was failing with more than one level of push/pop group. The + problem was that the meta surface replay in PS/PDF emit_meta_surface + was replaying all the meta surface commands insteads of only the + natively supported commands. The analysis surface has also been + changed to replay meta surface patterns back to the one analysis + surface instead of creating a separate analysis surface for each + pattern. The analysis surface now transforms bounding boxes with the + meta surface pattern matrix so that fallback regions are correctly + tracked. + + src/cairo-analysis-surface.c | 44 +++++++++++++++++++++++++++++++--------- + src/cairo-meta-surface.c | 18 +--------------- + src/cairo-paginated-surface.c | 1 + + src/cairo-pdf-surface.c | 4 ++- + src/cairo-ps-surface.c | 20 ++++++++++++------ + 5 files changed, 52 insertions(+), 35 deletions(-) + +commit 4fa46e3caaffb54f4419887418d8d0ea39816092 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Sat Dec 29 00:15:03 2007 +1030 + + Implement a win32 tmpfile() function + + Bug report and proposed patch at: + http://lists.cairographics.org/archives/cairo/2007-December/012529.html + + On Windows the tmpfile() function creates the file in the root + directory. This will fail if the user does not have write access to the + root directory. + + Implement _cairo_win32_tmpfile() that is #defined as tmpfile() on + Windows. This function uses GetTempPath() and GetTempFileName() to + create the temporary file. CreateFile() is used to open the file so + the DELETE_ON_CLOSE flag can be set. + + src/Makefile.am | 3 +- + src/cairo-win32.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/cairoint.h | 6 +++ + 3 files changed, 106 insertions(+), 1 deletions(-) + +commit dcacad932334bbcc3cf6b1df3b37412db5017116 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Sat Dec 29 00:13:24 2007 +1030 + + PS: Use _TEMP_FILE_ERROR for temp file errors + + src/cairo-ps-surface.c | 18 +++++++++++++++--- + 1 files changed, 15 insertions(+), 3 deletions(-) + +commit bd44d114a6d4271a4a15cf7d70a996e73a86751c +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Sat Dec 29 00:12:44 2007 +1030 + + Add CAIRO_STATUS_TEMP_FILE_ERROR + + src/cairo.c | 2 ++ + src/cairo.h | 4 +++- + 2 files changed, 5 insertions(+), 1 deletions(-) + +commit e82b0f46b2ea6ebcee5ea5cc09e9ab5c6cc383fb +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Wed Nov 14 00:45:24 2007 +0000 + + [cairo-path-fixed] Consolidate cairo_path_buf_t when copying. + + When copying the cairo_path_fixed_t, consolidate the list of + dynamically allocated cairo_path_buf_t into a single buffer. + + src/cairo-path-fixed.c | 33 +++++++++++++++++++++++++-------- + 1 files changed, 25 insertions(+), 8 deletions(-) + +commit e0187ad49b754c4024f1999155ed248616028582 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 27 12:46:13 2007 +0000 + + [cairo-path-fixed] Ensure the points array is naturally aligned, take 2. + + By enlarging buf_size to ensure the correct alignment of the points + array with the cairo_path_buf_t block, we can efficiently use the + padding bytes to store more ops. + + src/cairo-path-fixed.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +commit d8169b8cef041b4dbcea44e050df28659f4846aa +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 27 10:45:25 2007 +0000 + + [cairo-path-fixed] Ensure the array of points is correctly aligned. + + In http://bugs.gentoo.org/show_bug.cgi?id=203282, it was identified that + the cairo_path_buf was causing unaligned accesses (thus generating SIGBUS + on architectures like the SPARC) to its array of points. As we manually + allocate a single block of memory for the cairo_path_buf_t and its + arrays, we must also manually ensure correct alignment - as opposed to + cairo_path_buf_fixed_t for which the compiler automatically aligns the + embedded arrays. + + src/cairo-path-fixed.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +commit 7f69c2588b33d415f544c2ee24d85c83a8d7cd69 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 21:15:41 2007 +0000 + + [cairo-ps-surface] Missing status checks. + + Check and propagate the error status. + + src/cairo-ps-surface.c | 53 +++++++++++++++++++++++++++++------------------ + 1 files changed, 33 insertions(+), 20 deletions(-) + +commit 51523aec8177224d3f64f55ca2e61c64fe801a56 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 21:15:08 2007 +0000 + + [cairo-meta-surface] Remove redundant _cairo_error(). + + Remove the _cairo_error() from the return, as it has already been called + immediately after the error was first detected. + + src/cairo-meta-surface.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 146484e3122958212d4a69fff97d392451dcbeaa +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 21:13:31 2007 +0000 + + [valgrind] Update zlib suppressions. + + Match the zlib library as found on hardy+dbgsym. + + test/.valgrind-suppressions | 37 +++++++++++++++++++++++++++++++++++++ + 1 files changed, 37 insertions(+), 0 deletions(-) + +commit d4d3873bccea82bb3ae20bfcbab3158fa5df41b3 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 18:21:46 2007 +0000 + + [cairo] Correct the documentation for cairo_get_group_target(). + + cairo_get_group_target() can never return NULL, but will always + return the current destination surface. + + src/cairo.c | 20 +++++++++++--------- + 1 files changed, 11 insertions(+), 9 deletions(-) + +commit 3bf06c336629d9a485fdb150058897e5a6a30b45 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 18:15:48 2007 +0000 + + [test/*] Create new surfaces using the group target. + + cairo_get_target() returns the original surface passed to + cairo_create(), and not the current destination as required when + testing drawing to the same surface using multiple contexts. + + For completeness we also use the group target when creating similar + surfaces within the tests (to check that similar surfaces of similar + surfaces also work). + + perf/cairo-perf-cover.c | 4 ++-- + test/cairo-test.c | 2 +- + test/clip-nesting.c | 2 +- + test/clip-operator.c | 2 +- + test/clip-zero.c | 2 +- + test/device-offset-positive.c | 2 +- + test/device-offset.c | 2 +- + test/get-clip.c | 2 +- + test/get-path-extents.c | 2 +- + test/invalid-matrix.c | 2 +- + test/mask.c | 4 ++-- + test/meta-surface-pattern.c | 2 +- + test/operator-clear.c | 2 +- + test/operator-source.c | 4 ++-- + test/pixman-rotate.c | 2 +- + test/self-copy.c | 2 +- + test/source-clip-scale.c | 2 +- + test/source-clip.c | 2 +- + test/svg-clip.c | 2 +- + test/unbounded-operator.c | 2 +- + 20 files changed, 23 insertions(+), 23 deletions(-) + +commit 643834e7aa3e90678276453439017359ef942c9e +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 17:51:48 2007 +0000 + + [cairo-surface] Return UNSUPPORTED for acquire_(dest|source)_image. + + If the backend does not support fallbacks ie backend->acquire_dest_image + or backend->acquire_source_image is NULL, then return + CAIRO_INT_STATUS_UNSUPPORTED rather than attempt to jump to the NULL + hooks. + + src/cairo-surface.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +commit 14454e12d8df606ed4b79c6e7cda4071b00ee581 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 17:49:06 2007 +0000 + + [cairo-test] Wrap test function with cairo_save/restore(). + + Restore the context to the original state before blitting the + group surface in order to remove any residual state such as a clip path. + + test/cairo-test.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit d0119a5aa24a8b426ec64bb2eaa205b7f08ae58a +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Thu Dec 20 12:30:35 2007 -0500 + + [cairo-unicode] Don't compile _cairo_utf8_to_utf16 on Linux + + The _cairo_utf8_to_utf16() is only used in win32 and atsui font backends. + Don't build it if none of those two are available. + + src/cairo-unicode.c | 2 ++ + src/cairoint.h | 5 +++++ + 2 files changed, 7 insertions(+), 0 deletions(-) + +commit 281b11aef14f04b12639028e2a76bbdc7a1a32bf +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Thu Dec 20 17:11:03 2007 +0000 + + [cairo-test] Use CAIRO_OPERATOR_SOURCE when painting the group surface. + + To correctly copy a surface onto the destination irrespective of its + content requires the SOURCE operator. Forgetting to do so here causes + uninitialized pixels to be mixed into the result and the failure of + many tests for the similar surface. Oops... + + test/cairo-test.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit ed3fccec01257a7c52694150cda9ea1059c33585 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Dec 17 22:37:31 2007 +0000 + + [pdiff] Avoid the memleak for small surfaces. + + Allocate the arrays after the guard against small surfaces to avoid + leaking them. + + test/pdiff/pdiff.c | 40 +++++++++++++++++++++++++++------------- + 1 files changed, 27 insertions(+), 13 deletions(-) + +commit df938a515bd59138421b6ab4419966805d027b52 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Dec 17 21:39:25 2007 +0000 + + [cairo-path-bounds] Check for the empty path. + + Avoid returning uninitialized variables if we're asked to find the + bounds of an empty path - in which case we just return a rectangle + of zero width and height similar to the empty clip region. + + src/cairo-path-bounds.c | 18 ++++++++---------- + 1 files changed, 8 insertions(+), 10 deletions(-) + +commit c2adfb4052f72e1e6e6d283de3428b5453dac537 +Author: Jim Meyering <jim@meyering.net> +Date: Sat Dec 15 16:42:25 2007 +0100 + + Don't leak memory upon failed realloc. + + * cairo-glitz-surface.c (_cairo_glitz_surface_composite_trapezoids): + + Signed-off-by: Jim Meyering <meyering@redhat.com> + + src/cairo-glitz-surface.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +commit 45951345983f100e935af2fe2f5397d64c195f98 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Tue Dec 18 16:00:21 2007 -0500 + + [directfb] Fix header include order to include cairoint.h first + + src/cairo-directfb-surface.c | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +commit 18f4f02f723cd005c159c8a0044dd385d551f022 +Author: Nis Martensen <nis.martensen@web.de> +Date: Tue Dec 18 15:59:19 2007 -0500 + + [src/check-cairoint.sh] Fix typo in shell script + + src/check-cairoint.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 8343d6cc2a5e9198e1205e431de018f74107d9d8 +Author: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon Dec 17 13:42:07 2007 +0000 + + Replace various uses of CAIRO_STACK_BUF_SIZE with a single macro. + + In http://bugs.freedesktop.org/show_bug.cgi?id=13699, Pavel Vozenilek + reports a duplicate define for computing the appropriate length for an + on-stack array. The macro in question, and a few other places, was + performing CAIRO_STACK_BUF_SIZE/sizeof(stack[0]) so we can simplify + them slightly by using a common macro. + + src/cairo-bentley-ottmann.c | 2 +- + src/cairo-gstate.c | 10 ++++------ + src/cairo-image-surface.c | 12 ++---------- + src/cairo-region.c | 4 +--- + src/cairo-surface.c | 2 +- + src/cairo-traps.c | 4 +--- + src/cairo-xlib-surface.c | 7 ++----- + src/cairoint.h | 2 ++ + 8 files changed, 14 insertions(+), 29 deletions(-) + +commit 627a8b4a2f2824f156893382561f563d0aa9e90d +Author: Benjamin Otte <otte@gnome.org> +Date: Mon Dec 17 12:42:14 2007 +0100 + + [directfb] replace u32 with uint32_t + + This fix makes it compile for me again + + src/cairo-directfb-surface.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +commit 9637ffc62fab1b42ceb764d1b42e70654e0cbe2b +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 17 01:55:15 2007 -0500 + + [cairo-xlib] Minor cleanup and add comment + + src/cairo-xlib-surface.c | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +commit 83963d2a9ec445e23cfbe692b877177a9d9d135e +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 17 01:19:53 2007 -0500 + + [cairo-ft] Revert "Force non-AA text when using a bitmap strike with only scaling transform." (#13479) + + The reasoning for that commit was that fonts with bitmap strikes should be + rendered with antialiasing off for those (hopefully) few glyphs that don't + have a bitmap. + + However, it turns out, there are fonts that have some, but very few, bitmaps, + and this changed forces non-AA rendering on them. We now support multiple + glyph formats per font in the Xlib backend, so backing this out to let every + glyph render as is. Fontconfig rules can be used to force AA off on a per-font + basis. + + This reverts commit 06af5c2891b89da28581c30afcde06c5442884db. + + src/cairo-ft-font.c | 24 ------------------------ + 1 files changed, 0 insertions(+), 24 deletions(-) + +commit 805b668260c47e6d3d854361fcc53f12bd2a57e1 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 17 01:14:27 2007 -0500 + + [cairo-xlib] Support scale fonts with glyphs of multiple formats (#13479) + + We maintain three Xrender glyphsets per scaled font, one for each of A1, A8, + and ARGB32. This is required to correctly support fonts with bitmaps for + some glyphs but not all. + + src/cairo-xlib-surface.c | 179 +++++++++++++++++++++++++++++++++++----------- + 1 files changed, 136 insertions(+), 43 deletions(-) + +commit f6dd037cf3231c2dd0550b0f2e6f3179202c299f +Author: Carl Worth <cworth@cworth.org> +Date: Fri Dec 14 14:02:43 2007 -0800 + + Remove rasterization when a paginated surace is used as a source + + This was an old workaround for a bug that seems to no longer + exist. Thanks to Donn Ingle for pointing out the problem. + + src/cairo-paginated-surface.c | 34 ---------------------------------- + 1 files changed, 0 insertions(+), 34 deletions(-) + +commit 9b3ce8b17ab8179131ae45a227d76241916f42e8 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Wed Dec 12 23:41:53 2007 +1030 + + PS: Use the correct bounding box in Type 3 fonts + + Previously this was a fixed size. + + src/cairo-ps-surface.c | 44 +++++++++++++++++++++++++++++++++++++------- + 1 files changed, 37 insertions(+), 7 deletions(-) + +commit afdd53d35f53cfe3440c38531c112a586d3d7486 +Author: Adrian Johnson <ajohnson@redneon.com> +Date: Wed Dec 12 23:35:56 2007 +1030 + + PS: Return the status for emit_image and gradients + + src/cairo-ps-surface.c | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +commit 55f5c4ffda5df9064bd0a5a6a2cf1a09b058afbb +Author: Boying Lu <brian.lu@sun.com> +Date: Wed Dec 12 21:05:57 2007 +1030 + + Remove cairo_private from static declaration + + src/cairo-paginated-surface.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 942e3d53088a4d2b05c86d3f82b76cfbe707b3b5 +Author: Claudio Ciccani <klan@directfb.org> +Date: Tue Dec 11 15:50:05 2007 +0100 + + [cairo-directfb] Support some environment variables + + Added a couple of (boolean) env. vars affecting the backend: + CAIRO_DIRECTFB_NO_ACCEL, disables acceleration + CAIRO_DIRECTFB_ARGB_FONT, enables using ARGB fonts instead of A8 + + src/cairo-directfb-surface.c | 99 ++++++++++++++++++++++++++++++++--------- + src/cairo-directfb.h | 12 +++++- + 2 files changed, 88 insertions(+), 23 deletions(-) + +commit f3cec9d1c2a4d43cd734aae4bc7f8e7410a5e89a +Merge: 08516d9... c26084a... +Author: Claudio Ciccani <klan@directfb.org> +Date: Mon Dec 10 22:58:06 2007 +0100 + + Merge branch 'master' of git+ssh://klan@git.freedesktop.org/git/cairo + +commit c26084a45fcb6ac467cad8bdcedfb2f524b857fc +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 10 14:38:09 2007 -0500 + + Pass $(MAKE) to test shell scripts (#13591) + + src/Makefile.am | 2 +- + src/check-def.sh | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +commit 78dac47399038cc9a05b82b01c4e4b35132f0784 +Author: Behdad Esfahbod <behdad@behdad.org> +Date: Mon Dec 3 02:31:40 2007 -0500 + + [util/malloc-stats.c] Add a public function malloc_stats() + + Apparently glibc already provides the function: + + void malloc_stats (void); + + So, like we do for backtrace_symbols(), override the public symbol. + It still is defined as __destructor__ and runs at program finalization. + + util/malloc-stats.c | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +commit 08516d97a1b34cbb119d6d842ae31e4cb4e08740 +Author: Claudio Ciccani <klan@directfb.org> +Date: Mon Dec 10 18:54:01 2007 +0100 + + [cairo-directfb] Merging from directfb.org + + - Improved performance in case of surface conversion: allocate a shadow buffer that can only grow + - Fixed support for small surfaces (less than 8x8) + - Optimize the blending function according to the surface format + - Added _directfb_categorize_operation(): selects the blitting function according to the transform matrix + - Avoid inverting the matrix when doing a simple StretchBlit() + - Use TextureTriangles() instead of StretchBlit() when scale factors are negative + - Added support for ARGB32 fonts (converted to A8 internally) + - Removed unused functions (flush() and mark_dirty_rectangle()) + - Code cosmetics + + src/cairo-directfb-surface.c | 847 +++++++++++++++++++++++------------------- + 1 files changed, 466 insertions(+), 381 deletions(-) + +commit dd71ac910c3c176687fe4da582876bf46becf6d5 +Author: Benjamin Otte <otte@gnome.org> +Date: Mon Dec 10 13:17:09 2007 +0100 + + typo + + configure.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 1f1f96d6459014a236611edf811a60225a652044 +Author: Emmanuel Pacaud <emmanuel.pacaud@free.fr> +Date: Sat Dec 8 22:32:16 2007 +0100 + + [SVG] Fix a minor issue when emitting a radial gradient with r1 == r2. + + Minor because I don't know how the output is supposed to look in this case. + + src/cairo-svg-surface.c | 15 ++++++++------- + 1 files changed, 8 insertions(+), 7 deletions(-) + +commit 19680f545a1620d944322775c1b85b0e5f93fa0f +Author: Brian Ewins <Brian.Ewins@gmail.com> +Date: Thu Dec 6 21:31:15 2007 +0000 + + [quartz] fix gradient-zero-stops crash (moz#407104) + + Fixes failure in gradient-zero-stops test, reported + by Boris Zbarsky (thanks!) as Mozill a bug#407104. + + src/cairo-quartz-surface.c | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +commit e6c34bb6912d2801ee6c0d56ec0e98739c786e9f +Author: Brian Ewins <Brian.Ewins@gmail.com> +Date: Thu Dec 6 21:31:14 2007 +0000 + + [quartz] refactor gradient handling + + Avoid checking the gradient type twice. This refactor + also makes it easier to check when the gradient has no stops, + and will make it easier to separate out the different + implementations of EXTEND_REPEAT, REFLECT for linear and + radial gradients. + + src/cairo-quartz-surface.c | 206 +++++++++++++++++++++++--------------------- + 1 files changed, 107 insertions(+), 99 deletions(-) + +commit b81c8473bd0b8b829dc7eba9a105890f0c2f1158 +Author: Brian Ewins <Brian.Ewins@gmail.com> +Date: Thu Dec 6 21:31:10 2007 +0000 + + [test] add test for gradient with no stops + + Boris Zbarsky reported a bug where having zero stops in a + gradient pattern would crash in the quartz surface. This + test checks for that case. Mozilla bug#407104. + + This also crashes testing pdf; and the ps, svg surfaces + look suspicious (they reference stops[0]) but I havent + been able to test them yet. + + test/Makefile.am | 3 + + test/gradient-zero-stops-ref.png | Bin 0 -> 105 bytes + test/gradient-zero-stops-rgb24-ref.png | Bin 0 -> 105 bytes + test/gradient-zero-stops.c | 66 ++++++++++++++++++++++++++++++++ + 4 files changed, 69 insertions(+), 0 deletions(-) + +commit a7ae9c45d924effdd61390267eb216302a270d8e +Author: Peter Weilbacher <mozilla@weilbacher.org> +Date: Thu Dec 6 16:46:28 2007 +0100 + + [os2] add memory allocation wrappers for pixel buffers + + Add ability to use OS/2 APIs instead of C library functions to manage + pixel buffer allocations. This is to work around heap fragmentation. + This implements two wrapper functions which replace _cairo_alloc_abc and + free and when compiled with OS2_USE_PLATFORM_ALLOC the OS/2 functions + DosAllocMem and DosFreeMem will be used for allocation/deallocation. + + Also try to minimize the heap when shutting down the cairo library. + + src/cairo-os2-surface.c | 108 +++++++++++++++++++++++++++++++++++------------ + 1 files changed, 81 insertions(+), 27 deletions(-) + +commit be79779331ee29c0bfb74b728227719bb5dead6e +Author: Carl Worth <cworth@cworth.org> +Date: Wed Dec 5 09:24:17 2007 -0800 + + Restrict initial buggy version to X.Org 6.7 rather than 6.0 + + Also add some comments describing the test. + + src/cairo-xlib-display.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) + +commit d4138d1161c6b683fd0ef62a8d49ccf4ec4674bc +Author: Bernardo Innocenti <bernie@codewiz.org> +Date: Wed Dec 5 07:04:09 2007 -0500 + + Fix version check for buggy_repeat on modular Xserver 1.x + + The versioning of the X server has restarted from 1.0 in the + modular build. So we adjust the text to avoid considering + the new servers buggy. + + src/cairo-xlib-display.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 946b8fedb57fc0c70e4f82b2151433768479a11c +Author: Carl Worth <cworth@cworth.org> +Date: Wed Dec 5 02:30:58 2007 -0800 + + Fix misspellings + + NEWS | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +commit 94a35c7b71b2219d68e81272ce6328e46ae0e91e +Author: Carl Worth <cworth@cworth.org> +Date: Wed Dec 5 02:28:20 2007 -0800 + + Fix version number typo + + NEWS | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 6f2ec12b882e49b425b22145592243b8ce75b6a4 +Author: Carl Worth <cworth@cworth.org> +Date: Wed Dec 5 02:26:05 2007 -0800 + + Increment version to 1.5.5 after the 1.5.4 snapshot + + configure.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit e0c0275e1764502cfd1d0e93e374b4ed396f0073 +Author: Carl Worth <cworth@cworth.org> +Date: Wed Dec 5 02:06:33 2007 -0800 + + Increment version to 1.5.4 and to 14:1:12 + + configure.in | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + commit 11aaf992fb5d3d86f261ba48306adfaace9f96ea Author: Carl Worth <cworth@cworth.org> Date: Wed Dec 5 01:52:03 2007 -0800 diff --git a/Makefile.in b/Makefile.in index 07db86b..8f5cf17 100644 --- a/Makefile.in +++ b/Makefile.in @@ -106,6 +106,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ @@ -1,8 +1,103 @@ +Snapshot 1.5.6 (2008-01-15 Carl Worth <cworth@cworth.org>) +========================================================== +This is the third snapshot in cairo's unstable 1.5 series. It comes +about 6 weeks after the 1.5.4 snapshot. The only API addition compared +to 1.5.4 is very minor, (a new value CAIRO_STATUS_TEMP_FILE_ERROR). +The remainder of the changes are the usual accumulation of bug fixes +and improvements. See below for details. + +General bug fixes +----------------- +Fix handling of fonts that contain a mixture of outline and bitmapped +glyphs. There was a change in this handling in 1.5.4 that improved +some cases and also regressed other cases. Now, all cases should be +handled quite well. + +Fix alignment issues that were causing SIGBUS failures on SPARC. + +Fix a regression (which first appeared in 1.5.2) where stroking under +a large scale would sometimes incorrectly replace a miter join with a +bevel join. (Thanks to Keith Packard.) + +Fix reporting of zero-sized extents to be {0,0} rather than +{INT_MAX,INT_MIN}. This avoids several integer overflow and +allocations of massive regions in some cases. + +Fix failures of gradients with no stops, (quartz, ps, and pdf). + +Fix handling of Type 1 fonts on Windows platforms. + +Fix handling of Type 1 fonts with no specific family name in the font +itself, (generate a CairoFont-x-y name). + +Handle NULL string values in cairo_show_text, cairo_show_glyphs, and +friends. + +Many robustness improvements along error-handling paths, (thanks as +always, to Chris "ickle" Wilson). + +Various other minor fixes. + +Paginated backends (PDF/PostScript/win32-printing) +-------------------------------------------------- +Avoid unnecessary rasterization when using a paginated surface as a +source, (such as drawing from one pdf surface to another). + +Fix replaying of paginated surface with more than one level of push/pop +group. + +cairo-xlib +---------- +Fix xlib backend to not consider recent X server release as having a +buggy repeat implementation in the Render extension. + +cairo-pdf +--------- +Fix PDF output to avoid triggering very slow rendering in PDF viewers, +(avoid starting and stopping the content stream for each pattern +emission). + +Support CAIRO_OPERATOR_SOURCE in cases where there is nothing below +the object being drawn. + +Fix to avoid seams appearing between multiple fallback regions. + +cairo-ps (PostScript) +--------------------- +Use correct bounding box in Type 3 fonts. + +Fix several bugs in cairo's PostScript output. These include making +the PostScript output more compatible with recent versions of +ghostscript that are more strict about Type 3 fonts, for +example. + +Fix for win32 to not attempt to create temporary files in the root +directory, (where the user may not have write permission). + +Avoid generating Level 3 PostScript if Level 2 is sufficient. Also, +add code in output documents to alert the user if Level 3 PostScript +is handed to a device that cannot handle PostScript beyond Level +2. + +cairo-directfb +-------------- +Various performance optimizations. + +Fixed support for small surfaces (less than 8x8). + +Provide support for environment variables CAIRO_DIRECTFB_NO_ACCEL to +disable acceleration and CAIRO_DIRECTFB_ARGB_FONT to enable ARGB fonts +instead of A8. + +cairo-os2 +--------- +Allow OS/2 APIs instead of C library allocation functions. + Snapshot 1.5.4 (2007-12-05 Carl Worth <cworth@cworth.org>) ========================================================== This is the second snapshot in cairo's unstable 1.5 series. It comes just over 1 month after the 1.5.2 snapshot. There are no API changes -or additions in 1.5.3 compared to 1.5.2, but there are several bug +or additions in 1.5.4 compared to 1.5.2, but there are several bug fixes, and some optimizations. Most of these apply to particular backends. See below for details. @@ -26,13 +121,8 @@ the GIMP, for example. See: cairo 1.5.2 causes font problems in GIMP 2.4 status bar and evolution 2.12.1 https://bugs.freedesktop.org/show_bug.cgi?id=13084 -[XXX: Are we interpreting "cairo_new_path;cairo_clip" as a request to -clip everything? That wouldn't be consisten with how we treat -cairo_new_path;cairo_fill, for example. Will follow up on cairo -mailing list for more details.] - -PostScript improvments ----------------------- +PostScript improvements +----------------------- Fix bug leading to invalid PostScript files when rendering text, (need "0 0 xyshow" instead of "0 xyshow"). diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am index 7dd9c4d..1d9c342 100644 --- a/boilerplate/Makefile.am +++ b/boilerplate/Makefile.am @@ -77,7 +77,7 @@ libcairoboilerplate_la_SOURCES += cairo-boilerplate-xcb.c libcairoboilerplate_la_SOURCES += cairo-boilerplate-xcb-private.h endif -if CAIRO_HAS_XLIB_XRENDER_SURFACE +if CAIRO_HAS_XLIB_SURFACE libcairoboilerplate_la_SOURCES += cairo-boilerplate-xlib.c libcairoboilerplate_la_SOURCES += cairo-boilerplate-xlib.h libcairoboilerplate_la_SOURCES += cairo-boilerplate-xlib-private.h diff --git a/boilerplate/Makefile.in b/boilerplate/Makefile.in index 79773f3..c5e66d7 100644 --- a/boilerplate/Makefile.in +++ b/boilerplate/Makefile.in @@ -69,10 +69,9 @@ host_triplet = @host@ @CAIRO_HAS_WIN32_SURFACE_TRUE@am__append_14 = -lwinspool @CAIRO_HAS_XCB_SURFACE_TRUE@am__append_15 = cairo-boilerplate-xcb.c \ @CAIRO_HAS_XCB_SURFACE_TRUE@ cairo-boilerplate-xcb-private.h -@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@am__append_16 = \ -@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ cairo-boilerplate-xlib.c \ -@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ cairo-boilerplate-xlib.h \ -@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@ cairo-boilerplate-xlib-private.h +@CAIRO_HAS_XLIB_SURFACE_TRUE@am__append_16 = cairo-boilerplate-xlib.c \ +@CAIRO_HAS_XLIB_SURFACE_TRUE@ cairo-boilerplate-xlib.h \ +@CAIRO_HAS_XLIB_SURFACE_TRUE@ cairo-boilerplate-xlib-private.h subdir = boilerplate DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -123,7 +122,8 @@ am__libcairoboilerplate_la_SOURCES_DIST = cairo-boilerplate.c \ @CAIRO_HAS_WIN32_SURFACE_TRUE@ cairo-boilerplate-win32.lo \ @CAIRO_HAS_WIN32_SURFACE_TRUE@ cairo-boilerplate-win32-printing.lo @CAIRO_HAS_XCB_SURFACE_TRUE@am__objects_10 = cairo-boilerplate-xcb.lo -@CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@am__objects_11 = cairo-boilerplate-xlib.lo +@CAIRO_HAS_XLIB_SURFACE_TRUE@am__objects_11 = \ +@CAIRO_HAS_XLIB_SURFACE_TRUE@ cairo-boilerplate-xlib.lo am_libcairoboilerplate_la_OBJECTS = cairo-boilerplate.lo xmalloc.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ @@ -179,6 +179,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ diff --git a/boilerplate/cairo-boilerplate-xlib-private.h b/boilerplate/cairo-boilerplate-xlib-private.h index 65da947..54c631c 100644 --- a/boilerplate/cairo-boilerplate-xlib-private.h +++ b/boilerplate/cairo-boilerplate-xlib-private.h @@ -27,6 +27,7 @@ #ifndef _CAIRO_BOILERPLATE_XLIB_PRIVATE_H_ #define _CAIRO_BOILERPLATE_XLIB_PRIVATE_H_ +#if CAIRO_HAS_XLIB_XRENDER_SURFACE cairo_surface_t * _cairo_boilerplate_xlib_create_surface (const char *name, cairo_content_t content, @@ -34,6 +35,7 @@ _cairo_boilerplate_xlib_create_surface (const char *name, int height, cairo_boilerplate_mode_t mode, void **closure); +#endif cairo_surface_t * _cairo_boilerplate_xlib_fallback_create_surface (const char *name, diff --git a/boilerplate/cairo-boilerplate-xlib.c b/boilerplate/cairo-boilerplate-xlib.c index 28d1a2e..93000d0 100644 --- a/boilerplate/cairo-boilerplate-xlib.c +++ b/boilerplate/cairo-boilerplate-xlib.c @@ -28,9 +28,14 @@ #include "cairo-boilerplate-xlib.h" #include "cairo-boilerplate-xlib-private.h" +#include <cairo-xlib.h> +#if CAIRO_HAS_XLIB_XRENDER_SURFACE #include <cairo-xlib-xrender.h> +#endif #include <cairo-xlib-surface-private.h> +#include <X11/Xutil.h> /* for XDestroyImage */ + typedef struct _xlib_target_closure { Display *dpy; @@ -50,6 +55,17 @@ _cairo_boilerplate_xlib_synchronize (void *closure) XDestroyImage (ximage); } +static cairo_bool_t +_cairo_boilerplate_xlib_check_screen_size (Display *dpy, + int screen, + int width, + int height) +{ + Screen *scr = XScreenOfDisplay (dpy, screen); + return width <= WidthOfScreen (scr) && height <= HeightOfScreen (scr); +} + +#if CAIRO_HAS_XLIB_XRENDER_SURFACE /* For the xlib backend we distinguish between TEST and PERF mode in a * couple of ways. * @@ -110,18 +126,6 @@ _cairo_boilerplate_xlib_test_create_surface (Display *dpy, width, height); } - -static cairo_bool_t -_cairo_boilerplate_xlib_check_screen_size (Display *dpy, - int screen, - int width, - int height) -{ - Screen *scr = XScreenOfDisplay (dpy, screen); - return width <= WidthOfScreen (scr) && height <= HeightOfScreen (scr); -} - - static cairo_surface_t * _cairo_boilerplate_xlib_perf_create_surface (Display *dpy, cairo_content_t content, @@ -210,6 +214,7 @@ _cairo_boilerplate_xlib_create_surface (const char *name, else /* mode == CAIRO_BOILERPLATE_MODE_PERF */ return _cairo_boilerplate_xlib_perf_create_surface (dpy, content, width, height, xtc); } +#endif /* The xlib-fallback target differs from the xlib target in two ways: * diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index aaf3433..a4c2114 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -57,7 +57,7 @@ #if CAIRO_HAS_XCB_SURFACE #include "cairo-boilerplate-xcb-private.h" #endif -#if CAIRO_HAS_XLIB_XRENDER_SURFACE +#if CAIRO_HAS_XLIB_SURFACE #include "cairo-boilerplate-xlib-private.h" #endif @@ -222,6 +222,7 @@ static cairo_boilerplate_target_t targets[] = { "win32", CAIRO_SURFACE_TYPE_WIN32, CAIRO_CONTENT_COLOR_ALPHA, 0, _cairo_boilerplate_win32_create_surface, cairo_surface_write_to_png }, +#if CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE { "win32-printing", CAIRO_SURFACE_TYPE_WIN32_PRINTING, CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED, 0, _cairo_boilerplate_win32_printing_create_surface, @@ -234,6 +235,7 @@ static cairo_boilerplate_target_t targets[] = _cairo_boilerplate_win32_printing_cleanup, NULL, TRUE }, #endif +#endif #if CAIRO_HAS_XCB_SURFACE /* Acceleration architectures may make the results differ by a * bit, so we set the error tolerance to 1. */ diff --git a/config.h.in b/config.h.in index ff05fbe..2241e43 100644 --- a/config.h.in +++ b/config.h.in @@ -25,6 +25,10 @@ /* Define to 1 if the SVG backend can be tested */ #undef CAIRO_CAN_TEST_SVG_SURFACE +/* Define to 1 if the Win32 Printing backend can be tested (needs ghostscript) + */ +#undef CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE + /* Enable if your compiler supports the Intel __sync_* atomic primitives */ #undef CAIRO_HAS_INTEL_ATOMIC_PRIMITIVES @@ -40,9 +44,15 @@ significant word first */ #undef FLOAT_WORDS_BIGENDIAN +/* Define to 1 if you have the `ctime_r' function. */ +#undef HAVE_CTIME_R + /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `drand48' function. */ +#undef HAVE_DRAND48 + /* Define to 1 if you have the `FcFini' function. */ #undef HAVE_FCFINI @@ -67,9 +77,15 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `poppler_page_render_to_pixbuf' function. */ +#undef HAVE_POPPLER_PAGE_RENDER_TO_PIXBUF + /* Define to 1 if you have the <pthread.h> header file. */ #undef HAVE_PTHREAD_H +/* Define to 1 if you have the `rsvg_pixbuf_from_file' function. */ +#undef HAVE_RSVG_PIXBUF_FROM_FILE + /* Define to 1 if you have Linux compatible sched_getaffinity */ #undef HAVE_SCHED_GETAFFINITY @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for cairo 1.5.4. +# Generated by GNU Autoconf 2.61 for cairo 1.5.6. # # Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=cairo>. # @@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='cairo' PACKAGE_TARNAME='cairo' -PACKAGE_VERSION='1.5.4' -PACKAGE_STRING='cairo 1.5.4' +PACKAGE_VERSION='1.5.6' +PACKAGE_STRING='cairo 1.5.6' PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=cairo' ac_unique_file="src/cairo.h" @@ -908,6 +908,9 @@ CAIRO_HAS_WIN32_SURFACE_TRUE CAIRO_HAS_WIN32_SURFACE_FALSE CAIRO_HAS_WIN32_FONT_TRUE CAIRO_HAS_WIN32_FONT_FALSE +GS +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE CAIRO_HAS_OS2_SURFACE_TRUE CAIRO_HAS_OS2_SURFACE_FALSE CAIRO_HAS_BEOS_SURFACE_TRUE @@ -952,7 +955,6 @@ HAVE_PTHREAD_TRUE HAVE_PTHREAD_FALSE CAIRO_HAS_PS_SURFACE_TRUE CAIRO_HAS_PS_SURFACE_FALSE -GS CAIRO_CAN_TEST_PS_SURFACE_TRUE CAIRO_CAN_TEST_PS_SURFACE_FALSE CAIRO_HAS_PDF_SURFACE_TRUE @@ -1546,7 +1548,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cairo 1.5.4 to adapt to many kinds of systems. +\`configure' configures cairo 1.5.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1620,7 +1622,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cairo 1.5.4:";; + short | recursive ) echo "Configuration of cairo 1.5.6:";; esac cat <<\_ACEOF @@ -1825,7 +1827,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cairo configure 1.5.4 +cairo configure 1.5.6 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1839,7 +1841,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cairo $as_me 1.5.4, which was +It was created by cairo $as_me 1.5.6, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2513,7 +2515,7 @@ fi # Define the identity of the package. PACKAGE='cairo' - VERSION='1.5.4' + VERSION='1.5.6' cat >>confdefs.h <<_ACEOF @@ -2664,16 +2666,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # libtool shared library version # Increment if the interface has additions, changes, removals. -LT_CURRENT=14 +LT_CURRENT=15 # Increment any time the source changes; set to # 0 if you increment CURRENT -LT_REVISION=1 +LT_REVISION=0 # Increment if any interfaces have been added; set to 0 # if any interfaces have been removed. removal has # precedence over adding, so set to 0 if both happened. -LT_AGE=12 +LT_AGE=13 VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE" @@ -2684,7 +2686,7 @@ LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` CAIRO_VERSION_MAJOR=1 CAIRO_VERSION_MINOR=5 -CAIRO_VERSION_MICRO=4 +CAIRO_VERSION_MICRO=6 @@ -4905,7 +4907,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4908 "configure"' > conftest.$ac_ext + echo '#line 4910 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7708,11 +7710,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7711: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7713: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7715: \$? = $ac_status" >&5 + echo "$as_me:7717: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7998,11 +8000,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8001: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8003: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8005: \$? = $ac_status" >&5 + echo "$as_me:8007: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8102,11 +8104,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8105: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8107: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8109: \$? = $ac_status" >&5 + echo "$as_me:8111: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10464,7 +10466,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10467 "configure" +#line 10469 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10564,7 +10566,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10567 "configure" +#line 10569 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12984,11 +12986,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12987: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12989: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12991: \$? = $ac_status" >&5 + echo "$as_me:12993: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13088,11 +13090,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13091: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13093: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13095: \$? = $ac_status" >&5 + echo "$as_me:13097: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14665,11 +14667,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14668: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14670: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14672: \$? = $ac_status" >&5 + echo "$as_me:14674: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14769,11 +14771,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14772: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14774: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14776: \$? = $ac_status" >&5 + echo "$as_me:14778: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16969,11 +16971,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16972: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16974: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16976: \$? = $ac_status" >&5 + echo "$as_me:16978: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17259,11 +17261,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17262: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17264: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17266: \$? = $ac_status" >&5 + echo "$as_me:17268: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17363,11 +17365,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17366: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17368: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17370: \$? = $ac_status" >&5 + echo "$as_me:17372: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20612,7 +20614,9 @@ esac -for ac_func in vasnprintf + + +for ac_func in vasnprintf ctime_r drand48 do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -25431,6 +25435,70 @@ fi +test_win32_printing=no +if test "x$use_win32" = "xyes"; then + # Extract the first word of "gs", so it can be a program name with args. +set dummy gs; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_GS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$GS"; then + ac_cv_prog_GS="$GS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GS="gs" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +GS=$ac_cv_prog_GS +if test -n "$GS"; then + { echo "$as_me:$LINENO: result: $GS" >&5 +echo "${ECHO_T}$GS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test "$GS"; then + +cat >>confdefs.h <<\_ACEOF +#define CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE 1 +_ACEOF + + test_win32_printing="yes" + else + { echo "$as_me:$LINENO: WARNING: Win32 Printing backend will not be tested since ghostscript is not available" >&5 +echo "$as_me: WARNING: Win32 Printing backend will not be tested since ghostscript is not available" >&2;} + test_win32_printing="no (requires ghostscript)" + fi +fi + + + +if test "x$test_win32_printing" = "xyes"; then + CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE= + CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE='#' +else + CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE='#' + CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE= +fi + + # Check whether --enable-os2 was given. if test "${enable_os2+set}" = set; then @@ -27415,10 +27483,10 @@ fi { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; use_ft="no (requires fontconfig" +echo "${ECHO_T}no" >&6; }; use_ft="no (requires fontconfig)" elif test $pkg_failed = untried; then { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; use_ft="no (requires fontconfig" +echo "${ECHO_T}no" >&6; }; use_ft="no (requires fontconfig)" else FONTCONFIG_CFLAGS=$pkg_cv_FONTCONFIG_CFLAGS FONTCONFIG_LIBS=$pkg_cv_FONTCONFIG_LIBS @@ -27520,6 +27588,9 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; use_ft="no (requires fontconfig)" fi done @@ -28561,18 +28632,120 @@ fi { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - test_pdf="no (requires $poppler_DEPENDENCY)" +echo "${ECHO_T}no" >&6; }; test_pdf="no (requires $poppler_DEPENDENCY)" elif test $pkg_failed = untried; then { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - test_pdf="no (requires $poppler_DEPENDENCY)" +echo "${ECHO_T}no" >&6; }; test_pdf="no (requires $poppler_DEPENDENCY)" else POPPLER_CFLAGS=$pkg_cv_POPPLER_CFLAGS POPPLER_LIBS=$pkg_cv_POPPLER_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - test_pdf=yes + + save_cflags="$CFLAGS" + save_libs="$LIBS" + CFLAGS="$CFLAGS $POPPLER_CFLAGS" + LIBS="$LIBS $POPPLER_LIBS" + +for ac_func in poppler_page_render_to_pixbuf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + test_pdf=yes +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; test_pdf="no (requires $poppler_DEPENDENCY)" +fi +done + + CFLAGS="$save_cflags" + LIBS="$save_libs" + fi if test "x$test_pdf" = "xyes"; then @@ -28808,18 +28981,120 @@ fi { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - test_svg="no (requires $librsvg_DEPENDENCY)" +echo "${ECHO_T}no" >&6; }; test_svg="no (requires $librsvg_DEPENDENCY)" elif test $pkg_failed = untried; then { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - test_svg="no (requires $librsvg_DEPENDENCY)" +echo "${ECHO_T}no" >&6; }; test_svg="no (requires $librsvg_DEPENDENCY)" else LIBRSVG_CFLAGS=$pkg_cv_LIBRSVG_CFLAGS LIBRSVG_LIBS=$pkg_cv_LIBRSVG_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - test_svg=yes + + save_cflags="$CFLAGS" + save_libs="$LIBS" + CFLAGS="$CFLAGS $LIBRSVG_CFLAGS" + LIBS="$LIBS $LIBRSVG_LIBS" + +for ac_func in rsvg_pixbuf_from_file +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + test_svg=yes +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; test_svg="no (requires $librsvg_DEPENDENCY)" +fi +done + + CFLAGS="$save_cflags" + LIBS="$save_libs" + fi if test "x$test_svg" = "xyes"; then @@ -30746,6 +31021,13 @@ echo "$as_me: error: conditional \"CAIRO_HAS_WIN32_FONT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE}" && test -z "${CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${CAIRO_HAS_OS2_SURFACE_TRUE}" && test -z "${CAIRO_HAS_OS2_SURFACE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAIRO_HAS_OS2_SURFACE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -31221,7 +31503,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cairo $as_me 1.5.4, which was +This file was extended by cairo $as_me 1.5.6, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31274,7 +31556,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -cairo config.status 1.5.4 +cairo config.status 1.5.6 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -31649,6 +31931,9 @@ CAIRO_HAS_WIN32_SURFACE_TRUE!$CAIRO_HAS_WIN32_SURFACE_TRUE$ac_delim CAIRO_HAS_WIN32_SURFACE_FALSE!$CAIRO_HAS_WIN32_SURFACE_FALSE$ac_delim CAIRO_HAS_WIN32_FONT_TRUE!$CAIRO_HAS_WIN32_FONT_TRUE$ac_delim CAIRO_HAS_WIN32_FONT_FALSE!$CAIRO_HAS_WIN32_FONT_FALSE$ac_delim +GS!$GS$ac_delim +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE!$CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE$ac_delim +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE!$CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE$ac_delim CAIRO_HAS_OS2_SURFACE_TRUE!$CAIRO_HAS_OS2_SURFACE_TRUE$ac_delim CAIRO_HAS_OS2_SURFACE_FALSE!$CAIRO_HAS_OS2_SURFACE_FALSE$ac_delim CAIRO_HAS_BEOS_SURFACE_TRUE!$CAIRO_HAS_BEOS_SURFACE_TRUE$ac_delim @@ -31693,7 +31978,6 @@ HAVE_PTHREAD_TRUE!$HAVE_PTHREAD_TRUE$ac_delim HAVE_PTHREAD_FALSE!$HAVE_PTHREAD_FALSE$ac_delim CAIRO_HAS_PS_SURFACE_TRUE!$CAIRO_HAS_PS_SURFACE_TRUE$ac_delim CAIRO_HAS_PS_SURFACE_FALSE!$CAIRO_HAS_PS_SURFACE_FALSE$ac_delim -GS!$GS$ac_delim CAIRO_CAN_TEST_PS_SURFACE_TRUE!$CAIRO_CAN_TEST_PS_SURFACE_TRUE$ac_delim CAIRO_CAN_TEST_PS_SURFACE_FALSE!$CAIRO_CAN_TEST_PS_SURFACE_FALSE$ac_delim CAIRO_HAS_PDF_SURFACE_TRUE!$CAIRO_HAS_PDF_SURFACE_TRUE$ac_delim @@ -31702,8 +31986,6 @@ POPPLER_CFLAGS!$POPPLER_CFLAGS$ac_delim POPPLER_LIBS!$POPPLER_LIBS$ac_delim CAIRO_CAN_TEST_PDF_SURFACE_TRUE!$CAIRO_CAN_TEST_PDF_SURFACE_TRUE$ac_delim CAIRO_CAN_TEST_PDF_SURFACE_FALSE!$CAIRO_CAN_TEST_PDF_SURFACE_FALSE$ac_delim -CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE!$CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE$ac_delim -CAIRO_HAS_MULTI_PAGE_SURFACES_FALSE!$CAIRO_HAS_MULTI_PAGE_SURFACES_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -31745,6 +32027,8 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE!$CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE$ac_delim +CAIRO_HAS_MULTI_PAGE_SURFACES_FALSE!$CAIRO_HAS_MULTI_PAGE_SURFACES_FALSE$ac_delim CAIRO_HAS_SVG_SURFACE_TRUE!$CAIRO_HAS_SVG_SURFACE_TRUE$ac_delim CAIRO_HAS_SVG_SURFACE_FALSE!$CAIRO_HAS_SVG_SURFACE_FALSE$ac_delim LIBRSVG_CFLAGS!$LIBRSVG_CFLAGS$ac_delim @@ -31779,7 +32063,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 32; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 34; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -32416,8 +32700,9 @@ fi +V="$CAIRO_VERSION_MAJOR.$CAIRO_VERSION_MINOR.$CAIRO_VERSION_MICRO" echo "" -echo "cairo will be compiled with the following surface backends:" +echo "cairo (version $V) will be compiled with the following surface backends:" echo " image: yes (always builtin)" echo " Xlib: $use_xlib" echo " Xlib Xrender: $use_xlib_xrender" @@ -32446,6 +32731,9 @@ echo " test surfaces: $use_test_surfaces" echo " ps testing: $test_ps" echo " pdf testing: $test_pdf" echo " svg testing: $test_svg" +if test x"$use_win32" = "xyes"; then + echo " win32 printing testing: $test_win32_printing" +fi echo "" echo "using CFLAGS:" echo $CAIRO_CFLAGS diff --git a/configure.in b/configure.in index bd27f3a..50922df 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -AC_PREREQ(2.54) +AC_PREREQ(2.58) dnl cairo package version number, (as distinct from shared library version) dnl For the minor number: odd => unstable series @@ -7,7 +7,7 @@ dnl For the micro number: odd => in-progress development (from git) dnl even => tar-file snapshot or release m4_define(cairo_version_major, 1) m4_define(cairo_version_minor, 5) -m4_define(cairo_version_micro, 4) +m4_define(cairo_version_micro, 6) AC_INIT([cairo], cairo_version_major.cairo_version_minor.cairo_version_micro, @@ -17,23 +17,25 @@ AC_CONFIG_HEADERS(config.h) dnl automake 1.8 requires autoconf 2.58 dnl automake 1.7 requires autoconf 2.54 -AM_INIT_AUTOMAKE([1.7]) +dnl automake < 1.8 does not handle TESTS=some-test$(EXEXT) as used +dnl in test/Makefile.am and perf/Makefile.am +AM_INIT_AUTOMAKE([1.8]) dnl =========================================================================== # libtool shared library version # Increment if the interface has additions, changes, removals. -LT_CURRENT=14 +LT_CURRENT=15 # Increment any time the source changes; set to # 0 if you increment CURRENT -LT_REVISION=1 +LT_REVISION=0 # Increment if any interfaces have been added; set to 0 # if any interfaces have been removed. removal has # precedence over adding, so set to 0 if both happened. -LT_AGE=12 +LT_AGE=13 dnl =========================================================================== @@ -87,7 +89,7 @@ AC_DEFUN([_CHECK_FUNCS_WITH_FLAGS], dnl =========================================================================== -AC_CHECK_FUNCS(vasnprintf) +AC_CHECK_FUNCS(vasnprintf ctime_r drand48) dnl =========================================================================== dnl @@ -364,6 +366,20 @@ CAIRO_BACKEND_ENABLE(win32_font, Microsoft Windows font, win32-font, WIN32_FONT, use_win32_font=$use_win32 ]) +test_win32_printing=no +if test "x$use_win32" = "xyes"; then + AC_CHECK_PROG(GS, gs, gs) + if test "$GS"; then + AC_DEFINE([CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE], 1, [Define to 1 if the Win32 Printing backend can be tested (needs ghostscript)]) + test_win32_printing="yes" + else + AC_MSG_WARN([Win32 Printing backend will not be tested since ghostscript is not available]) + test_win32_printing="no (requires ghostscript)" + fi +fi + +AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printing" = "xyes") + dnl =========================================================================== CAIRO_BACKEND_ENABLE(os2, OS/2, os2, OS2_SURFACE, no, [ @@ -498,8 +514,9 @@ FREETYPE_MIN_VERSION=9.7.3 CAIRO_BACKEND_ENABLE(ft, FreeType font, freetype, FT_FONT, auto, [ ft_REQUIRES="fontconfig" PKG_CHECK_MODULES(FONTCONFIG, $ft_REQUIRES, - [_CHECK_FUNCS_WITH_FLAGS(FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS])], - [AC_MSG_RESULT(no); use_ft="no (requires fontconfig"]) + [_CHECK_FUNCS_WITH_FLAGS(FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS],, + [AC_MSG_RESULT(no); use_ft="no (requires fontconfig)"])], + [AC_MSG_RESULT(no); use_ft="no (requires fontconfig)"]) if test "x$use_ft" = "xyes"; then PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION, @@ -609,9 +626,10 @@ test_pdf=no if test "x$use_pdf" = "xyes"; then poppler_DEPENDENCY="poppler-glib >= $POPPLER_VERSION_REQUIRED" PKG_CHECK_MODULES(POPPLER, $poppler_DEPENDENCY pango gtk+-2.0, + [_CHECK_FUNCS_WITH_FLAGS(poppler_page_render_to_pixbuf, [$POPPLER_CFLAGS], [$POPPLER_LIBS], [test_pdf=yes], - [AC_MSG_RESULT(no) - test_pdf="no (requires $poppler_DEPENDENCY)"]) + [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"])], + [AC_MSG_RESULT(no); test_pdf="no (requires $poppler_DEPENDENCY)"]) if test "x$test_pdf" = "xyes"; then AC_DEFINE([CAIRO_CAN_TEST_PDF_SURFACE], 1, [Define to 1 if the PDF backend can be tested (need poppler and other dependencies for pdf2png)]) else @@ -638,9 +656,10 @@ test_svg=no if test "x$use_svg" = "xyes"; then librsvg_DEPENDENCY="librsvg-2.0 >= $LIBRSVG_VERSION_REQUIRED" PKG_CHECK_MODULES(LIBRSVG, $librsvg_DEPENDENCY gdk-2.0, + [_CHECK_FUNCS_WITH_FLAGS(rsvg_pixbuf_from_file, [$LIBRSVG_CFLAGS], [$LIBRSVG_LIBS], [test_svg=yes], - [AC_MSG_RESULT(no) - test_svg="no (requires $librsvg_DEPENDENCY)"]) + [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"])], + [AC_MSG_RESULT(no); test_svg="no (requires $librsvg_DEPENDENCY)"]) if test "x$test_svg" = "xyes"; then AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested]) else @@ -995,8 +1014,9 @@ AC_OUTPUT dnl =========================================================================== +V="$CAIRO_VERSION_MAJOR.$CAIRO_VERSION_MINOR.$CAIRO_VERSION_MICRO" echo "" -echo "cairo will be compiled with the following surface backends:" +echo "cairo (version $V) will be compiled with the following surface backends:" echo " image: yes (always builtin)" echo " Xlib: $use_xlib" echo " Xlib Xrender: $use_xlib_xrender" @@ -1025,6 +1045,9 @@ echo " test surfaces: $use_test_surfaces" echo " ps testing: $test_ps" echo " pdf testing: $test_pdf" echo " svg testing: $test_svg" +if test x"$use_win32" = "xyes"; then + echo " win32 printing testing: $test_win32_printing" +fi echo "" echo "using CFLAGS:" echo $CAIRO_CFLAGS diff --git a/doc/Makefile.in b/doc/Makefile.in index c03501a..1a8d3f2 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -82,6 +82,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ diff --git a/doc/public/Makefile.in b/doc/public/Makefile.in index b91d9e0..5fad57c 100644 --- a/doc/public/Makefile.in +++ b/doc/public/Makefile.in @@ -81,6 +81,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ diff --git a/doc/public/html/cairo-Error-Handling.html b/doc/public/html/cairo-Error-Handling.html index 186efb8..4b03ff4 100644 --- a/doc/public/html/cairo-Error-Handling.html +++ b/doc/public/html/cairo-Error-Handling.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Version-Information.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2593936" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2610193" class="shortcut">Top</a>  |  - <a href="#id2667008" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2598237" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Error-Handling"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2593936"></a><span class="refentrytitle">Error handling</span> +<a name="id2610193"></a><span class="refentrytitle">Error handling</span> </h2> <p>Error handling — Decoding cairo's status</p> </td> @@ -51,48 +51,23 @@ -enum <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a>; +typedef <a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (); const char* <a class="link" href="cairo-Error-Handling.html#cairo-status-to-string">cairo_status_to_string</a> (<a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> status); void <a class="link" href="cairo-Error-Handling.html#cairo-debug-reset-static-data">cairo_debug_reset_static_data</a> (void); </pre> </div> <div class="refsect1" lang="en"> -<a name="id2667008"></a><h2>Description</h2> +<a name="id2598237"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2667024"></a><h2>Details</h2> +<a name="id2623474"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2667034"></a><h3> -<a name="cairo-status-t"></a>enum cairo_status_t</h3> -<a class="indexterm" name="id2667046"></a><pre class="programlisting">typedef enum _cairo_status { - CAIRO_STATUS_SUCCESS = 0, - CAIRO_STATUS_NO_MEMORY, - CAIRO_STATUS_INVALID_RESTORE, - CAIRO_STATUS_INVALID_POP_GROUP, - CAIRO_STATUS_NO_CURRENT_POINT, - CAIRO_STATUS_INVALID_MATRIX, - CAIRO_STATUS_INVALID_STATUS, - CAIRO_STATUS_NULL_POINTER, - CAIRO_STATUS_INVALID_STRING, - CAIRO_STATUS_INVALID_PATH_DATA, - CAIRO_STATUS_READ_ERROR, - CAIRO_STATUS_WRITE_ERROR, - CAIRO_STATUS_SURFACE_FINISHED, - CAIRO_STATUS_SURFACE_TYPE_MISMATCH, - CAIRO_STATUS_PATTERN_TYPE_MISMATCH, - CAIRO_STATUS_INVALID_CONTENT, - CAIRO_STATUS_INVALID_FORMAT, - CAIRO_STATUS_INVALID_VISUAL, - CAIRO_STATUS_FILE_NOT_FOUND, - CAIRO_STATUS_INVALID_DASH, - CAIRO_STATUS_INVALID_DSC_COMMENT, - CAIRO_STATUS_INVALID_INDEX, - CAIRO_STATUS_CLIP_NOT_REPRESENTABLE -} cairo_status_t; -</pre> +<a name="id2663656"></a><h3> +<a name="cairo-status-t"></a>cairo_status_t ()</h3> +<a class="indexterm" name="id2663668"></a><pre class="programlisting">typedef cairo_status_t ();</pre> <p> <a class="link" href="cairo-Error-Handling.html#cairo-status-t"><span class="type">cairo_status_t</span></a> is used to indicate errors that can occur when using Cairo. In some cases it is returned directly by functions. @@ -107,130 +82,20 @@ to get a human-readable representation of an error message.</p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-SUCCESS:CAPS"></a><code class="literal">CAIRO_STATUS_SUCCESS</code></span></p></td> -<td> no error has occurred -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-NO-MEMORY:CAPS"></a><code class="literal">CAIRO_STATUS_NO_MEMORY</code></span></p></td> -<td> out of memory -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-RESTORE:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_RESTORE</code></span></p></td> -<td> cairo_restore without matching cairo_save -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-POP-GROUP:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_POP_GROUP</code></span></p></td> -<td> no saved group to pop -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-NO-CURRENT-POINT:CAPS"></a><code class="literal">CAIRO_STATUS_NO_CURRENT_POINT</code></span></p></td> -<td> no current point defined -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-MATRIX:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_MATRIX</code></span></p></td> -<td> invalid matrix (not invertible) -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-STATUS:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_STATUS</code></span></p></td> -<td> invalid value for an input cairo_status_t -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-NULL-POINTER:CAPS"></a><code class="literal">CAIRO_STATUS_NULL_POINTER</code></span></p></td> -<td> NULL pointer -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-STRING:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_STRING</code></span></p></td> -<td> input string not valid UTF-8 -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-PATH-DATA:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_PATH_DATA</code></span></p></td> -<td> input path data not valid -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-READ-ERROR:CAPS"></a><code class="literal">CAIRO_STATUS_READ_ERROR</code></span></p></td> -<td> error while reading from input stream -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-WRITE-ERROR:CAPS"></a><code class="literal">CAIRO_STATUS_WRITE_ERROR</code></span></p></td> -<td> error while writing to output stream -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-SURFACE-FINISHED:CAPS"></a><code class="literal">CAIRO_STATUS_SURFACE_FINISHED</code></span></p></td> -<td> target surface has been finished -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"></a><code class="literal">CAIRO_STATUS_SURFACE_TYPE_MISMATCH</code></span></p></td> -<td> the surface type is not appropriate for the operation -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"></a><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></span></p></td> -<td> the pattern type is not appropriate for the operation -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-CONTENT:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_CONTENT</code></span></p></td> -<td> invalid value for an input cairo_content_t -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-FORMAT:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_FORMAT</code></span></p></td> -<td> invalid value for an input cairo_format_t -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-VISUAL:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_VISUAL</code></span></p></td> -<td> invalid value for an input Visual* -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-FILE-NOT-FOUND:CAPS"></a><code class="literal">CAIRO_STATUS_FILE_NOT_FOUND</code></span></p></td> -<td> file not found -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-DASH:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_DASH</code></span></p></td> -<td> invalid value for a dash setting -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-DSC-COMMENT:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_DSC_COMMENT</code></span></p></td> -<td> invalid value for a DSC comment (Since 1.2) -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-INVALID-INDEX:CAPS"></a><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></span></p></td> -<td> invalid index passed to getter (Since 1.4) -</td> -</tr> -<tr> -<td><p><span class="term"><a name="CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"></a><code class="literal">CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</code></span></p></td> -<td> clip region not representable in desired format (Since 1.4) +<tbody><tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td> + + </td> -</tr> -</tbody> +</tr></tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2669457"></a><h3> +<a name="id2662323"></a><h3> <a name="cairo-status-to-string"></a>cairo_status_to_string ()</h3> -<a class="indexterm" name="id2669468"></a><pre class="programlisting">const char* cairo_status_to_string (<a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> status);</pre> +<a class="indexterm" name="id2662334"></a><pre class="programlisting">const char* cairo_status_to_string (<a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> status);</pre> <p> Provides a human-readable description of a <a class="link" href="cairo-Error-Handling.html#cairo-status-t"><span class="type">cairo_status_t</span></a>.</p> <p> @@ -254,9 +119,9 @@ Provides a human-readable description of a <a class="link" href="cairo-Error-Han </div> <hr> <div class="refsect2" lang="en"> -<a name="id2662470"></a><h3> +<a name="id2662401"></a><h3> <a name="cairo-debug-reset-static-data"></a>cairo_debug_reset_static_data ()</h3> -<a class="indexterm" name="id2662483"></a><pre class="programlisting">void cairo_debug_reset_static_data (void);</pre> +<a class="indexterm" name="id2662413"></a><pre class="programlisting">void cairo_debug_reset_static_data (void);</pre> <p> Resets all static data within cairo to its original state, (ie. identical to the state at the time of program invocation). For @@ -283,9 +148,9 @@ failure due to a hash table being destroyed when non-empty).</p> </div> </div> <div class="refsect1" lang="en"> -<a name="id2662532"></a><div class="refsect2" lang="en"><a name="id2662533"></a></div> +<a name="id2665645"></a><div class="refsect2" lang="en"><a name="id2665646"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2662534"></a></div> +<div class="refsect2" lang="en"><a name="id2665647"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Font-Options.html b/doc/public/html/cairo-Font-Options.html index 7cd3d58..b8bb3cb 100644 --- a/doc/public/html/cairo-Font-Options.html +++ b/doc/public/html/cairo-Font-Options.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-FreeType-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2619170" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2590721" class="shortcut">Top</a>  |  - <a href="#id2576300" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2626464" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Font-Options"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2619170"></a><span class="refentrytitle">Font Options</span> +<a name="id2590721"></a><span class="refentrytitle">Font Options</span> </h2> <p>Font Options — How a font should be rendered</p> </td> @@ -82,17 +82,17 @@ void <a class="link" href="cairo-Font-Options.html#cairo-font-opt </pre> </div> <div class="refsect1" lang="en"> -<a name="id2576300"></a><h2>Description</h2> +<a name="id2626464"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2576316"></a><h2>Details</h2> +<a name="id2649076"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2576327"></a><h3> +<a name="id2649086"></a><h3> <a name="cairo-font-options-t"></a>cairo_font_options_t</h3> -<a class="indexterm" name="id2576338"></a><pre class="programlisting">typedef struct _cairo_font_options cairo_font_options_t; +<a class="indexterm" name="id2649098"></a><pre class="programlisting">typedef struct _cairo_font_options cairo_font_options_t; </pre> <p> An opaque structure holding all options that are used when @@ -119,9 +119,9 @@ for equality, merge, or compute a hash value of </div> <hr> <div class="refsect2" lang="en"> -<a name="id2576453"></a><h3> +<a name="id2649210"></a><h3> <a name="cairo-font-options-create"></a>cairo_font_options_create ()</h3> -<a class="indexterm" name="id2576464"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a>* cairo_font_options_create (void);</pre> +<a class="indexterm" name="id2649221"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a>* cairo_font_options_create (void);</pre> <p> Allocates a new font options object with all options initialized to default values.</p> @@ -143,9 +143,9 @@ Allocates a new font options object with all options initialized </div> <hr> <div class="refsect2" lang="en"> -<a name="id2576532"></a><h3> +<a name="id2649289"></a><h3> <a name="cairo-font-options-copy"></a>cairo_font_options_copy ()</h3> -<a class="indexterm" name="id2576544"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a>* cairo_font_options_copy (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *original);</pre> +<a class="indexterm" name="id2649300"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a>* cairo_font_options_copy (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *original);</pre> <p> Allocates a new font options object copying the option values from <em class="parameter"><code>original</code></em>.</p> @@ -174,9 +174,9 @@ Allocates a new font options object copying the option values from </div> <hr> <div class="refsect2" lang="en"> -<a name="id2576644"></a><h3> +<a name="id2588222"></a><h3> <a name="cairo-font-options-destroy"></a>cairo_font_options_destroy ()</h3> -<a class="indexterm" name="id2576655"></a><pre class="programlisting">void cairo_font_options_destroy (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> +<a class="indexterm" name="id2588234"></a><pre class="programlisting">void cairo_font_options_destroy (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Destroys a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a> object created with with <a class="link" href="cairo-Font-Options.html#cairo-font-options-create"><code class="function">cairo_font_options_create()</code></a> or <a class="link" href="cairo-Font-Options.html#cairo-font-options-copy"><code class="function">cairo_font_options_copy()</code></a>.</p> @@ -194,9 +194,9 @@ Destroys a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">< </div> <hr> <div class="refsect2" lang="en"> -<a name="id2576735"></a><h3> +<a name="id2588314"></a><h3> <a name="cairo-font-options-status"></a>cairo_font_options_status ()</h3> -<a class="indexterm" name="id2576747"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_font_options_status (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> +<a class="indexterm" name="id2588326"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_font_options_status (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Checks whether an error has previously occurred for this font options object</p> @@ -213,7 +213,11 @@ font options object</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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> +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> </td> </tr> </tbody> @@ -221,9 +225,9 @@ font options object</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2576831"></a><h3> +<a name="id2588411"></a><h3> <a name="cairo-font-options-merge"></a>cairo_font_options_merge ()</h3> -<a class="indexterm" name="id2652234"></a><pre class="programlisting">void cairo_font_options_merge (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, +<a class="indexterm" name="id2652267"></a><pre class="programlisting">void cairo_font_options_merge (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *other);</pre> <p> Merges non-default options from <em class="parameter"><code>other</code></em> into <em class="parameter"><code>options</code></em>, replacing @@ -251,9 +255,9 @@ of <code class="literal">CAIRO_OPERATION_OVER</code>.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652318"></a><h3> +<a name="id2652374"></a><h3> <a name="cairo-font-options-hash"></a>cairo_font_options_hash ()</h3> -<a class="indexterm" name="id2652329"></a><pre class="programlisting">unsigned long cairo_font_options_hash (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> +<a class="indexterm" name="id2652384"></a><pre class="programlisting">unsigned long cairo_font_options_hash (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Compute a hash for the font options object; this value will be useful when storing an object containing a cairo_font_options_t @@ -281,9 +285,9 @@ in a hash table.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652394"></a><h3> +<a name="id2652451"></a><h3> <a name="cairo-font-options-equal"></a>cairo_font_options_equal ()</h3> -<a class="indexterm" name="id2652405"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_font_options_equal (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, +<a class="indexterm" name="id2652462"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_font_options_equal (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *other);</pre> <p> Compares two font options objects for equality.</p> @@ -313,9 +317,9 @@ Compares two font options objects for equality.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652500"></a><h3> +<a name="id2652566"></a><h3> <a name="cairo-font-options-set-antialias"></a>cairo_font_options_set_antialias ()</h3> -<a class="indexterm" name="id2652512"></a><pre class="programlisting">void cairo_font_options_set_antialias (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, +<a class="indexterm" name="id2652580"></a><pre class="programlisting">void cairo_font_options_set_antialias (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, <a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> antialias);</pre> <p> Sets the antialiasing mode for the font options object. This @@ -341,9 +345,9 @@ specifies the type of antialiasing to do when rendering text.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652584"></a><h3> +<a name="id2652659"></a><h3> <a name="cairo-font-options-get-antialias"></a>cairo_font_options_get_antialias ()</h3> -<a class="indexterm" name="id2652597"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> cairo_font_options_get_antialias (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> +<a class="indexterm" name="id2652672"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> cairo_font_options_get_antialias (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Gets the antialiasing mode for the font options object.</p> <p> @@ -367,9 +371,9 @@ Gets the antialiasing mode for the font options object.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652658"></a><h3> +<a name="id2652740"></a><h3> <a name="cairo-subpixel-order-t"></a>enum cairo_subpixel_order_t</h3> -<a class="indexterm" name="id2652668"></a><pre class="programlisting">typedef enum _cairo_subpixel_order { +<a class="indexterm" name="id2652751"></a><pre class="programlisting">typedef enum _cairo_subpixel_order { CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_SUBPIXEL_ORDER_RGB, CAIRO_SUBPIXEL_ORDER_BGR, @@ -422,9 +426,9 @@ antialiasing mode of <a class="link" href="cairo-cairo-t.html#CAIRO-ANTIALIAS-SU </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652813"></a><h3> +<a name="id2652886"></a><h3> <a name="cairo-font-options-set-subpixel-order"></a>cairo_font_options_set_subpixel_order ()</h3> -<a class="indexterm" name="id2652826"></a><pre class="programlisting">void cairo_font_options_set_subpixel_order +<a class="indexterm" name="id2652899"></a><pre class="programlisting">void cairo_font_options_set_subpixel_order (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, <a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> subpixel_order);</pre> <p> @@ -454,9 +458,9 @@ the display device when rendering with an antialiasing mode of </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652915"></a><h3> +<a name="id2652989"></a><h3> <a name="cairo-font-options-get-subpixel-order"></a>cairo_font_options_get_subpixel_order ()</h3> -<a class="indexterm" name="id2652928"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> cairo_font_options_get_subpixel_order +<a class="indexterm" name="id2653001"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> cairo_font_options_get_subpixel_order (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Gets the subpixel order for the font options object. @@ -482,9 +486,9 @@ See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-su </div> <hr> <div class="refsect2" lang="en"> -<a name="id2652998"></a><h3> +<a name="id2653072"></a><h3> <a name="cairo-hint-style-t"></a>enum cairo_hint_style_t</h3> -<a class="indexterm" name="id2653009"></a><pre class="programlisting">typedef enum _cairo_hint_style { +<a class="indexterm" name="id2653082"></a><pre class="programlisting">typedef enum _cairo_hint_style { CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_STYLE_NONE, CAIRO_HINT_STYLE_SLIGHT, @@ -543,9 +547,9 @@ New entries may be added in future versions.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653148"></a><h3> +<a name="id2653221"></a><h3> <a name="cairo-font-options-set-hint-style"></a>cairo_font_options_set_hint_style ()</h3> -<a class="indexterm" name="id2653160"></a><pre class="programlisting">void cairo_font_options_set_hint_style (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, +<a class="indexterm" name="id2653234"></a><pre class="programlisting">void cairo_font_options_set_hint_style (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, <a class="link" href="cairo-Font-Options.html#cairo-hint-style-t">cairo_hint_style_t</a> hint_style);</pre> <p> Sets the hint style for font outlines for the font options object. @@ -573,9 +577,9 @@ See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hi </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653240"></a><h3> +<a name="id2653313"></a><h3> <a name="cairo-font-options-get-hint-style"></a>cairo_font_options_get_hint_style ()</h3> -<a class="indexterm" name="id2653253"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-hint-style-t">cairo_hint_style_t</a> cairo_font_options_get_hint_style (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> +<a class="indexterm" name="id2653326"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-hint-style-t">cairo_hint_style_t</a> cairo_font_options_get_hint_style (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Gets the hint style for font outlines for the font options object. See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hint-style-t"><span class="type">cairo_hint_style_t</span></a> for full details.</p> @@ -600,9 +604,9 @@ See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hi </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653322"></a><h3> +<a name="id2653395"></a><h3> <a name="cairo-hint-metrics-t"></a>enum cairo_hint_metrics_t</h3> -<a class="indexterm" name="id2653332"></a><pre class="programlisting">typedef enum _cairo_hint_metrics { +<a class="indexterm" name="id2653405"></a><pre class="programlisting">typedef enum _cairo_hint_metrics { CAIRO_HINT_METRICS_DEFAULT, CAIRO_HINT_METRICS_OFF, CAIRO_HINT_METRICS_ON @@ -641,9 +645,9 @@ will be laid out differently at different zoom factors.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653420"></a><h3> +<a name="id2653494"></a><h3> <a name="cairo-font-options-set-hint-metrics"></a>cairo_font_options_set_hint_metrics ()</h3> -<a class="indexterm" name="id2653433"></a><pre class="programlisting">void cairo_font_options_set_hint_metrics (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, +<a class="indexterm" name="id2653506"></a><pre class="programlisting">void cairo_font_options_set_hint_metrics (<a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, <a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> hint_metrics);</pre> <p> Sets the metrics hinting mode for the font options object. This @@ -671,9 +675,9 @@ See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hi </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653512"></a><h3> +<a name="id2653585"></a><h3> <a name="cairo-font-options-get-hint-metrics"></a>cairo_font_options_get_hint_metrics ()</h3> -<a class="indexterm" name="id2653525"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> cairo_font_options_get_hint_metrics +<a class="indexterm" name="id2653599"></a><pre class="programlisting"><a class="link" href="cairo-Font-Options.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> cairo_font_options_get_hint_metrics (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Gets the metrics hinting mode for the font options object. @@ -699,9 +703,9 @@ See the documentation for <a class="link" href="cairo-Font-Options.html#cairo-hi </div> </div> <div class="refsect1" lang="en"> -<a name="id2653596"></a><div class="refsect2" lang="en"><a name="id2653597"></a></div> +<a name="id2653669"></a><div class="refsect2" lang="en"><a name="id2653670"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2653598"></a></div> +<div class="refsect2" lang="en"><a name="id2653671"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-FreeType-Fonts.html b/doc/public/html/cairo-FreeType-Fonts.html index f45390f..0b00e1a 100644 --- a/doc/public/html/cairo-FreeType-Fonts.html +++ b/doc/public/html/cairo-FreeType-Fonts.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Win32-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2610488" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2616098" class="shortcut">Top</a>  |  - <a href="#id2651560" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2648711" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-FreeType-Fonts"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2610488"></a><span class="refentrytitle">FreeType Fonts</span> +<a name="id2616098"></a><span class="refentrytitle">FreeType Fonts</span> </h2> <p>FreeType Fonts — Font support for FreeType</p> </td> @@ -63,17 +63,17 @@ void <a class="link" href="cairo-FreeType-Fonts.html#cairo-ft-sca </pre> </div> <div class="refsect1" lang="en"> -<a name="id2651560"></a><h2>Description</h2> +<a name="id2648711"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2651575"></a><h2>Details</h2> +<a name="id2648727"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2651586"></a><h3> +<a name="id2648738"></a><h3> <a name="cairo-ft-font-face-create-for-ft-face"></a>cairo_ft_font_face_create_for_ft_face ()</h3> -<a class="indexterm" name="id2651598"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_ft_font_face_create_for_ft_face +<a class="indexterm" name="id2648750"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_ft_font_face_create_for_ft_face (FT_Face face, int load_flags);</pre> <p> @@ -121,9 +121,9 @@ as <code class="function">cairo_ft_font_lock_face()</code>.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2651725"></a><h3> +<a name="id2651845"></a><h3> <a name="cairo-ft-font-face-create-for-pattern"></a>cairo_ft_font_face_create_for_pattern ()</h3> -<a class="indexterm" name="id2651738"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_ft_font_face_create_for_pattern +<a class="indexterm" name="id2651859"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_ft_font_face_create_for_pattern (FcPattern *pattern);</pre> <p> Creates a new font face for the FreeType font backend based on a @@ -167,9 +167,9 @@ appropriately to reflect the options in a <a class="link" href="cairo-Font-Optio </div> <hr> <div class="refsect2" lang="en"> -<a name="id2594227"></a><h3> +<a name="id2649407"></a><h3> <a name="cairo-ft-font-options-substitute"></a>cairo_ft_font_options_substitute ()</h3> -<a class="indexterm" name="id2594238"></a><pre class="programlisting">void cairo_ft_font_options_substitute (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, +<a class="indexterm" name="id2649420"></a><pre class="programlisting">void cairo_ft_font_options_substitute (const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options, FcPattern *pattern);</pre> <p> Add options to a <span class="type">FcPattern</span> based on a <a class="link" href="cairo-Font-Options.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a> font @@ -198,9 +198,9 @@ before calling <code class="function">FcDefaultSubstitute()</code>.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2594358"></a><h3> +<a name="id2649540"></a><h3> <a name="cairo-ft-scaled-font-lock-face"></a>cairo_ft_scaled_font_lock_face ()</h3> -<a class="indexterm" name="id2594371"></a><pre class="programlisting">FT_Face cairo_ft_scaled_font_lock_face (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2649554"></a><pre class="programlisting">FT_Face cairo_ft_scaled_font_lock_face (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> <code class="function">cairo_ft_font_lock_face()</code> gets the <span class="type">FT_Face</span> object from a FreeType backend font and scales it appropriately for the font. You must @@ -247,9 +247,9 @@ or <code class="literal">NULL</code> if <em class="parameter"><code>scaled_font< </div> <hr> <div class="refsect2" lang="en"> -<a name="id2647110"></a><h3> +<a name="id2648924"></a><h3> <a name="cairo-ft-scaled-font-unlock-face"></a>cairo_ft_scaled_font_unlock_face ()</h3> -<a class="indexterm" name="id2647123"></a><pre class="programlisting">void cairo_ft_scaled_font_unlock_face (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2648938"></a><pre class="programlisting">void cairo_ft_scaled_font_unlock_face (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Releases a face obtained with <a class="link" href="cairo-FreeType-Fonts.html#cairo-ft-scaled-font-lock-face"><code class="function">cairo_ft_scaled_font_lock_face()</code></a>.</p> <p> @@ -269,9 +269,9 @@ Releases a face obtained with <a class="link" href="cairo-FreeType-Fonts.html#ca </div> </div> <div class="refsect1" lang="en"> -<a name="id2647224"></a><div class="refsect2" lang="en"><a name="id2647225"></a></div> +<a name="id2649039"></a><div class="refsect2" lang="en"><a name="id2649040"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2647226"></a></div> +<div class="refsect2" lang="en"><a name="id2649041"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Image-Surfaces.html b/doc/public/html/cairo-Image-Surfaces.html index ac134bd..25219d8 100644 --- a/doc/public/html/cairo-Image-Surfaces.html +++ b/doc/public/html/cairo-Image-Surfaces.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-PDF-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2611719" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2606230" class="shortcut">Top</a>  |  - <a href="#id2647420" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2657522" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Image-Surfaces"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2611719"></a><span class="refentrytitle">Image Surfaces</span> +<a name="id2606230"></a><span class="refentrytitle">Image Surfaces</span> </h2> <p>Image Surfaces — Rendering to memory buffers</p> </td> @@ -68,7 +68,7 @@ int <a class="link" href="cairo-Image-Surfaces.html#cairo-image- </pre> </div> <div class="refsect1" lang="en"> -<a name="id2647420"></a><h2>Description</h2> +<a name="id2657522"></a><h2>Description</h2> <p> Image surfaces provide the ability to render to memory buffers either allocated by cairo or by the calling code. The supported @@ -76,11 +76,11 @@ int <a class="link" href="cairo-Image-Surfaces.html#cairo-image- </p> </div> <div class="refsect1" lang="en"> -<a name="id2656004"></a><h2>Details</h2> +<a name="id2657548"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2656014"></a><h3> +<a name="id2653958"></a><h3> <a name="cairo-format-t"></a>enum cairo_format_t</h3> -<a class="indexterm" name="id2656027"></a><pre class="programlisting">typedef enum _cairo_format { +<a class="indexterm" name="id2653970"></a><pre class="programlisting">typedef enum _cairo_format { CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_RGB24, CAIRO_FORMAT_A8, @@ -140,9 +140,9 @@ New entries may be added in future versions.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2656165"></a><h3> +<a name="id2654108"></a><h3> <a name="cairo-image-surface-create"></a>cairo_image_surface_create ()</h3> -<a class="indexterm" name="id2656176"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create (<a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> format, +<a class="indexterm" name="id2654120"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create (<a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> format, int width, int height);</pre> <p> @@ -188,9 +188,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653920"></a><h3> +<a name="id2656999"></a><h3> <a name="cairo-image-surface-create-for-data"></a>cairo_image_surface_create_for_data ()</h3> -<a class="indexterm" name="id2653931"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_for_data (unsigned char *data, +<a class="indexterm" name="id2657010"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_for_data (unsigned char *data, <a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> format, int width, int height, @@ -256,9 +256,9 @@ destroy-notification fallback to the surface if necessary. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2654156"></a><h3> +<a name="id2657234"></a><h3> <a name="cairo-image-surface-get-data"></a>cairo_image_surface_get_data ()</h3> -<a class="indexterm" name="id2654172"></a><pre class="programlisting">unsigned char* cairo_image_surface_get_data (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2657248"></a><pre class="programlisting">unsigned char* cairo_image_surface_get_data (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get a pointer to the data of the image surface, for direct inspection or modification.</p> @@ -287,9 +287,9 @@ if <em class="parameter"><code>surface</code></em> is not an image surface. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2654255"></a><h3> +<a name="id2656231"></a><h3> <a name="cairo-image-surface-get-format"></a>cairo_image_surface_get_format ()</h3> -<a class="indexterm" name="id2654271"></a><pre class="programlisting"><a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> cairo_image_surface_get_format (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2656247"></a><pre class="programlisting"><a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> cairo_image_surface_get_format (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the format of the surface.</p> <p> @@ -316,9 +316,9 @@ Get the format of the surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658216"></a><h3> +<a name="id2656321"></a><h3> <a name="cairo-image-surface-get-width"></a>cairo_image_surface_get_width ()</h3> -<a class="indexterm" name="id2658229"></a><pre class="programlisting">int cairo_image_surface_get_width (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2656334"></a><pre class="programlisting">int cairo_image_surface_get_width (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the width of the image surface in pixels.</p> <p> @@ -342,9 +342,9 @@ Get the width of the image surface in pixels.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658298"></a><h3> +<a name="id2656402"></a><h3> <a name="cairo-image-surface-get-height"></a>cairo_image_surface_get_height ()</h3> -<a class="indexterm" name="id2658311"></a><pre class="programlisting">int cairo_image_surface_get_height (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2656416"></a><pre class="programlisting">int cairo_image_surface_get_height (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the height of the image surface in pixels.</p> <p> @@ -368,9 +368,9 @@ Get the height of the image surface in pixels.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658380"></a><h3> +<a name="id2656484"></a><h3> <a name="cairo-image-surface-get-stride"></a>cairo_image_surface_get_stride ()</h3> -<a class="indexterm" name="id2658395"></a><pre class="programlisting">int cairo_image_surface_get_stride (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2656499"></a><pre class="programlisting">int cairo_image_surface_get_stride (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the stride of the image surface in bytes</p> <p> @@ -400,9 +400,9 @@ beginning of the next row. </div> </div> <div class="refsect1" lang="en"> -<a name="id2658481"></a><div class="refsect2" lang="en"><a name="id2658482"></a></div> +<a name="id2656584"></a><div class="refsect2" lang="en"><a name="id2656586"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2658483"></a></div> +<div class="refsect2" lang="en"><a name="id2656587"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-PDF-Surfaces.html b/doc/public/html/cairo-PDF-Surfaces.html index 16518d5..beb1b90 100644 --- a/doc/public/html/cairo-PDF-Surfaces.html +++ b/doc/public/html/cairo-PDF-Surfaces.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-PNG-Support.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2602337" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2586205" class="shortcut">Top</a>  |  - <a href="#id2602831" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2622657" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-PDF-Surfaces"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2602337"></a><span class="refentrytitle">PDF Surfaces</span> +<a name="id2586205"></a><span class="refentrytitle">PDF Surfaces</span> </h2> <p>PDF Surfaces — Rendering PDF documents</p> </td> @@ -64,17 +64,17 @@ void <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surf </pre> </div> <div class="refsect1" lang="en"> -<a name="id2602831"></a><h2>Description</h2> +<a name="id2622657"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2602847"></a><h2>Details</h2> +<a name="id2622673"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2602857"></a><h3> +<a name="id2622684"></a><h3> <a name="cairo-pdf-surface-create"></a>cairo_pdf_surface_create ()</h3> -<a class="indexterm" name="id2602871"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_pdf_surface_create (const char *filename, +<a class="indexterm" name="id2622697"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_pdf_surface_create (const char *filename, double width_in_points, double height_in_points);</pre> <p> @@ -120,9 +120,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2627638"></a><h3> +<a name="id2588757"></a><h3> <a name="cairo-pdf-surface-create-for-stream"></a>cairo_pdf_surface_create_for_stream ()</h3> -<a class="indexterm" name="id2627652"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_pdf_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, +<a class="indexterm" name="id2588770"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_pdf_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, void *closure, double width_in_points, double height_in_points);</pre> @@ -174,9 +174,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2655885"></a><h3> +<a name="id2656659"></a><h3> <a name="cairo-pdf-surface-set-size"></a>cairo_pdf_surface_set_size ()</h3> -<a class="indexterm" name="id2655898"></a><pre class="programlisting">void cairo_pdf_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2656672"></a><pre class="programlisting">void cairo_pdf_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double width_in_points, double height_in_points);</pre> <p> @@ -217,9 +217,9 @@ surface or immediately after completing a page with either </div> </div> <div class="refsect1" lang="en"> -<a name="id2657858"></a><div class="refsect2" lang="en"><a name="id2657859"></a></div> +<a name="id2657944"></a><div class="refsect2" lang="en"><a name="id2657946"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2657860"></a></div> +<div class="refsect2" lang="en"><a name="id2657947"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-PNG-Support.html b/doc/public/html/cairo-PNG-Support.html index 676bfc1..0589ff4 100644 --- a/doc/public/html/cairo-PNG-Support.html +++ b/doc/public/html/cairo-PNG-Support.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-PostScript-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2604078" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2657949" class="shortcut">Top</a>  |  - <a href="#id2657905" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2658065" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-PNG-Support"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2604078"></a><span class="refentrytitle">PNG Support</span> +<a name="id2657949"></a><span class="refentrytitle">PNG Support</span> </h2> <p>PNG Support — Reading and writing PNG images</p> </td> @@ -69,17 +69,17 @@ </pre> </div> <div class="refsect1" lang="en"> -<a name="id2657905"></a><h2>Description</h2> +<a name="id2658065"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2657921"></a><h2>Details</h2> +<a name="id2658081"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2657932"></a><h3> +<a name="id2658092"></a><h3> <a name="cairo-image-surface-create-from-png"></a>cairo_image_surface_create_from_png ()</h3> -<a class="indexterm" name="id2657943"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_from_png (const char *filename);</pre> +<a class="indexterm" name="id2658103"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_from_png (const char *filename);</pre> <p> Creates a new image surface and initializes the contents to the given PNG file.</p> @@ -111,9 +111,9 @@ CAIRO_STATUS_READ_ERROR </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658016"></a><h3> +<a name="id2658176"></a><h3> <a name="cairo-read-func-t"></a>cairo_read_func_t ()</h3> -<a class="indexterm" name="id2658029"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (*cairo_read_func_t) (void *closure, +<a class="indexterm" name="id2658188"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (*cairo_read_func_t) (void *closure, unsigned char *data, unsigned int length);</pre> <p> @@ -155,9 +155,9 @@ CAIRO_STATUS_READ_ERROR otherwise.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2656622"></a><h3> +<a name="id2658304"></a><h3> <a name="cairo-image-surface-create-from-png-stream"></a>cairo_image_surface_create_from_png_stream ()</h3> -<a class="indexterm" name="id2656636"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_from_png_stream +<a class="indexterm" name="id2658316"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_image_surface_create_from_png_stream (<a class="link" href="cairo-PNG-Support.html#cairo-read-func-t">cairo_read_func_t</a> read_func, void *closure);</pre> <p> @@ -191,9 +191,9 @@ memory could not be allocated for the operation. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2656752"></a><h3> +<a name="id2658431"></a><h3> <a name="cairo-surface-write-to-png"></a>cairo_surface_write_to_png ()</h3> -<a class="indexterm" name="id2656763"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_write_to_png (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2658443"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_write_to_png (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, const char *filename);</pre> <p> Writes the contents of <em class="parameter"><code>surface</code></em> to a new file <em class="parameter"><code>filename</code></em> as a PNG @@ -229,9 +229,9 @@ while attempting to write the file. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2656869"></a><h3> +<a name="id2654431"></a><h3> <a name="cairo-write-func-t"></a>cairo_write_func_t ()</h3> -<a class="indexterm" name="id2656881"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (*cairo_write_func_t) (void *closure, +<a class="indexterm" name="id2654443"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> (*cairo_write_func_t) (void *closure, unsigned char *data, unsigned int length);</pre> <p> @@ -273,9 +273,9 @@ CAIRO_STATUS_WRITE_ERROR otherwise.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2656998"></a><h3> +<a name="id2654560"></a><h3> <a name="cairo-surface-write-to-png-stream"></a>cairo_surface_write_to_png_stream ()</h3> -<a class="indexterm" name="id2657010"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_write_to_png_stream (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2654572"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_write_to_png_stream (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, void *closure);</pre> <p> @@ -315,9 +315,9 @@ pixel contents. </div> </div> <div class="refsect1" lang="en"> -<a name="id2657134"></a><div class="refsect2" lang="en"><a name="id2657135"></a></div> +<a name="id2654696"></a><div class="refsect2" lang="en"><a name="id2654697"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2657136"></a></div> +<div class="refsect2" lang="en"><a name="id2654698"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Paths.html b/doc/public/html/cairo-Paths.html index 675bdc5..c8e85b4 100644 --- a/doc/public/html/cairo-Paths.html +++ b/doc/public/html/cairo-Paths.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Patterns.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2589915" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2600786" class="shortcut">Top</a>  |  - <a href="#id2624660" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2624739" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Paths"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2589915"></a><span class="refentrytitle">Paths</span> +<a name="id2600786"></a><span class="refentrytitle">Paths</span> </h2> <p>Paths — Creating paths and manipulating path data</p> </td> @@ -116,17 +116,17 @@ void <a class="link" href="cairo-Paths.html#cairo-rel-move-to">ca </pre> </div> <div class="refsect1" lang="en"> -<a name="id2624660"></a><h2>Description</h2> +<a name="id2624739"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2624675"></a><h2>Details</h2> +<a name="id2624755"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2624686"></a><h3> +<a name="id2624765"></a><h3> <a name="cairo-path-t"></a>cairo_path_t</h3> -<a class="indexterm" name="id2624698"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2624778"></a><pre class="programlisting">typedef struct { cairo_status_t status; cairo_path_data_t *data; int num_data; @@ -173,9 +173,9 @@ includes both headers and coordinates for each portion.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2624841"></a><h3> +<a name="id2624920"></a><h3> <a name="cairo-path-data-t"></a>union cairo_path_data_t</h3> -<a class="indexterm" name="id2624853"></a><pre class="programlisting">union cairo_path_data_t { +<a class="indexterm" name="id2624932"></a><pre class="programlisting">union cairo_path_data_t { struct { cairo_path_data_type_t type; int length; @@ -265,9 +265,9 @@ elements for each element type.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2626669"></a><h3> +<a name="id2614928"></a><h3> <a name="cairo-path-data-type-t"></a>enum cairo_path_data_type_t</h3> -<a class="indexterm" name="id2626680"></a><pre class="programlisting">typedef enum _cairo_path_data_type { +<a class="indexterm" name="id2577966"></a><pre class="programlisting">typedef enum _cairo_path_data_type { CAIRO_PATH_MOVE_TO, CAIRO_PATH_LINE_TO, CAIRO_PATH_CURVE_TO, @@ -309,9 +309,9 @@ See <a class="link" href="cairo-Paths.html#cairo-path-data-t"><span class="type" </div> <hr> <div class="refsect2" lang="en"> -<a name="id2626812"></a><h3> +<a name="id2578099"></a><h3> <a name="cairo-copy-path"></a>cairo_copy_path ()</h3> -<a class="indexterm" name="id2626825"></a><pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a>* cairo_copy_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2578111"></a><pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a>* cairo_copy_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Creates a copy of the current path and returns it to the user as a <a class="link" href="cairo-Paths.html#cairo-path-t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-Paths.html#cairo-path-data-t"><span class="type">cairo_path_data_t</span></a> for hints on how to iterate @@ -328,7 +328,9 @@ conditions hold: <div class="orderedlist"><ol type="1"> <li>If there is insufficient memory to copy the path. In this case <code class="literal">path->status</code> will be set to - <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li> + <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li> <li>If <em class="parameter"><code>cr</code></em> is already in an error state. In this case <code class="literal">path->status</code> will contain the same status that would be returned by <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a>.</li> @@ -337,7 +339,9 @@ conditions hold: </p> <p> In either case, <code class="literal">path->status</code> will be set to -<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> (regardless of what the error status in +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> (regardless of what the error status in <em class="parameter"><code>cr</code></em> might have been).</p> <p> @@ -362,9 +366,9 @@ with it. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2578347"></a><h3> +<a name="id2578296"></a><h3> <a name="cairo-copy-path-flat"></a>cairo_copy_path_flat ()</h3> -<a class="indexterm" name="id2578358"></a><pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a>* cairo_copy_path_flat (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2578307"></a><pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a>* cairo_copy_path_flat (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets a flattened copy of the current path and returns it to the user as a <a class="link" href="cairo-Paths.html#cairo-path-t"><span class="type">cairo_path_t</span></a>. See <a class="link" href="cairo-Paths.html#cairo-path-data-t"><span class="type">cairo_path_data_t</span></a> for hints on @@ -389,7 +393,9 @@ conditions hold: <div class="orderedlist"><ol type="1"> <li>If there is insufficient memory to copy the path. In this case <code class="literal">path->status</code> will be set to - <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li> + <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</li> <li>If <em class="parameter"><code>cr</code></em> is already in an error state. In this case <code class="literal">path->status</code> will contain the same status that would be returned by <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a>.</li> @@ -417,9 +423,9 @@ with it. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2578556"></a><h3> +<a name="id2578503"></a><h3> <a name="cairo-path-destroy"></a>cairo_path_destroy ()</h3> -<a class="indexterm" name="id2578568"></a><pre class="programlisting">void cairo_path_destroy (<a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a> *path);</pre> +<a class="indexterm" name="id2578515"></a><pre class="programlisting">void cairo_path_destroy (<a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a> *path);</pre> <p> Immediately releases all memory associated with <em class="parameter"><code>path</code></em>. After a call to <a class="link" href="cairo-Paths.html#cairo-path-destroy"><code class="function">cairo_path_destroy()</code></a> the <em class="parameter"><code>path</code></em> pointer is no longer valid and @@ -445,9 +451,9 @@ manually as well.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2578673"></a><h3> +<a name="id2578620"></a><h3> <a name="cairo-append-path"></a>cairo_append_path ()</h3> -<a class="indexterm" name="id2578686"></a><pre class="programlisting">void cairo_append_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2578633"></a><pre class="programlisting">void cairo_append_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Paths.html#cairo-path-t">cairo_path_t</a> *path);</pre> <p> Append the <em class="parameter"><code>path</code></em> onto the current path. The <em class="parameter"><code>path</code></em> may be either the @@ -455,7 +461,9 @@ return value from one of <a class="link" href="cairo-Paths.html#cairo-copy-path" <a class="link" href="cairo-Paths.html#cairo-copy-path-flat"><code class="function">cairo_copy_path_flat()</code></a> or it may be constructed manually. See <a class="link" href="cairo-Paths.html#cairo-path-t"><span class="type">cairo_path_t</span></a> for details on how the path data structure should be initialized, and note that <code class="literal">path->status</code> must be -initialized to <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p> +initialized to <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p> <p> </p> @@ -477,9 +485,9 @@ initialized to <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCC </div> <hr> <div class="refsect2" lang="en"> -<a name="id2578811"></a><h3> +<a name="id2578757"></a><h3> <a name="cairo-get-current-point"></a>cairo_get_current_point ()</h3> -<a class="indexterm" name="id2578822"></a><pre class="programlisting">void cairo_get_current_point (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2578769"></a><pre class="programlisting">void cairo_get_current_point (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *x, double *y);</pre> <p> @@ -535,9 +543,9 @@ Some functions unset the current path and as a result, current point: </div> <hr> <div class="refsect2" lang="en"> -<a name="id2579140"></a><h3> +<a name="id2579085"></a><h3> <a name="cairo-new-path"></a>cairo_new_path ()</h3> -<a class="indexterm" name="id2579152"></a><pre class="programlisting">void cairo_new_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2579097"></a><pre class="programlisting">void cairo_new_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Clears the current path. After this call there will be no path and no current point.</p> @@ -555,9 +563,9 @@ no current point.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2579203"></a><h3> +<a name="id2579147"></a><h3> <a name="cairo-new-sub-path"></a>cairo_new_sub_path ()</h3> -<a class="indexterm" name="id2579218"></a><pre class="programlisting">void cairo_new_sub_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2579162"></a><pre class="programlisting">void cairo_new_sub_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Begin a new sub-path. Note that the existing path is not affected. After this call there will be no current point. @@ -588,9 +596,9 @@ compute the arc's initial coordinates for a call to </div> <hr> <div class="refsect2" lang="en"> -<a name="id2579326"></a><h3> +<a name="id2579268"></a><h3> <a name="cairo-close-path"></a>cairo_close_path ()</h3> -<a class="indexterm" name="id2579338"></a><pre class="programlisting">void cairo_close_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2579280"></a><pre class="programlisting">void cairo_close_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Adds a line segment to the path from the current point to the beginning of the current sub-path, (the most recent point passed to @@ -630,9 +638,9 @@ point.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2579453"></a><h3> +<a name="id2579395"></a><h3> <a name="cairo-arc"></a>cairo_arc ()</h3> -<a class="indexterm" name="id2579465"></a><pre class="programlisting">void cairo_arc (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2579407"></a><pre class="programlisting">void cairo_arc (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double xc, double yc, double radius, @@ -724,9 +732,9 @@ cairo_restore (cr); </div> <hr> <div class="refsect2" lang="en"> -<a name="id2579784"></a><h3> +<a name="id2579728"></a><h3> <a name="cairo-arc-negative"></a>cairo_arc_negative ()</h3> -<a class="indexterm" name="id2579796"></a><pre class="programlisting">void cairo_arc_negative (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2579740"></a><pre class="programlisting">void cairo_arc_negative (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double xc, double yc, double radius, @@ -783,9 +791,9 @@ direction of the arc between the two angles.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2580017"></a><h3> +<a name="id2579961"></a><h3> <a name="cairo-curve-to"></a>cairo_curve_to ()</h3> -<a class="indexterm" name="id2580029"></a><pre class="programlisting">void cairo_curve_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2579973"></a><pre class="programlisting">void cairo_curve_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double x1, double y1, double x2, @@ -848,9 +856,9 @@ cairo_move_to (<em class="parameter"><code>cr</code></em>, <em class="parameter" </div> <hr> <div class="refsect2" lang="en"> -<a name="id2580294"></a><h3> +<a name="id2580238"></a><h3> <a name="cairo-line-to"></a>cairo_line_to ()</h3> -<a class="indexterm" name="id2580307"></a><pre class="programlisting">void cairo_line_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2580250"></a><pre class="programlisting">void cairo_line_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double x, double y);</pre> <p> @@ -887,9 +895,9 @@ this function will behave as cairo_move_to (<em class="parameter"><code>cr</code </div> <hr> <div class="refsect2" lang="en"> -<a name="id2580459"></a><h3> +<a name="id2580403"></a><h3> <a name="cairo-move-to"></a>cairo_move_to ()</h3> -<a class="indexterm" name="id2580471"></a><pre class="programlisting">void cairo_move_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2580415"></a><pre class="programlisting">void cairo_move_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double x, double y);</pre> <p> @@ -921,9 +929,9 @@ Begin a new sub-path. After this call the current point will be (<em class="para </div> <hr> <div class="refsect2" lang="en"> -<a name="id2580578"></a><h3> +<a name="id2580522"></a><h3> <a name="cairo-rectangle"></a>cairo_rectangle ()</h3> -<a class="indexterm" name="id2580590"></a><pre class="programlisting">void cairo_rectangle (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2580534"></a><pre class="programlisting">void cairo_rectangle (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double x, double y, double width, @@ -978,9 +986,9 @@ cairo_close_path (cr); </div> <hr> <div class="refsect2" lang="en"> -<a name="id2580752"></a><h3> +<a name="id2580696"></a><h3> <a name="cairo-glyph-path"></a>cairo_glyph_path ()</h3> -<a class="indexterm" name="id2580764"></a><pre class="programlisting">void cairo_glyph_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2580708"></a><pre class="programlisting">void cairo_glyph_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs, int num_glyphs);</pre> <p> @@ -1013,9 +1021,9 @@ path if filled, achieves an effect similar to that of </div> <hr> <div class="refsect2" lang="en"> -<a name="id2580868"></a><h3> +<a name="id2580812"></a><h3> <a name="cairo-text-path"></a>cairo_text_path ()</h3> -<a class="indexterm" name="id2580880"></a><pre class="programlisting">void cairo_text_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2580825"></a><pre class="programlisting">void cairo_text_path (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const char *utf8);</pre> <p> Adds closed paths for text to the current path. The generated @@ -1060,9 +1068,9 @@ serious text-using applications. See <a class="link" href="cairo-Paths.html#cair </div> <hr> <div class="refsect2" lang="en"> -<a name="id2581032"></a><h3> +<a name="id2580977"></a><h3> <a name="cairo-rel-curve-to"></a>cairo_rel_curve_to ()</h3> -<a class="indexterm" name="id2581044"></a><pre class="programlisting">void cairo_rel_curve_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2580989"></a><pre class="programlisting">void cairo_rel_curve_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double dx1, double dy1, double dx2, @@ -1133,9 +1141,9 @@ CAIRO_STATUS_NO_CURRENT_POINT.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2581386"></a><h3> +<a name="id2581332"></a><h3> <a name="cairo-rel-line-to"></a>cairo_rel_line_to ()</h3> -<a class="indexterm" name="id2581399"></a><pre class="programlisting">void cairo_rel_line_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2581344"></a><pre class="programlisting">void cairo_rel_line_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double dx, double dy);</pre> <p> @@ -1178,9 +1186,9 @@ CAIRO_STATUS_NO_CURRENT_POINT.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2581581"></a><h3> +<a name="id2581527"></a><h3> <a name="cairo-rel-move-to"></a>cairo_rel_move_to ()</h3> -<a class="indexterm" name="id2581593"></a><pre class="programlisting">void cairo_rel_move_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2581539"></a><pre class="programlisting">void cairo_rel_move_to (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double dx, double dy);</pre> <p> @@ -1221,9 +1229,9 @@ CAIRO_STATUS_NO_CURRENT_POINT.</p> </div> </div> <div class="refsect1" lang="en"> -<a name="id2581753"></a><div class="refsect2" lang="en"><a name="id2581754"></a></div> +<a name="id2581699"></a><div class="refsect2" lang="en"><a name="id2581700"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2581755"></a></div> +<div class="refsect2" lang="en"><a name="id2581701"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Patterns.html b/doc/public/html/cairo-Patterns.html index 5d6a99c..84b8463 100644 --- a/doc/public/html/cairo-Patterns.html +++ b/doc/public/html/cairo-Patterns.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Transformations.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2599381" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2618648" class="shortcut">Top</a>  |  - <a href="#id2640581" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2640624" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Patterns"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2599381"></a><span class="refentrytitle">Patterns</span> +<a name="id2618648"></a><span class="refentrytitle">Patterns</span> </h2> <p>Patterns — Gradients and filtered sources</p> </td> @@ -136,17 +136,17 @@ void* <a class="link" href="cairo-Patterns.html#cairo-pattern-get- </pre> </div> <div class="refsect1" lang="en"> -<a name="id2640581"></a><h2>Description</h2> +<a name="id2640624"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2640595"></a><h2>Details</h2> +<a name="id2640636"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2640604"></a><h3> +<a name="id2640646"></a><h3> <a name="cairo-pattern-t"></a>cairo_pattern_t</h3> -<a class="indexterm" name="id2640615"></a><pre class="programlisting">typedef struct _cairo_pattern cairo_pattern_t; +<a class="indexterm" name="id2640656"></a><pre class="programlisting">typedef struct _cairo_pattern cairo_pattern_t; </pre> <p> A <a class="link" href="cairo-Patterns.html#cairo-pattern-t"><span class="type">cairo_pattern_t</span></a> represents a source when drawing onto a @@ -173,9 +173,9 @@ Memory management of <a class="link" href="cairo-Patterns.html#cairo-pattern-t"> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2640714"></a><h3> +<a name="id2640756"></a><h3> <a name="cairo-pattern-add-color-stop-rgb"></a>cairo_pattern_add_color_stop_rgb ()</h3> -<a class="indexterm" name="id2640726"></a><pre class="programlisting">void cairo_pattern_add_color_stop_rgb (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2640769"></a><pre class="programlisting">void cairo_pattern_add_color_stop_rgb (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, double offset, double red, double green, @@ -200,7 +200,9 @@ transitions instead of the typical blend. <p> Note: If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status -with a status of <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.</p> +with a status of <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.</p> <p> </p> @@ -237,9 +239,9 @@ with a status of <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PA </div> <hr> <div class="refsect2" lang="en"> -<a name="id2640911"></a><h3> +<a name="id2640954"></a><h3> <a name="cairo-pattern-add-color-stop-rgba"></a>cairo_pattern_add_color_stop_rgba ()</h3> -<a class="indexterm" name="id2640925"></a><pre class="programlisting">void cairo_pattern_add_color_stop_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2640968"></a><pre class="programlisting">void cairo_pattern_add_color_stop_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, double offset, double red, double green, @@ -265,7 +267,9 @@ transitions instead of the typical blend. <p> Note: If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status -with a status of <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.</p> +with a status of <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>.</p> <p> </p> @@ -307,9 +311,9 @@ with a status of <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PA </div> <hr> <div class="refsect2" lang="en"> -<a name="id2641097"></a><h3> +<a name="id2641174"></a><h3> <a name="cairo-pattern-get-color-stop-count"></a>cairo_pattern_get_color_stop_count ()</h3> -<a class="indexterm" name="id2641112"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_color_stop_count (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2641191"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_color_stop_count (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, int *count);</pre> <p> Gets the number of color stops specified in the given gradient @@ -332,8 +336,12 @@ pattern.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a gradient +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a gradient pattern. </td> @@ -345,9 +353,9 @@ pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2641232"></a><h3> +<a name="id2641323"></a><h3> <a name="cairo-pattern-get-color-stop-rgba"></a>cairo_pattern_get_color_stop_rgba ()</h3> -<a class="indexterm" name="id2641247"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_color_stop_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2641340"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_color_stop_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, int index, double *offset, double *red, @@ -401,9 +409,15 @@ returned by <a class="link" href="cairo-Patterns.html#cairo-pattern-get-color-st </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a> +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS" +><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a> if <em class="parameter"><code>index</code></em> is not valid for the given pattern. If the pattern is -not a gradient pattern, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> is +not a gradient pattern, <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> is returned. </td> @@ -415,9 +429,9 @@ returned. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2641530"></a><h3> +<a name="id2641606"></a><h3> <a name="cairo-pattern-create-rgb"></a>cairo_pattern_create_rgb ()</h3> -<a class="indexterm" name="id2641541"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_rgb (double red, +<a class="indexterm" name="id2641617"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_rgb (double red, double green, double blue);</pre> <p> @@ -463,9 +477,9 @@ the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-patt </div> <hr> <div class="refsect2" lang="en"> -<a name="id2641666"></a><h3> +<a name="id2641742"></a><h3> <a name="cairo-pattern-create-rgba"></a>cairo_pattern_create_rgba ()</h3> -<a class="indexterm" name="id2641677"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_rgba (double red, +<a class="indexterm" name="id2641753"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_rgba (double red, double green, double blue, double alpha);</pre> @@ -517,9 +531,9 @@ the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-patt </div> <hr> <div class="refsect2" lang="en"> -<a name="id2641822"></a><h3> +<a name="id2641898"></a><h3> <a name="cairo-pattern-get-rgba"></a>cairo_pattern_get_rgba ()</h3> -<a class="indexterm" name="id2641834"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2641910"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_rgba (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, double *red, double *green, double *blue, @@ -559,8 +573,12 @@ Gets the solid color for a solid color pattern.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if the pattern is not a solid +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if the pattern is not a solid color pattern. </td> @@ -572,9 +590,9 @@ color pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2642033"></a><h3> +<a name="id2642109"></a><h3> <a name="cairo-pattern-create-for-surface"></a>cairo_pattern_create_for_surface ()</h3> -<a class="indexterm" name="id2642045"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_for_surface (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2642121"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_for_surface (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Create a new cairo_pattern_t for the given surface.</p> <p> @@ -605,9 +623,9 @@ the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-patt </div> <hr> <div class="refsect2" lang="en"> -<a name="id2642128"></a><h3> +<a name="id2642204"></a><h3> <a name="cairo-pattern-get-surface"></a>cairo_pattern_get_surface ()</h3> -<a class="indexterm" name="id2642142"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_surface (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2642218"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_surface (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> **surface);</pre> <p> Gets the surface of a surface pattern. The reference returned in @@ -631,8 +649,12 @@ Gets the surface of a surface pattern. The reference returned in </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if the pattern is not a surface +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if the pattern is not a surface pattern. </td> @@ -644,9 +666,9 @@ pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2642271"></a><h3> +<a name="id2642347"></a><h3> <a name="cairo-pattern-create-linear"></a>cairo_pattern_create_linear ()</h3> -<a class="indexterm" name="id2642282"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_linear (double x0, +<a class="indexterm" name="id2642358"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_linear (double x0, double y0, double x1, double y1);</pre> @@ -704,9 +726,9 @@ the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-patt </div> <hr> <div class="refsect2" lang="en"> -<a name="id2642460"></a><h3> +<a name="id2642536"></a><h3> <a name="cairo-pattern-get-linear-points"></a>cairo_pattern_get_linear_points ()</h3> -<a class="indexterm" name="id2642474"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_linear_points (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2642550"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_linear_points (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, double *x0, double *y0, double *x1, @@ -746,8 +768,12 @@ Gets the gradient endpoints for a linear gradient.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a linear +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a linear gradient pattern. </td> @@ -759,9 +785,9 @@ gradient pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2642679"></a><h3> +<a name="id2642755"></a><h3> <a name="cairo-pattern-create-radial"></a>cairo_pattern_create_radial ()</h3> -<a class="indexterm" name="id2642690"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_radial (double cx0, +<a class="indexterm" name="id2642766"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_create_radial (double cx0, double cy0, double radius0, double cx1, @@ -831,9 +857,9 @@ the status of a pattern use <a class="link" href="cairo-Patterns.html#cairo-patt </div> <hr> <div class="refsect2" lang="en"> -<a name="id2642908"></a><h3> +<a name="id2642984"></a><h3> <a name="cairo-pattern-get-radial-circles"></a>cairo_pattern_get_radial_circles ()</h3> -<a class="indexterm" name="id2642923"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_radial_circles (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2642999"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_get_radial_circles (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, double *x0, double *y0, double *r0, @@ -886,8 +912,12 @@ specified as a center coordinate and a radius.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a radial +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a radial gradient pattern. </td> @@ -899,9 +929,9 @@ gradient pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643187"></a><h3> +<a name="id2643263"></a><h3> <a name="cairo-pattern-reference"></a>cairo_pattern_reference ()</h3> -<a class="indexterm" name="id2643197"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_reference (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2643273"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pattern_reference (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> Increases the reference count on <em class="parameter"><code>pattern</code></em> by one. This prevents <em class="parameter"><code>pattern</code></em> from being destroyed until a matching call to @@ -931,9 +961,9 @@ The number of references to a <a class="link" href="cairo-Patterns.html#cairo-pa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643303"></a><h3> +<a name="id2643379"></a><h3> <a name="cairo-pattern-destroy"></a>cairo_pattern_destroy ()</h3> -<a class="indexterm" name="id2643313"></a><pre class="programlisting">void cairo_pattern_destroy (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2643389"></a><pre class="programlisting">void cairo_pattern_destroy (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> Decreases the reference count on <em class="parameter"><code>pattern</code></em> by one. If the result is zero, then <em class="parameter"><code>pattern</code></em> and all associated resources are freed. See @@ -952,9 +982,9 @@ zero, then <em class="parameter"><code>pattern</code></em> and all associated re </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643385"></a><h3> +<a name="id2643461"></a><h3> <a name="cairo-pattern-status"></a>cairo_pattern_status ()</h3> -<a class="indexterm" name="id2643395"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_status (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2643471"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_status (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> Checks whether an error has previously occurred for this pattern.</p> @@ -971,8 +1001,14 @@ pattern.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>, or -<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" +><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. </td> </tr> </tbody> @@ -980,9 +1016,9 @@ pattern.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643482"></a><h3> +<a name="id2643558"></a><h3> <a name="cairo-extend-t"></a>enum cairo_extend_t</h3> -<a class="indexterm" name="id2643493"></a><pre class="programlisting">typedef enum _cairo_extend { +<a class="indexterm" name="id2643569"></a><pre class="programlisting">typedef enum _cairo_extend { CAIRO_EXTEND_NONE, CAIRO_EXTEND_REPEAT, CAIRO_EXTEND_REFLECT, @@ -1030,9 +1066,9 @@ New entries may be added in future versions.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643609"></a><h3> +<a name="id2643685"></a><h3> <a name="cairo-pattern-set-extend"></a>cairo_pattern_set_extend ()</h3> -<a class="indexterm" name="id2643620"></a><pre class="programlisting">void cairo_pattern_set_extend (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2643696"></a><pre class="programlisting">void cairo_pattern_set_extend (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, <a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> extend);</pre> <p> Sets the mode to be used for drawing outside the area of a pattern. @@ -1060,9 +1096,9 @@ pattern will be drawn </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643705"></a><h3> +<a name="id2643781"></a><h3> <a name="cairo-pattern-get-extend"></a>cairo_pattern_get_extend ()</h3> -<a class="indexterm" name="id2643716"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> cairo_pattern_get_extend (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2643792"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-extend-t">cairo_extend_t</a> cairo_pattern_get_extend (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> Gets the current extend mode for a pattern. See <a class="link" href="cairo-Patterns.html#cairo-extend-t"><span class="type">cairo_extend_t</span></a> for details on the semantics of each extend strategy.</p> @@ -1088,9 +1124,9 @@ pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643791"></a><h3> +<a name="id2643860"></a><h3> <a name="cairo-filter-t"></a>enum cairo_filter_t</h3> -<a class="indexterm" name="id2643804"></a><pre class="programlisting">typedef enum _cairo_filter { +<a class="indexterm" name="id2643871"></a><pre class="programlisting">typedef enum _cairo_filter { CAIRO_FILTER_FAST, CAIRO_FILTER_GOOD, CAIRO_FILTER_BEST, @@ -1105,9 +1141,9 @@ pattern. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643823"></a><h3> +<a name="id2643888"></a><h3> <a name="cairo-pattern-set-filter"></a>cairo_pattern_set_filter ()</h3> -<a class="indexterm" name="id2643837"></a><pre class="programlisting">void cairo_pattern_set_filter (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2643898"></a><pre class="programlisting">void cairo_pattern_set_filter (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, <a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> filter);</pre> <p> Sets the filter to be used for resizing when using this pattern. @@ -1134,9 +1170,9 @@ the pattern </div> <hr> <div class="refsect2" lang="en"> -<a name="id2643933"></a><h3> +<a name="id2643983"></a><h3> <a name="cairo-pattern-get-filter"></a>cairo_pattern_get_filter ()</h3> -<a class="indexterm" name="id2643946"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> cairo_pattern_get_filter (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2643994"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-filter-t">cairo_filter_t</a> cairo_pattern_get_filter (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> Gets the current filter for a pattern. See <a class="link" href="cairo-Patterns.html#cairo-filter-t"><span class="type">cairo_filter_t</span></a> for details on each filter.</p> @@ -1161,9 +1197,9 @@ for details on each filter.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644024"></a><h3> +<a name="id2644068"></a><h3> <a name="cairo-pattern-set-matrix"></a>cairo_pattern_set_matrix ()</h3> -<a class="indexterm" name="id2644038"></a><pre class="programlisting">void cairo_pattern_set_matrix (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2644082"></a><pre class="programlisting">void cairo_pattern_set_matrix (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Sets the pattern's transformation matrix to <em class="parameter"><code>matrix</code></em>. This matrix is @@ -1221,9 +1257,9 @@ semantics of <a class="link" href="cairo-cairo-t.html#cairo-set-source"><code cl </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644185"></a><h3> +<a name="id2644229"></a><h3> <a name="cairo-pattern-get-matrix"></a>cairo_pattern_get_matrix ()</h3> -<a class="indexterm" name="id2644199"></a><pre class="programlisting">void cairo_pattern_get_matrix (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2644243"></a><pre class="programlisting">void cairo_pattern_get_matrix (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Stores the pattern's transformation matrix into <em class="parameter"><code>matrix</code></em>.</p> @@ -1248,9 +1284,9 @@ Stores the pattern's transformation matrix into <em class="parameter"><code>matr </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644285"></a><h3> +<a name="id2644329"></a><h3> <a name="cairo-pattern-type-t"></a>enum cairo_pattern_type_t</h3> -<a class="indexterm" name="id2644300"></a><pre class="programlisting">typedef enum _cairo_pattern_type { +<a class="indexterm" name="id2644345"></a><pre class="programlisting">typedef enum _cairo_pattern_type { CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, CAIRO_PATTERN_TYPE_LINEAR, @@ -1315,9 +1351,9 @@ color. It may be opaque or translucent. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644512"></a><h3> +<a name="id2644557"></a><h3> <a name="cairo-pattern-get-type"></a>cairo_pattern_get_type ()</h3> -<a class="indexterm" name="id2644528"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-type-t">cairo_pattern_type_t</a> cairo_pattern_get_type (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2644573"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-type-t">cairo_pattern_type_t</a> cairo_pattern_get_type (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> This function returns the type a pattern. See <a class="link" href="cairo-Patterns.html#cairo-pattern-type-t"><span class="type">cairo_pattern_type_t</span></a> for available types.</p> @@ -1345,9 +1381,9 @@ See <a class="link" href="cairo-Patterns.html#cairo-pattern-type-t"><span class= </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644618"></a><h3> +<a name="id2644663"></a><h3> <a name="cairo-pattern-get-reference-count"></a>cairo_pattern_get_reference_count ()</h3> -<a class="indexterm" name="id2644635"></a><pre class="programlisting">unsigned int cairo_pattern_get_reference_count (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> +<a class="indexterm" name="id2644680"></a><pre class="programlisting">unsigned int cairo_pattern_get_reference_count (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> Returns the current reference count of <em class="parameter"><code>pattern</code></em>.</p> <p> @@ -1375,9 +1411,9 @@ object is a nil object, 0 will be returned. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644725"></a><h3> +<a name="id2644769"></a><h3> <a name="cairo-pattern-set-user-data"></a>cairo_pattern_set_user_data ()</h3> -<a class="indexterm" name="id2644741"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_set_user_data (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2644785"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_pattern_set_user_data (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key, void *user_data, <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre> @@ -1415,7 +1451,11 @@ same key. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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 +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a slot could not be allocated for the user data. </td> @@ -1427,9 +1467,9 @@ slot could not be allocated for the user data. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2644956"></a><h3> +<a name="id2645001"></a><h3> <a name="cairo-pattern-get-user-data"></a>cairo_pattern_get_user_data ()</h3> -<a class="indexterm" name="id2644973"></a><pre class="programlisting">void* cairo_pattern_get_user_data (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, +<a class="indexterm" name="id2645017"></a><pre class="programlisting">void* cairo_pattern_get_user_data (<a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre> <p> Return user data previously attached to <em class="parameter"><code>pattern</code></em> using the @@ -1465,9 +1505,9 @@ attached to </div> </div> <div class="refsect1" lang="en"> -<a name="id2645106"></a><div class="refsect2" lang="en"><a name="id2645107"></a></div> +<a name="id2645151"></a><div class="refsect2" lang="en"><a name="id2645152"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2645108"></a></div> +<div class="refsect2" lang="en"><a name="id2645153"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-PostScript-Surfaces.html b/doc/public/html/cairo-PostScript-Surfaces.html index 5abf4ae..ae506a1 100644 --- a/doc/public/html/cairo-PostScript-Surfaces.html +++ b/doc/public/html/cairo-PostScript-Surfaces.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Win32-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2578153" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2582250" class="shortcut">Top</a>  |  - <a href="#id2663116" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2663305" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-PostScript-Surfaces"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2578153"></a><span class="refentrytitle">PostScript Surfaces</span> +<a name="id2582250"></a><span class="refentrytitle">PostScript Surfaces</span> </h2> <p>PostScript Surfaces — Rendering PostScript documents</p> </td> @@ -78,17 +78,17 @@ void <a class="link" href="cairo-PostScript-Surfaces.html#cairo-p </pre> </div> <div class="refsect1" lang="en"> -<a name="id2663116"></a><h2>Description</h2> +<a name="id2663305"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2663131"></a><h2>Details</h2> +<a name="id2654714"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2663142"></a><h3> +<a name="id2654725"></a><h3> <a name="cairo-ps-surface-create"></a>cairo_ps_surface_create ()</h3> -<a class="indexterm" name="id2663156"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_ps_surface_create (const char *filename, +<a class="indexterm" name="id2654738"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_ps_surface_create (const char *filename, double width_in_points, double height_in_points);</pre> <p> @@ -140,9 +140,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2657173"></a><h3> +<a name="id2654895"></a><h3> <a name="cairo-ps-surface-create-for-stream"></a>cairo_ps_surface_create_for_stream ()</h3> -<a class="indexterm" name="id2657187"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_ps_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, +<a class="indexterm" name="id2654909"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_ps_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, void *closure, double width_in_points, double height_in_points);</pre> @@ -200,9 +200,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2657384"></a><h3> +<a name="id2655104"></a><h3> <a name="cairo-ps-surface-restrict-to-level"></a>cairo_ps_surface_restrict_to_level ()</h3> -<a class="indexterm" name="id2657398"></a><pre class="programlisting">void cairo_ps_surface_restrict_to_level (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2655119"></a><pre class="programlisting">void cairo_ps_surface_restrict_to_level (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-level-t">cairo_ps_level_t</a> level);</pre> <p> Restricts the generated PostSript file to <em class="parameter"><code>level</code></em>. See @@ -237,9 +237,9 @@ surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2657507"></a><h3> +<a name="id2655229"></a><h3> <a name="cairo-ps-level-t"></a>enum cairo_ps_level_t</h3> -<a class="indexterm" name="id2657520"></a><pre class="programlisting">typedef enum _cairo_ps_level { +<a class="indexterm" name="id2655241"></a><pre class="programlisting">typedef enum _cairo_ps_level { CAIRO_PS_LEVEL_2, CAIRO_PS_LEVEL_3 } cairo_ps_level_t; @@ -269,9 +269,9 @@ conform to.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2663935"></a><h3> +<a name="id2664004"></a><h3> <a name="cairo-ps-get-levels"></a>cairo_ps_get_levels ()</h3> -<a class="indexterm" name="id2663948"></a><pre class="programlisting">void cairo_ps_get_levels (<a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-level-t">cairo_ps_level_t</a> const **levels, +<a class="indexterm" name="id2664016"></a><pre class="programlisting">void cairo_ps_get_levels (<a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-level-t">cairo_ps_level_t</a> const **levels, int *num_levels);</pre> <p> Used to retrieve the list of supported levels. See @@ -299,9 +299,9 @@ Used to retrieve the list of supported levels. See </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664028"></a><h3> +<a name="id2664098"></a><h3> <a name="cairo-ps-level-to-string"></a>cairo_ps_level_to_string ()</h3> -<a class="indexterm" name="id2664041"></a><pre class="programlisting">const char* cairo_ps_level_to_string (<a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-level-t">cairo_ps_level_t</a> level);</pre> +<a class="indexterm" name="id2664112"></a><pre class="programlisting">const char* cairo_ps_level_to_string (<a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-level-t">cairo_ps_level_t</a> level);</pre> <p> Get the string representation of the given <em class="parameter"><code>level</code></em> id. This function will return NULL if <em class="parameter"><code>level</code></em> id isn't valid. See <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-get-levels"><code class="function">cairo_ps_get_levels()</code></a> @@ -330,9 +330,9 @@ for a way to get the list of valid level ids.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664133"></a><h3> +<a name="id2664204"></a><h3> <a name="cairo-ps-surface-set-eps"></a>cairo_ps_surface_set_eps ()</h3> -<a class="indexterm" name="id2664146"></a><pre class="programlisting">void cairo_ps_surface_set_eps (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2664217"></a><pre class="programlisting">void cairo_ps_surface_set_eps (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, <a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> eps);</pre> <p> If <em class="parameter"><code>eps</code></em> is TRUE, the PostScript surface will output Encapsulated @@ -367,9 +367,9 @@ than one page.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664241"></a><h3> +<a name="id2664312"></a><h3> <a name="cairo-ps-surface-get-eps"></a>cairo_ps_surface_get_eps ()</h3> -<a class="indexterm" name="id2664254"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_ps_surface_get_eps (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2664325"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_ps_surface_get_eps (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Check whether the PostScript surface will output Encapsulated PostScript.</p> <p> @@ -396,9 +396,9 @@ Check whether the PostScript surface will output Encapsulated PostScript.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664324"></a><h3> +<a name="id2664395"></a><h3> <a name="cairo-ps-surface-set-size"></a>cairo_ps_surface_set_size ()</h3> -<a class="indexterm" name="id2664338"></a><pre class="programlisting">void cairo_ps_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2664409"></a><pre class="programlisting">void cairo_ps_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double width_in_points, double height_in_points);</pre> <p> @@ -439,9 +439,9 @@ surface or immediately after completing a page with either </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664468"></a><h3> +<a name="id2664539"></a><h3> <a name="cairo-ps-surface-dsc-begin-setup"></a>cairo_ps_surface_dsc_begin_setup ()</h3> -<a class="indexterm" name="id2664484"></a><pre class="programlisting">void cairo_ps_surface_dsc_begin_setup (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2664554"></a><pre class="programlisting">void cairo_ps_surface_dsc_begin_setup (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> This function indicates that subsequent calls to <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment"><code class="function">cairo_ps_surface_dsc_comment()</code></a> should direct comments to the Setup @@ -470,9 +470,9 @@ See <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-co </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664584"></a><h3> +<a name="id2664654"></a><h3> <a name="cairo-ps-surface-dsc-begin-page-setup"></a>cairo_ps_surface_dsc_begin_page_setup ()</h3> -<a class="indexterm" name="id2664599"></a><pre class="programlisting">void cairo_ps_surface_dsc_begin_page_setup +<a class="indexterm" name="id2664670"></a><pre class="programlisting">void cairo_ps_surface_dsc_begin_page_setup (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> This function indicates that subsequent calls to @@ -503,9 +503,9 @@ See <a class="link" href="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-co </div> <hr> <div class="refsect2" lang="en"> -<a name="id2664700"></a><h3> +<a name="id2664771"></a><h3> <a name="cairo-ps-surface-dsc-comment"></a>cairo_ps_surface_dsc_comment ()</h3> -<a class="indexterm" name="id2664716"></a><pre class="programlisting">void cairo_ps_surface_dsc_comment (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2664786"></a><pre class="programlisting">void cairo_ps_surface_dsc_comment (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, const char *comment);</pre> <p> Emit a comment into the PostScript output for the given surface. @@ -627,9 +627,9 @@ cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A5"); </div> </div> <div class="refsect1" lang="en"> -<a name="id2665131"></a><div class="refsect2" lang="en"><a name="id2665132"></a></div> +<a name="id2665201"></a><div class="refsect2" lang="en"><a name="id2665202"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2665134"></a></div> +<div class="refsect2" lang="en"><a name="id2665203"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-SVG-Surfaces.html b/doc/public/html/cairo-SVG-Surfaces.html index 2024181..86a8026 100644 --- a/doc/public/html/cairo-SVG-Surfaces.html +++ b/doc/public/html/cairo-SVG-Surfaces.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-XLib-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2623230" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2612351" class="shortcut">Top</a>  |  - <a href="#id2655251" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2662980" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-SVG-Surfaces"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2623230"></a><span class="refentrytitle">SVG Surfaces</span> +<a name="id2612351"></a><span class="refentrytitle">SVG Surfaces</span> </h2> <p>SVG Surfaces — Rendering SVG documents</p> </td> @@ -68,17 +68,17 @@ const char* <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-vers </pre> </div> <div class="refsect1" lang="en"> -<a name="id2655251"></a><h2>Description</h2> +<a name="id2662980"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2655267"></a><h2>Details</h2> +<a name="id2662996"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2655278"></a><h3> +<a name="id2663007"></a><h3> <a name="cairo-svg-surface-create"></a>cairo_svg_surface_create ()</h3> -<a class="indexterm" name="id2655291"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_svg_surface_create (const char *filename, +<a class="indexterm" name="id2663020"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_svg_surface_create (const char *filename, double width_in_points, double height_in_points);</pre> <p> @@ -124,9 +124,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2655424"></a><h3> +<a name="id2655736"></a><h3> <a name="cairo-svg-surface-create-for-stream"></a>cairo_svg_surface_create_for_stream ()</h3> -<a class="indexterm" name="id2655437"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_svg_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, +<a class="indexterm" name="id2655750"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_svg_surface_create_for_stream (<a class="link" href="cairo-PNG-Support.html#cairo-write-func-t">cairo_write_func_t</a> write_func, void *closure, double width_in_points, double height_in_points);</pre> @@ -178,9 +178,9 @@ occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2655609"></a><h3> +<a name="id2655922"></a><h3> <a name="cairo-svg-surface-restrict-to-version"></a>cairo_svg_surface_restrict_to_version ()</h3> -<a class="indexterm" name="id2655623"></a><pre class="programlisting">void cairo_svg_surface_restrict_to_version +<a class="indexterm" name="id2655935"></a><pre class="programlisting">void cairo_svg_surface_restrict_to_version (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t">cairo_svg_version_t</a> version);</pre> <p> @@ -215,9 +215,9 @@ surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2655734"></a><h3> +<a name="id2656044"></a><h3> <a name="cairo-svg-version-t"></a>enum cairo_svg_version_t</h3> -<a class="indexterm" name="id2661408"></a><pre class="programlisting">typedef enum _cairo_svg_version { +<a class="indexterm" name="id2661273"></a><pre class="programlisting">typedef enum _cairo_svg_version { CAIRO_SVG_VERSION_1_1, CAIRO_SVG_VERSION_1_2 } cairo_svg_version_t; @@ -246,9 +246,9 @@ specification that a generated SVG file will conform to.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2661484"></a><h3> +<a name="id2661348"></a><h3> <a name="cairo-svg-get-versions"></a>cairo_svg_get_versions ()</h3> -<a class="indexterm" name="id2661497"></a><pre class="programlisting">void cairo_svg_get_versions (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t">cairo_svg_version_t</a> const **versions, +<a class="indexterm" name="id2661361"></a><pre class="programlisting">void cairo_svg_get_versions (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t">cairo_svg_version_t</a> const **versions, int *num_versions);</pre> <p> Used to retrieve the list of supported versions. See @@ -276,9 +276,9 @@ Used to retrieve the list of supported versions. See </div> <hr> <div class="refsect2" lang="en"> -<a name="id2661586"></a><h3> +<a name="id2661451"></a><h3> <a name="cairo-svg-version-to-string"></a>cairo_svg_version_to_string ()</h3> -<a class="indexterm" name="id2661600"></a><pre class="programlisting">const char* cairo_svg_version_to_string (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t">cairo_svg_version_t</a> version);</pre> +<a class="indexterm" name="id2661464"></a><pre class="programlisting">const char* cairo_svg_version_to_string (<a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-version-t">cairo_svg_version_t</a> version);</pre> <p> Get the string representation of the given <em class="parameter"><code>version</code></em> id. This function will return NULL if <em class="parameter"><code>version</code></em> isn't valid. See <a class="link" href="cairo-SVG-Surfaces.html#cairo-svg-get-versions"><code class="function">cairo_svg_get_versions()</code></a> @@ -307,9 +307,9 @@ for a way to get the list of valid version ids.</p> </div> </div> <div class="refsect1" lang="en"> -<a name="id2661693"></a><div class="refsect2" lang="en"><a name="id2661694"></a></div> +<a name="id2661557"></a><div class="refsect2" lang="en"><a name="id2661558"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2661695"></a></div> +<div class="refsect2" lang="en"><a name="id2661560"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Scaled-Fonts.html b/doc/public/html/cairo-Scaled-Fonts.html index 4163354..d4376ff 100644 --- a/doc/public/html/cairo-Scaled-Fonts.html +++ b/doc/public/html/cairo-Scaled-Fonts.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Font-Options.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2606471" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2627031" class="shortcut">Top</a>  |  - <a href="#id2576912" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2648455" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Scaled-Fonts"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2606471"></a><span class="refentrytitle">Scaled Fonts</span> +<a name="id2627031"></a><span class="refentrytitle">Scaled Fonts</span> </h2> <p>Scaled Fonts — Caching metrics for a particular font size</p> </td> @@ -89,17 +89,17 @@ void* <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-f </pre> </div> <div class="refsect1" lang="en"> -<a name="id2576912"></a><h2>Description</h2> +<a name="id2648455"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2576928"></a><h2>Details</h2> +<a name="id2648470"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2576939"></a><h3> +<a name="id2648481"></a><h3> <a name="cairo-scaled-font-t"></a>cairo_scaled_font_t</h3> -<a class="indexterm" name="id2576951"></a><pre class="programlisting">typedef struct _cairo_scaled_font cairo_scaled_font_t; +<a class="indexterm" name="id2648494"></a><pre class="programlisting">typedef struct _cairo_scaled_font cairo_scaled_font_t; </pre> <p> A <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> is a font scaled to a particular size and device @@ -121,9 +121,9 @@ Memory management of <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled- </div> <hr> <div class="refsect2" lang="en"> -<a name="id2577030"></a><h3> +<a name="id2648572"></a><h3> <a name="cairo-scaled-font-create"></a>cairo_scaled_font_create ()</h3> -<a class="indexterm" name="id2577041"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_scaled_font_create (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face, +<a class="indexterm" name="id2648583"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_scaled_font_create (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *font_matrix, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *ctm, const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> @@ -174,9 +174,9 @@ be used.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2582071"></a><h3> +<a name="id2594492"></a><h3> <a name="cairo-scaled-font-reference"></a>cairo_scaled_font_reference ()</h3> -<a class="indexterm" name="id2582083"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_scaled_font_reference (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2594504"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_scaled_font_reference (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Increases the reference count on <em class="parameter"><code>scaled_font</code></em> by one. This prevents <em class="parameter"><code>scaled_font</code></em> from being destroyed until a matching call to @@ -207,9 +207,9 @@ this function does nothing) </div> <hr> <div class="refsect2" lang="en"> -<a name="id2582201"></a><h3> +<a name="id2594622"></a><h3> <a name="cairo-scaled-font-destroy"></a>cairo_scaled_font_destroy ()</h3> -<a class="indexterm" name="id2582213"></a><pre class="programlisting">void cairo_scaled_font_destroy (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2594633"></a><pre class="programlisting">void cairo_scaled_font_destroy (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Decreases the reference count on <em class="parameter"><code>font</code></em> by one. If the result is zero, then <em class="parameter"><code>font</code></em> and all associated resources are freed. @@ -228,9 +228,9 @@ See <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-reference">< </div> <hr> <div class="refsect2" lang="en"> -<a name="id2649663"></a><h3> +<a name="id2649695"></a><h3> <a name="cairo-scaled-font-status"></a>cairo_scaled_font_status ()</h3> -<a class="indexterm" name="id2649673"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_scaled_font_status (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2649706"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_scaled_font_status (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Checks whether an error has previously occurred for this scaled_font.</p> @@ -247,8 +247,12 @@ scaled_font.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as - <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as + <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. </td> </tr> </tbody> @@ -256,9 +260,9 @@ scaled_font.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2649754"></a><h3> +<a name="id2649786"></a><h3> <a name="cairo-font-extents-t"></a>cairo_font_extents_t</h3> -<a class="indexterm" name="id2649765"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2649797"></a><pre class="programlisting">typedef struct { double ascent; double descent; double height; @@ -336,9 +340,9 @@ matrix), but otherwise will remain unchanged.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2649973"></a><h3> +<a name="id2650005"></a><h3> <a name="cairo-scaled-font-extents"></a>cairo_scaled_font_extents ()</h3> -<a class="indexterm" name="id2649985"></a><pre class="programlisting">void cairo_scaled_font_extents (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2650017"></a><pre class="programlisting">void cairo_scaled_font_extents (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, <a class="link" href="cairo-Scaled-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a> *extents);</pre> <p> Gets the metrics for a <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>.</p> @@ -363,9 +367,9 @@ Gets the metrics for a <a class="link" href="cairo-Scaled-Fonts.html#cairo-scale </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650056"></a><h3> +<a name="id2650109"></a><h3> <a name="cairo-text-extents-t"></a>cairo_text_extents_t</h3> -<a class="indexterm" name="id2650066"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2650120"></a><pre class="programlisting">typedef struct { double x_bearing; double y_bearing; double width; @@ -433,9 +437,9 @@ but otherwise will remain unchanged.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650229"></a><h3> +<a name="id2650300"></a><h3> <a name="cairo-scaled-font-text-extents"></a>cairo_scaled_font_text_extents ()</h3> -<a class="indexterm" name="id2650244"></a><pre class="programlisting">void cairo_scaled_font_text_extents (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2650316"></a><pre class="programlisting">void cairo_scaled_font_text_extents (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, const char *utf8, <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre> <p> @@ -482,9 +486,9 @@ affect the x_advance and y_advance values.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650385"></a><h3> +<a name="id2650472"></a><h3> <a name="cairo-scaled-font-glyph-extents"></a>cairo_scaled_font_glyph_extents ()</h3> -<a class="indexterm" name="id2650398"></a><pre class="programlisting">void cairo_scaled_font_glyph_extents (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2650485"></a><pre class="programlisting">void cairo_scaled_font_glyph_extents (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs, int num_glyphs, <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre> @@ -531,9 +535,9 @@ rectangle (extents.width and extents.height).</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650554"></a><h3> +<a name="id2650636"></a><h3> <a name="cairo-scaled-font-get-font-face"></a>cairo_scaled_font_get_font_face ()</h3> -<a class="indexterm" name="id2650568"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_scaled_font_get_font_face (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2650651"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_scaled_font_get_font_face (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Gets the font face that this scaled font was created for.</p> <p> @@ -561,9 +565,9 @@ created. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650647"></a><h3> +<a name="id2650730"></a><h3> <a name="cairo-scaled-font-get-font-options"></a>cairo_scaled_font_get_font_options ()</h3> -<a class="indexterm" name="id2650662"></a><pre class="programlisting">void cairo_scaled_font_get_font_options (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2650745"></a><pre class="programlisting">void cairo_scaled_font_get_font_options (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Stores the font options with which <em class="parameter"><code>scaled_font</code></em> was created into @@ -591,9 +595,9 @@ Stores the font options with which <em class="parameter"><code>scaled_font</code </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650750"></a><h3> +<a name="id2650832"></a><h3> <a name="cairo-scaled-font-get-font-matrix"></a>cairo_scaled_font_get_font_matrix ()</h3> -<a class="indexterm" name="id2650765"></a><pre class="programlisting">void cairo_scaled_font_get_font_matrix (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2650848"></a><pre class="programlisting">void cairo_scaled_font_get_font_matrix (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *font_matrix);</pre> <p> Stores the font matrix with which <em class="parameter"><code>scaled_font</code></em> was created into @@ -621,9 +625,9 @@ Stores the font matrix with which <em class="parameter"><code>scaled_font</code> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650852"></a><h3> +<a name="id2650935"></a><h3> <a name="cairo-scaled-font-get-ctm"></a>cairo_scaled_font_get_ctm ()</h3> -<a class="indexterm" name="id2650865"></a><pre class="programlisting">void cairo_scaled_font_get_ctm (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2650948"></a><pre class="programlisting">void cairo_scaled_font_get_ctm (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *ctm);</pre> <p> Stores the CTM with which <em class="parameter"><code>scaled_font</code></em> was created into <em class="parameter"><code>ctm</code></em>.</p> @@ -650,9 +654,9 @@ Stores the CTM with which <em class="parameter"><code>scaled_font</code></em> wa </div> <hr> <div class="refsect2" lang="en"> -<a name="id2650951"></a><h3> +<a name="id2651034"></a><h3> <a name="cairo-scaled-font-get-type"></a>cairo_scaled_font_get_type ()</h3> -<a class="indexterm" name="id2650964"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> cairo_scaled_font_get_type (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2651047"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> cairo_scaled_font_get_type (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> This function returns the type of the backend used to create a scaled font. See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t"><span class="type">cairo_font_type_t</span></a> for available types.</p> @@ -680,9 +684,9 @@ a scaled font. See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font </div> <hr> <div class="refsect2" lang="en"> -<a name="id2651043"></a><h3> +<a name="id2651126"></a><h3> <a name="cairo-scaled-font-get-reference-count"></a>cairo_scaled_font_get_reference_count ()</h3> -<a class="indexterm" name="id2651058"></a><pre class="programlisting">unsigned int cairo_scaled_font_get_reference_count +<a class="indexterm" name="id2651140"></a><pre class="programlisting">unsigned int cairo_scaled_font_get_reference_count (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Returns the current reference count of <em class="parameter"><code>scaled_font</code></em>.</p> @@ -711,9 +715,9 @@ object is a nil object, 0 will be returned. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2651140"></a><h3> +<a name="id2651222"></a><h3> <a name="cairo-scaled-font-set-user-data"></a>cairo_scaled_font_set_user_data ()</h3> -<a class="indexterm" name="id2651154"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_scaled_font_set_user_data (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2651236"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_scaled_font_set_user_data (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key, void *user_data, <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre> @@ -751,7 +755,11 @@ same key. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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 +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a slot could not be allocated for the user data. </td> @@ -763,9 +771,9 @@ slot could not be allocated for the user data. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2651344"></a><h3> +<a name="id2651427"></a><h3> <a name="cairo-scaled-font-get-user-data"></a>cairo_scaled_font_get_user_data ()</h3> -<a class="indexterm" name="id2651359"></a><pre class="programlisting">void* cairo_scaled_font_get_user_data (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2651441"></a><pre class="programlisting">void* cairo_scaled_font_get_user_data (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre> <p> Return user data previously attached to <em class="parameter"><code>scaled_font</code></em> using the @@ -801,9 +809,9 @@ attached to </div> </div> <div class="refsect1" lang="en"> -<a name="id2651478"></a><div class="refsect2" lang="en"><a name="id2651479"></a></div> +<a name="id2651560"></a><div class="refsect2" lang="en"><a name="id2651562"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2651480"></a></div> +<div class="refsect2" lang="en"><a name="id2651563"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Text.html b/doc/public/html/cairo-Text.html index b42a680..68c05df 100644 --- a/doc/public/html/cairo-Text.html +++ b/doc/public/html/cairo-Text.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2614734" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2602058" class="shortcut">Top</a>  |  - <a href="#id2628494" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2640207" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Text"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2614734"></a><span class="refentrytitle">Text</span> +<a name="id2602058"></a><span class="refentrytitle">Text</span> </h2> <p>Text — Rendering text and sets of glyphs</p> </td> @@ -91,17 +91,17 @@ void <a class="link" href="cairo-Text.html#cairo-glyph-extents">c </pre> </div> <div class="refsect1" lang="en"> -<a name="id2628494"></a><h2>Description</h2> +<a name="id2640207"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2628509"></a><h2>Details</h2> +<a name="id2640223"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2628520"></a><h3> +<a name="id2640234"></a><h3> <a name="cairo-glyph-t"></a>cairo_glyph_t</h3> -<a class="indexterm" name="id2628533"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2640246"></a><pre class="programlisting">typedef struct { unsigned long index; double x; double y; @@ -146,9 +146,9 @@ with respect to the overall origin</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2640336"></a><h3> +<a name="id2640355"></a><h3> <a name="cairo-font-slant-t"></a>enum cairo_font_slant_t</h3> -<a class="indexterm" name="id2640348"></a><pre class="programlisting">typedef enum _cairo_font_slant { +<a class="indexterm" name="id2640367"></a><pre class="programlisting">typedef enum _cairo_font_slant { CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_SLANT_OBLIQUE @@ -182,9 +182,9 @@ Specifies variants of a font face based on their slant.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2640436"></a><h3> +<a name="id2628358"></a><h3> <a name="cairo-font-weight-t"></a>enum cairo_font_weight_t</h3> -<a class="indexterm" name="id2640449"></a><pre class="programlisting">typedef enum _cairo_font_weight { +<a class="indexterm" name="id2628371"></a><pre class="programlisting">typedef enum _cairo_font_weight { CAIRO_FONT_WEIGHT_NORMAL, CAIRO_FONT_WEIGHT_BOLD } cairo_font_weight_t; @@ -212,9 +212,9 @@ Specifies variants of a font face based on their weight.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2628838"></a><h3> +<a name="id2628438"></a><h3> <a name="cairo-select-font-face"></a>cairo_select_font_face ()</h3> -<a class="indexterm" name="id2628849"></a><pre class="programlisting">void cairo_select_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2628449"></a><pre class="programlisting">void cairo_select_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const char *family, <a class="link" href="cairo-Text.html#cairo-font-slant-t">cairo_font_slant_t</a> slant, <a class="link" href="cairo-Text.html#cairo-font-weight-t">cairo_font_weight_t</a> weight);</pre> @@ -257,9 +257,9 @@ cairo.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2628976"></a><h3> +<a name="id2628576"></a><h3> <a name="cairo-set-font-size"></a>cairo_set_font_size ()</h3> -<a class="indexterm" name="id2628988"></a><pre class="programlisting">void cairo_set_font_size (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2628588"></a><pre class="programlisting">void cairo_set_font_size (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double size);</pre> <p> Sets the current font matrix to a scale by a factor of <em class="parameter"><code>size</code></em>, replacing @@ -288,9 +288,9 @@ em-square being a <em class="parameter"><code>size</code></em> by <em class="par </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645126"></a><h3> +<a name="id2645170"></a><h3> <a name="cairo-set-font-matrix"></a>cairo_set_font_matrix ()</h3> -<a class="indexterm" name="id2645136"></a><pre class="programlisting">void cairo_set_font_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2645180"></a><pre class="programlisting">void cairo_set_font_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Sets the current font matrix to <em class="parameter"><code>matrix</code></em>. The font matrix gives a @@ -321,9 +321,9 @@ the current font. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645232"></a><h3> +<a name="id2645275"></a><h3> <a name="cairo-get-font-matrix"></a>cairo_get_font_matrix ()</h3> -<a class="indexterm" name="id2645242"></a><pre class="programlisting">void cairo_get_font_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2645286"></a><pre class="programlisting">void cairo_get_font_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Stores the current font matrix into <em class="parameter"><code>matrix</code></em>. See @@ -349,9 +349,9 @@ Stores the current font matrix into <em class="parameter"><code>matrix</code></e </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645335"></a><h3> +<a name="id2645376"></a><h3> <a name="cairo-set-font-options"></a>cairo_set_font_options ()</h3> -<a class="indexterm" name="id2645346"></a><pre class="programlisting">void cairo_set_font_options (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2645388"></a><pre class="programlisting">void cairo_set_font_options (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Sets a set of custom font rendering options for the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>. @@ -380,9 +380,9 @@ from the surface is used.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645448"></a><h3> +<a name="id2645489"></a><h3> <a name="cairo-get-font-options"></a>cairo_get_font_options ()</h3> -<a class="indexterm" name="id2645459"></a><pre class="programlisting">void cairo_get_font_options (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2645501"></a><pre class="programlisting">void cairo_get_font_options (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Retrieves font rendering options set via <a class="link" href="cairo-Text.html#cairo-set-font-options"><span class="type">cairo_set_font_options</span></a>. @@ -411,9 +411,9 @@ passed to <a class="link" href="cairo-Text.html#cairo-set-font-options"><code cl </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645538"></a><h3> +<a name="id2645604"></a><h3> <a name="cairo-set-font-face"></a>cairo_set_font_face ()</h3> -<a class="indexterm" name="id2645549"></a><pre class="programlisting">void cairo_set_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2645616"></a><pre class="programlisting">void cairo_set_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> <p> Replaces the current <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> object in the <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> with @@ -440,9 +440,9 @@ destroyed if there are no other references to it.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645659"></a><h3> +<a name="id2645740"></a><h3> <a name="cairo-get-font-face"></a>cairo_get_font_face ()</h3> -<a class="indexterm" name="id2645669"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_get_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2645752"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_get_font_face (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current font face for a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.</p> <p> @@ -464,7 +464,9 @@ cairo_font_face_reference. This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a special "nil" <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> object will be returned on which -<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-status"><code class="function">cairo_font_face_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>. Using +<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-status"><code class="function">cairo_font_face_status()</code></a> returns <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. Using this nil object will cause its error state to propagate to other objects it is passed to, (for example, calling <a class="link" href="cairo-Text.html#cairo-set-font-face"><code class="function">cairo_set_font_face()</code></a> with a nil font will trigger an error that @@ -476,9 +478,9 @@ will shutdown the cairo_t object). </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645783"></a><h3> +<a name="id2645877"></a><h3> <a name="cairo-set-scaled-font"></a>cairo_set_scaled_font ()</h3> -<a class="indexterm" name="id2645796"></a><pre class="programlisting">void cairo_set_scaled_font (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2625433"></a><pre class="programlisting">void cairo_set_scaled_font (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Replaces the current font face, font matrix, and font options in @@ -509,9 +511,9 @@ using <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-get-ctm">< </div> <hr> <div class="refsect2" lang="en"> -<a name="id2645914"></a><h3> +<a name="id2645992"></a><h3> <a name="cairo-get-scaled-font"></a>cairo_get_scaled_font ()</h3> -<a class="indexterm" name="id2645927"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_get_scaled_font (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2646004"></a><pre class="programlisting"><a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_get_scaled_font (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current scaled font for a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>.</p> <p> @@ -533,7 +535,9 @@ cairo. To keep a reference to it, you must call This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a special "nil" <a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> object will be returned on which -<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-status"><code class="function">cairo_scaled_font_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>. Using +<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-status"><code class="function">cairo_scaled_font_status()</code></a> returns <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. Using this nil object will cause its error state to propagate to other objects it is passed to, (for example, calling <a class="link" href="cairo-Text.html#cairo-set-scaled-font"><code class="function">cairo_set_scaled_font()</code></a> with a nil font will trigger an error that @@ -548,9 +552,9 @@ will shutdown the cairo_t object). </div> <hr> <div class="refsect2" lang="en"> -<a name="id2646056"></a><h3> +<a name="id2646133"></a><h3> <a name="cairo-show-text"></a>cairo_show_text ()</h3> -<a class="indexterm" name="id2646066"></a><pre class="programlisting">void cairo_show_text (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2646143"></a><pre class="programlisting">void cairo_show_text (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const char *utf8);</pre> <p> A drawing operator that generates the shape from a string of UTF-8 @@ -598,9 +602,9 @@ serious text-using applications. See <a class="link" href="cairo-Text.html#cairo </div> <hr> <div class="refsect2" lang="en"> -<a name="id2646181"></a><h3> +<a name="id2646259"></a><h3> <a name="cairo-show-glyphs"></a>cairo_show_glyphs ()</h3> -<a class="indexterm" name="id2646192"></a><pre class="programlisting">void cairo_show_glyphs (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2646269"></a><pre class="programlisting">void cairo_show_glyphs (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs, int num_glyphs);</pre> <p> @@ -633,9 +637,9 @@ rendered according to the current font_face, font_size </div> <hr> <div class="refsect2" lang="en"> -<a name="id2646277"></a><h3> +<a name="id2646354"></a><h3> <a name="cairo-font-extents"></a>cairo_font_extents ()</h3> -<a class="indexterm" name="id2646287"></a><pre class="programlisting">void cairo_font_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2646364"></a><pre class="programlisting">void cairo_font_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-Scaled-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a> *extents);</pre> <p> Gets the font extents for the currently selected font.</p> @@ -661,9 +665,9 @@ will be stored. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2646365"></a><h3> +<a name="id2646442"></a><h3> <a name="cairo-text-extents"></a>cairo_text_extents ()</h3> -<a class="indexterm" name="id2646375"></a><pre class="programlisting">void cairo_text_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2646452"></a><pre class="programlisting">void cairo_text_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const char *utf8, <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre> <p> @@ -707,9 +711,9 @@ will be stored </div> <hr> <div class="refsect2" lang="en"> -<a name="id2646503"></a><h3> +<a name="id2646580"></a><h3> <a name="cairo-glyph-extents"></a>cairo_glyph_extents ()</h3> -<a class="indexterm" name="id2646513"></a><pre class="programlisting">void cairo_glyph_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2646590"></a><pre class="programlisting">void cairo_glyph_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Text.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs, int num_glyphs, <a class="link" href="cairo-Scaled-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre> @@ -756,9 +760,9 @@ will be stored </div> </div> <div class="refsect1" lang="en"> -<a name="id2646659"></a><div class="refsect2" lang="en"><a name="id2646660"></a></div> +<a name="id2646736"></a><div class="refsect2" lang="en"><a name="id2646738"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2646661"></a></div> +<div class="refsect2" lang="en"><a name="id2646739"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Transformations.html b/doc/public/html/cairo-Transformations.html index 3400fa4..d510208 100644 --- a/doc/public/html/cairo-Transformations.html +++ b/doc/public/html/cairo-Transformations.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Text.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2576239" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2627805" class="shortcut">Top</a>  |  - <a href="#id2588736" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2629284" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Transformations"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2576239"></a><span class="refentrytitle">Transformations</span> +<a name="id2627805"></a><span class="refentrytitle">Transformations</span> </h2> <p>Transformations — Manipulating the current transformation matrix</p> </td> @@ -81,17 +81,17 @@ void <a class="link" href="cairo-Transformations.html#cairo-devic </pre> </div> <div class="refsect1" lang="en"> -<a name="id2588736"></a><h2>Description</h2> +<a name="id2629284"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2588752"></a><h2>Details</h2> +<a name="id2629300"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2588763"></a><h3> +<a name="id2576431"></a><h3> <a name="cairo-translate"></a>cairo_translate ()</h3> -<a class="indexterm" name="id2588775"></a><pre class="programlisting">void cairo_translate (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2576444"></a><pre class="programlisting">void cairo_translate (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double tx, double ty);</pre> <p> @@ -126,9 +126,9 @@ user-space origin takes place after any existing transformation.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2628233"></a><h3> +<a name="id2576553"></a><h3> <a name="cairo-scale"></a>cairo_scale ()</h3> -<a class="indexterm" name="id2628245"></a><pre class="programlisting">void cairo_scale (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2576565"></a><pre class="programlisting">void cairo_scale (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double sx, double sy);</pre> <p> @@ -162,9 +162,9 @@ space.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2628352"></a><h3> +<a name="id2576746"></a><h3> <a name="cairo-rotate"></a>cairo_rotate ()</h3> -<a class="indexterm" name="id2628364"></a><pre class="programlisting">void cairo_rotate (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2576758"></a><pre class="programlisting">void cairo_rotate (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double angle);</pre> <p> Modifies the current transformation matrix (CTM) by rotating the @@ -194,9 +194,9 @@ rotated </div> <hr> <div class="refsect2" lang="en"> -<a name="id2588945"></a><h3> +<a name="id2576841"></a><h3> <a name="cairo-transform"></a>cairo_transform ()</h3> -<a class="indexterm" name="id2588957"></a><pre class="programlisting">void cairo_transform (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2576853"></a><pre class="programlisting">void cairo_transform (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Modifies the current transformation matrix (CTM) by applying @@ -223,9 +223,9 @@ user space takes place after any existing transformation.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2589038"></a><h3> +<a name="id2626555"></a><h3> <a name="cairo-set-matrix"></a>cairo_set_matrix ()</h3> -<a class="indexterm" name="id2589051"></a><pre class="programlisting">void cairo_set_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2626567"></a><pre class="programlisting">void cairo_set_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Modifies the current transformation matrix (CTM) by setting it @@ -251,9 +251,9 @@ equal to <em class="parameter"><code>matrix</code></em>.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2589130"></a><h3> +<a name="id2626647"></a><h3> <a name="cairo-get-matrix"></a>cairo_get_matrix ()</h3> -<a class="indexterm" name="id2589143"></a><pre class="programlisting">void cairo_get_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2626659"></a><pre class="programlisting">void cairo_get_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Stores the current transformation matrix (CTM) into <em class="parameter"><code>matrix</code></em>.</p> @@ -278,9 +278,9 @@ Stores the current transformation matrix (CTM) into <em class="parameter"><code> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2588211"></a><h3> +<a name="id2626737"></a><h3> <a name="cairo-identity-matrix"></a>cairo_identity_matrix ()</h3> -<a class="indexterm" name="id2588222"></a><pre class="programlisting">void cairo_identity_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2626748"></a><pre class="programlisting">void cairo_identity_matrix (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Resets the current transformation matrix (CTM) by setting it equal to the identity matrix. That is, the user-space and device-space @@ -300,9 +300,9 @@ device-space unit.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2588275"></a><h3> +<a name="id2626801"></a><h3> <a name="cairo-user-to-device"></a>cairo_user_to_device ()</h3> -<a class="indexterm" name="id2588286"></a><pre class="programlisting">void cairo_user_to_device (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2628709"></a><pre class="programlisting">void cairo_user_to_device (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *x, double *y);</pre> <p> @@ -335,9 +335,9 @@ multiplying the given point by the current transformation matrix </div> <hr> <div class="refsect2" lang="en"> -<a name="id2588380"></a><h3> +<a name="id2628803"></a><h3> <a name="cairo-user-to-device-distance"></a>cairo_user_to_device_distance ()</h3> -<a class="indexterm" name="id2588391"></a><pre class="programlisting">void cairo_user_to_device_distance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2628814"></a><pre class="programlisting">void cairo_user_to_device_distance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *dx, double *dy);</pre> <p> @@ -371,9 +371,9 @@ translation components of the CTM will be ignored when transforming </div> <hr> <div class="refsect2" lang="en"> -<a name="id2588508"></a><h3> +<a name="id2628931"></a><h3> <a name="cairo-device-to-user"></a>cairo_device_to_user ()</h3> -<a class="indexterm" name="id2588519"></a><pre class="programlisting">void cairo_device_to_user (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2628942"></a><pre class="programlisting">void cairo_device_to_user (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *x, double *y);</pre> <p> @@ -406,9 +406,9 @@ transformation matrix (CTM).</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2628687"></a><h3> +<a name="id2629037"></a><h3> <a name="cairo-device-to-user-distance"></a>cairo_device_to_user_distance ()</h3> -<a class="indexterm" name="id2628698"></a><pre class="programlisting">void cairo_device_to_user_distance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2629048"></a><pre class="programlisting">void cairo_device_to_user_distance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *dx, double *dy);</pre> <p> @@ -442,9 +442,9 @@ transforming (<em class="parameter"><code>dx</code></em>,<em class="parameter">< </div> </div> <div class="refsect1" lang="en"> -<a name="id2628817"></a><div class="refsect2" lang="en"><a name="id2628818"></a></div> +<a name="id2628281"></a><div class="refsect2" lang="en"><a name="id2628282"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2628819"></a></div> +<div class="refsect2" lang="en"><a name="id2628283"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Types.html b/doc/public/html/cairo-Types.html index fe3c654..147d2c6 100644 --- a/doc/public/html/cairo-Types.html +++ b/doc/public/html/cairo-Types.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="ix01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2627939" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2626946" class="shortcut">Top</a>  |  - <a href="#id2607575" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2620885" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Types"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2627939"></a><span class="refentrytitle">Types</span> +<a name="id2626946"></a><span class="refentrytitle">Types</span> </h2> <p>Types — Generic data types used in the cairo API</p> </td> @@ -57,17 +57,17 @@ void (<a class="link" href="cairo-Types.html#cairo-destroy-func-t </pre> </div> <div class="refsect1" lang="en"> -<a name="id2607575"></a><h2>Description</h2> +<a name="id2620885"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2608104"></a><h2>Details</h2> +<a name="id2669671"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2623921"></a><h3> +<a name="id2669682"></a><h3> <a name="cairo-bool-t"></a>cairo_bool_t</h3> -<a class="indexterm" name="id2624589"></a><pre class="programlisting">typedef int cairo_bool_t; +<a class="indexterm" name="id2669693"></a><pre class="programlisting">typedef int cairo_bool_t; </pre> <p> <a class="link" href="cairo-Types.html#cairo-bool-t"><span class="type">cairo_bool_t</span></a> is used for boolean values. Returns of type @@ -88,9 +88,9 @@ value as a boolean condition. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2666855"></a><h3> +<a name="id2669741"></a><h3> <a name="cairo-user-data-key-t"></a>cairo_user_data_key_t</h3> -<a class="indexterm" name="id2666866"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2669752"></a><pre class="programlisting">typedef struct { int unused; } cairo_user_data_key_t; </pre> @@ -114,9 +114,9 @@ would just use the address of a static <span class="type">cairo_data_key_t</span </div> <hr> <div class="refsect2" lang="en"> -<a name="id2666934"></a><h3> +<a name="id2669821"></a><h3> <a name="cairo-destroy-func-t"></a>cairo_destroy_func_t ()</h3> -<a class="indexterm" name="id2666946"></a><pre class="programlisting">void (*cairo_destroy_func_t) (void *data);</pre> +<a class="indexterm" name="id2669833"></a><pre class="programlisting">void (*cairo_destroy_func_t) (void *data);</pre> <p> <a class="link" href="cairo-Types.html#cairo-destroy-func-t"><span class="type">cairo_destroy_func_t</span></a> the type of function which is called when a data element is destroyed. It is passed the pointer to the data @@ -135,9 +135,9 @@ element and should free any memory and resources allocated for it.</p> </div> </div> <div class="refsect1" lang="en"> -<a name="id2669681"></a><div class="refsect2" lang="en"><a name="id2669682"></a></div> +<a name="id2669892"></a><div class="refsect2" lang="en"><a name="id2669894"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2669683"></a></div> +<div class="refsect2" lang="en"><a name="id2669895"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Version-Information.html b/doc/public/html/cairo-Version-Information.html index 43e9a83..1677963 100644 --- a/doc/public/html/cairo-Version-Information.html +++ b/doc/public/html/cairo-Version-Information.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2593805" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2585044" class="shortcut">Top</a>  |  - <a href="#id2589318" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2666648" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Version-Information"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2593805"></a><span class="refentrytitle">Version Information</span> +<a name="id2585044"></a><span class="refentrytitle">Version Information</span> </h2> <p>Version Information — Compile-time and run-time version checks.</p> </td> @@ -62,7 +62,7 @@ const char* <a class="link" href="cairo-Version-Information.html#cairo-v </pre> </div> <div class="refsect1" lang="en"> -<a name="id2589318"></a><h2>Description</h2> +<a name="id2666648"></a><h2>Description</h2> <p> Cairo has a three-part version number scheme. In this scheme, we use even vs. odd numbers to distinguish fixed points in the software @@ -102,7 +102,7 @@ In-progress development (eg. from git) <p> </p> <div class="refsect2" lang="en"> -<a name="id2669986"></a><h3>Compatibility</h3> +<a name="id2666698"></a><h3>Compatibility</h3> <p> The API/ABI compatibility guarantees for various versions are as follows. First, let's assume some cairo-using application code that is @@ -130,7 +130,7 @@ rather the many states between snapshots and releases. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670025"></a><h3>Examining the version</h3> +<a name="id2666737"></a><h3>Examining the version</h3> <p> Cairo provides the ability to examine the version at either compile-time or run-time and in both a human-readable form as well as @@ -170,11 +170,11 @@ if (cairo_version() >= %CAIRO_VERSION_ENCODE(1, 0, 0)) </div> </div> <div class="refsect1" lang="en"> -<a name="id2670072"></a><h2>Details</h2> +<a name="id2666785"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2669513"></a><h3> +<a name="id2666796"></a><h3> <a name="CAIRO-VERSION:CAPS"></a>CAIRO_VERSION</h3> -<a class="indexterm" name="id2669524"></a><pre class="programlisting">#define CAIRO_VERSION</pre> +<a class="indexterm" name="id2666808"></a><pre class="programlisting">#define CAIRO_VERSION</pre> <p> The version of cairo available at compile-time, encoded using <a class="link" href="cairo-Version-Information.html#CAIRO-VERSION-ENCODE:CAPS"><code class="function">CAIRO_VERSION_ENCODE()</code></a>. @@ -182,9 +182,9 @@ The version of cairo available at compile-time, encoded using </div> <hr> <div class="refsect2" lang="en"> -<a name="id2669550"></a><h3> +<a name="id2666833"></a><h3> <a name="CAIRO-VERSION-MAJOR:CAPS"></a>CAIRO_VERSION_MAJOR</h3> -<a class="indexterm" name="id2669561"></a><pre class="programlisting">#define CAIRO_VERSION_MAJOR 1 +<a class="indexterm" name="id2666845"></a><pre class="programlisting">#define CAIRO_VERSION_MAJOR 1 </pre> <p> The major component of the version of cairo available at compile-time. @@ -192,9 +192,9 @@ The major component of the version of cairo available at compile-time. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2669578"></a><h3> +<a name="id2666861"></a><h3> <a name="CAIRO-VERSION-MINOR:CAPS"></a>CAIRO_VERSION_MINOR</h3> -<a class="indexterm" name="id2669589"></a><pre class="programlisting">#define CAIRO_VERSION_MINOR 5 +<a class="indexterm" name="id2666873"></a><pre class="programlisting">#define CAIRO_VERSION_MINOR 5 </pre> <p> The minor component of the version of cairo available at compile-time. @@ -202,9 +202,9 @@ The minor component of the version of cairo available at compile-time. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2669606"></a><h3> +<a name="id2669288"></a><h3> <a name="CAIRO-VERSION-MICRO:CAPS"></a>CAIRO_VERSION_MICRO</h3> -<a class="indexterm" name="id2669618"></a><pre class="programlisting">#define CAIRO_VERSION_MICRO 4 +<a class="indexterm" name="id2669300"></a><pre class="programlisting">#define CAIRO_VERSION_MICRO 6 </pre> <p> The micro component of the version of cairo available at compile-time. @@ -212,9 +212,9 @@ The micro component of the version of cairo available at compile-time. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2669634"></a><h3> +<a name="id2669317"></a><h3> <a name="CAIRO-VERSION-STRING:CAPS"></a>CAIRO_VERSION_STRING</h3> -<a class="indexterm" name="id2662543"></a><pre class="programlisting">#define CAIRO_VERSION_STRING "1.5.4" +<a class="indexterm" name="id2669328"></a><pre class="programlisting">#define CAIRO_VERSION_STRING "1.5.6" </pre> <p> A human-readable string literal containing the version of cairo available @@ -223,9 +223,9 @@ at compile-time, in the form of "X.Y.Z". </div> <hr> <div class="refsect2" lang="en"> -<a name="id2662560"></a><h3> +<a name="id2669345"></a><h3> <a name="CAIRO-VERSION-ENCODE:CAPS"></a>CAIRO_VERSION_ENCODE()</h3> -<a class="indexterm" name="id2662571"></a><pre class="programlisting">#define CAIRO_VERSION_ENCODE(major, minor, micro)</pre> +<a class="indexterm" name="id2669356"></a><pre class="programlisting">#define CAIRO_VERSION_ENCODE(major, minor, micro)</pre> <p> This macro encodes the given cairo version into an integer. The numbers returned by <a class="link" href="cairo-Version-Information.html#CAIRO-VERSION:CAPS"><code class="literal">CAIRO_VERSION</code></a> and <a class="link" href="cairo-Version-Information.html#cairo-version"><code class="function">cairo_version()</code></a> are encoded using this macro. @@ -257,9 +257,9 @@ that later versions compare greater than earlier versions. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2662658"></a><h3> +<a name="id2669443"></a><h3> <a name="cairo-version"></a>cairo_version ()</h3> -<a class="indexterm" name="id2662670"></a><pre class="programlisting">int cairo_version (void);</pre> +<a class="indexterm" name="id2669455"></a><pre class="programlisting">int cairo_version (void);</pre> <p> Returns the version of the cairo library encoded in a single integer as per CAIRO_VERSION_ENCODE. The encoding ensures that @@ -293,9 +293,9 @@ equivalents <a class="link" href="cairo-Version-Information.html#CAIRO-VERSION:C </div> <hr> <div class="refsect2" lang="en"> -<a name="id2666720"></a><h3> +<a name="id2669547"></a><h3> <a name="cairo-version-string"></a>cairo_version_string ()</h3> -<a class="indexterm" name="id2666731"></a><pre class="programlisting">const char* cairo_version_string (void);</pre> +<a class="indexterm" name="id2669576"></a><pre class="programlisting">const char* cairo_version_string (void);</pre> <p> Returns the version of the cairo library as a human-readable string of the form "X.Y.Z". @@ -317,9 +317,9 @@ See also <a class="link" href="cairo-Version-Information.html#cairo-version"><co </div> </div> <div class="refsect1" lang="en"> -<a name="id2666806"></a><div class="refsect2" lang="en"><a name="id2666808"></a></div> +<a name="id2669652"></a><div class="refsect2" lang="en"><a name="id2669653"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2666809"></a></div> +<div class="refsect2" lang="en"><a name="id2669654"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Win32-Fonts.html b/doc/public/html/cairo-Win32-Fonts.html index d1eec59..6d5678a 100644 --- a/doc/public/html/cairo-Win32-Fonts.html +++ b/doc/public/html/cairo-Win32-Fonts.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2618223" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2617043" class="shortcut">Top</a>  |  - <a href="#id2594750" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2588538" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Win32-Fonts"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2618223"></a><span class="refentrytitle">Win32 Fonts</span> +<a name="id2617043"></a><span class="refentrytitle">Win32 Fonts</span> </h2> <p>Win32 Fonts — Font support for Microsoft Windows</p> </td> @@ -72,17 +72,17 @@ void <a class="link" href="cairo-Win32-Fonts.html#cairo-win32-sca </pre> </div> <div class="refsect1" lang="en"> -<a name="id2594750"></a><h2>Description</h2> +<a name="id2588538"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2594766"></a><h2>Details</h2> +<a name="id2588554"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2594776"></a><h3> +<a name="id2588565"></a><h3> <a name="cairo-win32-font-face-create-for-logfontw"></a>cairo_win32_font_face_create_for_logfontw ()</h3> -<a class="indexterm" name="id2594791"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_win32_font_face_create_for_logfontw +<a class="indexterm" name="id2588577"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_win32_font_face_create_for_logfontw (LOGFONTW *logfont);</pre> <p> Creates a new font for the Win32 font backend based on a @@ -115,9 +115,9 @@ and can be used with functions such as <a class="link" href="cairo-Win32-Fonts.h </div> <hr> <div class="refsect2" lang="en"> -<a name="id2647652"></a><h3> +<a name="id2646879"></a><h3> <a name="cairo-win32-font-face-create-for-hfont"></a>cairo_win32_font_face_create_for_hfont ()</h3> -<a class="indexterm" name="id2647666"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_win32_font_face_create_for_hfont +<a class="indexterm" name="id2646891"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_win32_font_face_create_for_hfont (HFONT font);</pre> <p> Creates a new font for the Win32 font backend based on a @@ -148,9 +148,9 @@ and can be used with functions such as <a class="link" href="cairo-Win32-Fonts.h </div> <hr> <div class="refsect2" lang="en"> -<a name="id2647804"></a><h3> +<a name="id2647030"></a><h3> <a name="cairo-win32-font-face-create-for-logfontw-hfont"></a>cairo_win32_font_face_create_for_logfontw_hfont ()</h3> -<a class="indexterm" name="id2647818"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_win32_font_face_create_for_logfontw_hfont +<a class="indexterm" name="id2647044"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_win32_font_face_create_for_logfontw_hfont (LOGFONTW *logfont, HFONT font);</pre> <p> @@ -191,9 +191,9 @@ and can be used with functions such as <a class="link" href="cairo-Win32-Fonts.h </div> <hr> <div class="refsect2" lang="en"> -<a name="id2648388"></a><h3> +<a name="id2647711"></a><h3> <a name="cairo-win32-scaled-font-select-font"></a>cairo_win32_scaled_font_select_font ()</h3> -<a class="indexterm" name="id2648400"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_win32_scaled_font_select_font (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, +<a class="indexterm" name="id2647723"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_win32_scaled_font_select_font (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, HDC hdc);</pre> <p> Selects the font into the given device context and changes the @@ -230,8 +230,12 @@ the use of this function to preserve the original graphics state.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the operation succeeded. - otherwise an error such as <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> and +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> if the operation succeeded. + otherwise an error such as <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> and the device context is unchanged. </td> </tr> @@ -240,9 +244,9 @@ the use of this function to preserve the original graphics state.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2648573"></a><h3> +<a name="id2647897"></a><h3> <a name="cairo-win32-scaled-font-done-font"></a>cairo_win32_scaled_font_done_font ()</h3> -<a class="indexterm" name="id2648585"></a><pre class="programlisting">void cairo_win32_scaled_font_done_font (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> +<a class="indexterm" name="id2647909"></a><pre class="programlisting">void cairo_win32_scaled_font_done_font (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Releases any resources allocated by <a class="link" href="cairo-Win32-Fonts.html#cairo-win32-scaled-font-select-font"><code class="function">cairo_win32_scaled_font_select_font()</code></a></p> <p> @@ -259,9 +263,9 @@ Releases any resources allocated by <a class="link" href="cairo-Win32-Fonts.html </div> <hr> <div class="refsect2" lang="en"> -<a name="id2648645"></a><h3> +<a name="id2647968"></a><h3> <a name="cairo-win32-scaled-font-get-metrics-factor"></a>cairo_win32_scaled_font_get_metrics_factor ()</h3> -<a class="indexterm" name="id2648660"></a><pre class="programlisting">double cairo_win32_scaled_font_get_metrics_factor +<a class="indexterm" name="id2647982"></a><pre class="programlisting">double cairo_win32_scaled_font_get_metrics_factor (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre> <p> Gets a scale factor between logical coordinates in the coordinate @@ -290,9 +294,9 @@ font space coordinates.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2648736"></a><h3> +<a name="id2648058"></a><h3> <a name="cairo-win32-scaled-font-get-logical-to-device"></a>cairo_win32_scaled_font_get_logical_to_device ()</h3> -<a class="indexterm" name="id2648752"></a><pre class="programlisting">void cairo_win32_scaled_font_get_logical_to_device +<a class="indexterm" name="id2648074"></a><pre class="programlisting">void cairo_win32_scaled_font_get_logical_to_device (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *logical_to_device);</pre> <p> @@ -321,9 +325,9 @@ to device space.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2648840"></a><h3> +<a name="id2648162"></a><h3> <a name="cairo-win32-scaled-font-get-device-to-logical"></a>cairo_win32_scaled_font_get_device_to_logical ()</h3> -<a class="indexterm" name="id2648856"></a><pre class="programlisting">void cairo_win32_scaled_font_get_device_to_logical +<a class="indexterm" name="id2648178"></a><pre class="programlisting">void cairo_win32_scaled_font_get_device_to_logical (<a class="link" href="cairo-Scaled-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *device_to_logical);</pre> <p> @@ -352,9 +356,9 @@ used by <em class="parameter"><code>scaled_font</code></em>.</p> </div> </div> <div class="refsect1" lang="en"> -<a name="id2648945"></a><div class="refsect2" lang="en"><a name="id2648946"></a></div> +<a name="id2648268"></a><div class="refsect2" lang="en"><a name="id2648269"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2648948"></a></div> +<div class="refsect2" lang="en"><a name="id2648270"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-Win32-Surfaces.html b/doc/public/html/cairo-Win32-Surfaces.html index 90bb3e3..f5ec1c8 100644 --- a/doc/public/html/cairo-Win32-Surfaces.html +++ b/doc/public/html/cairo-Win32-Surfaces.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-SVG-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2577117" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2612060" class="shortcut">Top</a>  |  - <a href="#id2663360" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2655595" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-Win32-Surfaces"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2577117"></a><span class="refentrytitle">Win32 Surfaces</span> +<a name="id2612060"></a><span class="refentrytitle">Win32 Surfaces</span> </h2> <p>Win32 Surfaces — Microsoft Windows surface support</p> </td> @@ -65,17 +65,17 @@ HDC <a class="link" href="cairo-Win32-Surfaces.html#cairo-win32- </pre> </div> <div class="refsect1" lang="en"> -<a name="id2663360"></a><h2>Description</h2> +<a name="id2655595"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2663376"></a><h2>Details</h2> +<a name="id2655611"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2663387"></a><h3> +<a name="id2655274"></a><h3> <a name="cairo-win32-surface-create"></a>cairo_win32_surface_create ()</h3> -<a class="indexterm" name="id2663398"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_create (HDC hdc);</pre> +<a class="indexterm" name="id2655285"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_create (HDC hdc);</pre> <p> Creates a cairo surface that targets the given DC. The DC will be queried for its initial clip extents, and this will be used as the @@ -103,9 +103,9 @@ be set appropriately.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2662832"></a><h3> +<a name="id2655349"></a><h3> <a name="cairo-win32-surface-create-with-dib"></a>cairo_win32_surface_create_with_dib ()</h3> -<a class="indexterm" name="id2662845"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_create_with_dib (<a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> format, +<a class="indexterm" name="id2655362"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_create_with_dib (<a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> format, int width, int height);</pre> <p> @@ -146,9 +146,9 @@ bitmap will be uninitialized.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2662956"></a><h3> +<a name="id2662687"></a><h3> <a name="cairo-win32-surface-create-with-ddb"></a>cairo_win32_surface_create_with_ddb ()</h3> -<a class="indexterm" name="id2662970"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_create_with_ddb (HDC hdc, +<a class="indexterm" name="id2662701"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_create_with_ddb (HDC hdc, <a class="link" href="cairo-Image-Surfaces.html#cairo-format-t">cairo_format_t</a> format, int width, int height);</pre> @@ -195,9 +195,9 @@ bitmap will be uninitialized.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2654593"></a><h3> +<a name="id2662836"></a><h3> <a name="cairo-win32-printing-surface-create"></a>cairo_win32_printing_surface_create ()</h3> -<a class="indexterm" name="id2654607"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_printing_surface_create (HDC hdc);</pre> +<a class="indexterm" name="id2662850"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_printing_surface_create (HDC hdc);</pre> <p> Creates a cairo surface that targets the given DC. The DC will be queried for its initial clip extents, and this will be used as the @@ -230,9 +230,9 @@ associated methods must be used for correct output.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2654686"></a><h3> +<a name="id2663340"></a><h3> <a name="cairo-win32-surface-get-dc"></a>cairo_win32_surface_get_dc ()</h3> -<a class="indexterm" name="id2654700"></a><pre class="programlisting">HDC cairo_win32_surface_get_dc (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2663354"></a><pre class="programlisting">HDC cairo_win32_surface_get_dc (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Returns the HDC associated with this surface, or NULL if none. Also returns NULL if the surface is not a win32 surface.</p> @@ -260,9 +260,9 @@ Also returns NULL if the surface is not a win32 surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2654777"></a><h3> +<a name="id2663431"></a><h3> <a name="cairo-win32-surface-get-image"></a>cairo_win32_surface_get_image ()</h3> -<a class="indexterm" name="id2655057"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_get_image (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2663446"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_win32_surface_get_image (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Returns a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> image surface that refers to the same bits as the DIB of the Win32 surface. If the passed-in win32 surface @@ -292,9 +292,9 @@ or NULL if the win32 surface is not a DIB. </div> </div> <div class="refsect1" lang="en"> -<a name="id2655151"></a><div class="refsect2" lang="en"><a name="id2655152"></a></div> +<a name="id2663541"></a><div class="refsect2" lang="en"><a name="id2663542"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2655154"></a></div> +<div class="refsect2" lang="en"><a name="id2663543"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-XLib-Surfaces.html b/doc/public/html/cairo-XLib-Surfaces.html index 29ecd82..4a278b1 100644 --- a/doc/public/html/cairo-XLib-Surfaces.html +++ b/doc/public/html/cairo-XLib-Surfaces.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="Support.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2625891" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2596991" class="shortcut">Top</a>  |  - <a href="#id2661704" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2661248" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-XLib-Surfaces"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2625891"></a><span class="refentrytitle">XLib Surfaces</span> +<a name="id2596991"></a><span class="refentrytitle">XLib Surfaces</span> </h2> <p>XLib Surfaces — X Window System rendering using XLib</p> </td> @@ -79,17 +79,17 @@ int <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-su </pre> </div> <div class="refsect1" lang="en"> -<a name="id2661704"></a><h2>Description</h2> +<a name="id2661248"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2661719"></a><h2>Details</h2> +<a name="id2661573"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2661730"></a><h3> +<a name="id2661584"></a><h3> <a name="cairo-xlib-surface-create"></a>cairo_xlib_surface_create ()</h3> -<a class="indexterm" name="id2661741"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_xlib_surface_create (Display *dpy, +<a class="indexterm" name="id2661595"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_xlib_surface_create (Display *dpy, Drawable drawable, Visual *visual, int width, @@ -152,9 +152,9 @@ children will be included.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2661932"></a><h3> +<a name="id2661785"></a><h3> <a name="cairo-xlib-surface-create-for-bitmap"></a>cairo_xlib_surface_create_for_bitmap ()</h3> -<a class="indexterm" name="id2661943"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_xlib_surface_create_for_bitmap +<a class="indexterm" name="id2661796"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_xlib_surface_create_for_bitmap (Display *dpy, Pixmap bitmap, Screen *screen, @@ -204,9 +204,9 @@ This will be drawn to as a CAIRO_FORMAT_A1 object.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2662107"></a><h3> +<a name="id2661960"></a><h3> <a name="cairo-xlib-surface-set-size"></a>cairo_xlib_surface_set_size ()</h3> -<a class="indexterm" name="id2662119"></a><pre class="programlisting">void cairo_xlib_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2661972"></a><pre class="programlisting">void cairo_xlib_surface_set_size (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, int width, int height);</pre> <p> @@ -246,9 +246,9 @@ this function on a surface created for a Pixmap.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667433"></a><h3> +<a name="id2667491"></a><h3> <a name="cairo-xlib-surface-get-display"></a>cairo_xlib_surface_get_display ()</h3> -<a class="indexterm" name="id2667448"></a><pre class="programlisting">Display* cairo_xlib_surface_get_display (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2667506"></a><pre class="programlisting">Display* cairo_xlib_surface_get_display (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the X Display for the underlying X Drawable.</p> <p> @@ -275,9 +275,9 @@ Get the X Display for the underlying X Drawable.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667515"></a><h3> +<a name="id2667573"></a><h3> <a name="cairo-xlib-surface-get-screen"></a>cairo_xlib_surface_get_screen ()</h3> -<a class="indexterm" name="id2667529"></a><pre class="programlisting">Screen* cairo_xlib_surface_get_screen (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2667588"></a><pre class="programlisting">Screen* cairo_xlib_surface_get_screen (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the X Screen for the underlying X Drawable.</p> <p> @@ -304,9 +304,9 @@ Get the X Screen for the underlying X Drawable.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667597"></a><h3> +<a name="id2667655"></a><h3> <a name="cairo-xlib-surface-set-drawable"></a>cairo_xlib_surface_set_drawable ()</h3> -<a class="indexterm" name="id2667609"></a><pre class="programlisting">void cairo_xlib_surface_set_drawable (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2667668"></a><pre class="programlisting">void cairo_xlib_surface_set_drawable (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, Drawable drawable, int width, int height);</pre> @@ -348,9 +348,9 @@ compatibility.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667724"></a><h3> +<a name="id2667783"></a><h3> <a name="cairo-xlib-surface-get-drawable"></a>cairo_xlib_surface_get_drawable ()</h3> -<a class="indexterm" name="id2667739"></a><pre class="programlisting">Drawable cairo_xlib_surface_get_drawable (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2667797"></a><pre class="programlisting">Drawable cairo_xlib_surface_get_drawable (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the underlying X Drawable used for the surface.</p> <p> @@ -377,9 +377,9 @@ Get the underlying X Drawable used for the surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667806"></a><h3> +<a name="id2667865"></a><h3> <a name="cairo-xlib-surface-get-visual"></a>cairo_xlib_surface_get_visual ()</h3> -<a class="indexterm" name="id2667821"></a><pre class="programlisting">Visual* cairo_xlib_surface_get_visual (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2667879"></a><pre class="programlisting">Visual* cairo_xlib_surface_get_visual (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the X Visual used for underlying X Drawable.</p> <p> @@ -406,9 +406,9 @@ Get the X Visual used for underlying X Drawable.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667888"></a><h3> +<a name="id2667947"></a><h3> <a name="cairo-xlib-surface-get-width"></a>cairo_xlib_surface_get_width ()</h3> -<a class="indexterm" name="id2667903"></a><pre class="programlisting">int cairo_xlib_surface_get_width (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2667961"></a><pre class="programlisting">int cairo_xlib_surface_get_width (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the width of the X Drawable underlying the surface in pixels.</p> <p> @@ -435,9 +435,9 @@ Get the width of the X Drawable underlying the surface in pixels.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2667971"></a><h3> +<a name="id2668030"></a><h3> <a name="cairo-xlib-surface-get-height"></a>cairo_xlib_surface_get_height ()</h3> -<a class="indexterm" name="id2667986"></a><pre class="programlisting">int cairo_xlib_surface_get_height (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2668044"></a><pre class="programlisting">int cairo_xlib_surface_get_height (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the height of the X Drawable underlying the surface in pixels.</p> <p> @@ -464,9 +464,9 @@ Get the height of the X Drawable underlying the surface in pixels.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2668054"></a><h3> +<a name="id2668113"></a><h3> <a name="cairo-xlib-surface-get-depth"></a>cairo_xlib_surface_get_depth ()</h3> -<a class="indexterm" name="id2668069"></a><pre class="programlisting">int cairo_xlib_surface_get_depth (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2668127"></a><pre class="programlisting">int cairo_xlib_surface_get_depth (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Get the number of bits used to represent each pixel value.</p> <p> @@ -493,9 +493,9 @@ Get the number of bits used to represent each pixel value.</p> </div> </div> <div class="refsect1" lang="en"> -<a name="id2668138"></a><div class="refsect2" lang="en"><a name="id2668140"></a></div> +<a name="id2668197"></a><div class="refsect2" lang="en"><a name="id2668198"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2668141"></a></div> +<div class="refsect2" lang="en"><a name="id2668199"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-cairo-font-face-t.html b/doc/public/html/cairo-cairo-font-face-t.html index 323b641..6f3b84d 100644 --- a/doc/public/html/cairo-cairo-font-face-t.html +++ b/doc/public/html/cairo-cairo-font-face-t.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Scaled-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2601726" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2584655" class="shortcut">Top</a>  |  - <a href="#id2627542" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2640041" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-cairo-font-face-t"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2601726"></a><span class="refentrytitle">cairo_font_face_t</span> +<a name="id2584655"></a><span class="refentrytitle">cairo_font_face_t</span> </h2> <p>cairo_font_face_t — Base class for fonts</p> </td> @@ -67,17 +67,17 @@ void* <a class="link" href="cairo-cairo-font-face-t.html#cairo-fon </pre> </div> <div class="refsect1" lang="en"> -<a name="id2627542"></a><h2>Description</h2> +<a name="id2640041"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2627695"></a><h2>Details</h2> +<a name="id2640057"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2627706"></a><h3> +<a name="id2640068"></a><h3> <a name="cairo-font-face-t"></a>cairo_font_face_t</h3> -<a class="indexterm" name="id2627718"></a><pre class="programlisting">typedef struct _cairo_font_face cairo_font_face_t; +<a class="indexterm" name="id2640080"></a><pre class="programlisting">typedef struct _cairo_font_face cairo_font_face_t; </pre> <p> A <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> specifies all aspects of a font other @@ -101,9 +101,9 @@ Memory management of <a class="link" href="cairo-cairo-font-face-t.html#cairo-fo </div> <hr> <div class="refsect2" lang="en"> -<a name="id2627829"></a><h3> +<a name="id2582070"></a><h3> <a name="cairo-font-face-reference"></a>cairo_font_face_reference ()</h3> -<a class="indexterm" name="id2627840"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_font_face_reference (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> +<a class="indexterm" name="id2582081"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_font_face_reference (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> <p> Increases the reference count on <em class="parameter"><code>font_face</code></em> by one. This prevents <em class="parameter"><code>font_face</code></em> from being destroyed until a matching call to @@ -134,9 +134,9 @@ function does nothing). </div> <hr> <div class="refsect2" lang="en"> -<a name="id2640076"></a><h3> +<a name="id2639148"></a><h3> <a name="cairo-font-face-destroy"></a>cairo_font_face_destroy ()</h3> -<a class="indexterm" name="id2640087"></a><pre class="programlisting">void cairo_font_face_destroy (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> +<a class="indexterm" name="id2639159"></a><pre class="programlisting">void cairo_font_face_destroy (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> <p> Decreases the reference count on <em class="parameter"><code>font_face</code></em> by one. If the result is zero, then <em class="parameter"><code>font_face</code></em> and all associated resources are freed. @@ -155,9 +155,9 @@ See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-reference </div> <hr> <div class="refsect2" lang="en"> -<a name="id2640165"></a><h3> +<a name="id2639237"></a><h3> <a name="cairo-font-face-status"></a>cairo_font_face_status ()</h3> -<a class="indexterm" name="id2640176"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_font_face_status (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> +<a class="indexterm" name="id2639248"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_font_face_status (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> <p> Checks whether an error has previously occurred for this font face</p> @@ -174,8 +174,12 @@ font face</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as - <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as + <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. </td> </tr> </tbody> @@ -183,9 +187,9 @@ font face</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2639317"></a><h3> +<a name="id2639334"></a><h3> <a name="cairo-font-type-t"></a>enum cairo_font_type_t</h3> -<a class="indexterm" name="id2639332"></a><pre class="programlisting">typedef enum _cairo_font_type { +<a class="indexterm" name="id2639349"></a><pre class="programlisting">typedef enum _cairo_font_type { CAIRO_FONT_TYPE_TOY, CAIRO_FONT_TYPE_FT, CAIRO_FONT_TYPE_WIN32, @@ -258,9 +262,9 @@ New entries may be added in future versions.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2639518"></a><h3> +<a name="id2639537"></a><h3> <a name="cairo-font-face-get-type"></a>cairo_font_face_get_type ()</h3> -<a class="indexterm" name="id2639532"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> cairo_font_face_get_type (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> +<a class="indexterm" name="id2639550"></a><pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t">cairo_font_type_t</a> cairo_font_face_get_type (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> <p> This function returns the type of the backend used to create a font face. See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t"><span class="type">cairo_font_type_t</span></a> for available types.</p> @@ -288,9 +292,9 @@ a font face. See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-t </div> <hr> <div class="refsect2" lang="en"> -<a name="id2639614"></a><h3> +<a name="id2639632"></a><h3> <a name="cairo-font-face-get-reference-count"></a>cairo_font_face_get_reference_count ()</h3> -<a class="indexterm" name="id2639630"></a><pre class="programlisting">unsigned int cairo_font_face_get_reference_count (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> +<a class="indexterm" name="id2639647"></a><pre class="programlisting">unsigned int cairo_font_face_get_reference_count (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre> <p> Returns the current reference count of <em class="parameter"><code>font_face</code></em>.</p> <p> @@ -318,9 +322,9 @@ object is a nil object, 0 will be returned. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2639720"></a><h3> +<a name="id2639737"></a><h3> <a name="cairo-font-face-set-user-data"></a>cairo_font_face_set_user_data ()</h3> -<a class="indexterm" name="id2639733"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_font_face_set_user_data (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face, +<a class="indexterm" name="id2639750"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_font_face_set_user_data (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key, void *user_data, <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre> @@ -358,7 +362,11 @@ same key. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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 +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a slot could not be allocated for the user data. </td> </tr> @@ -367,9 +375,9 @@ slot could not be allocated for the user data. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2646827"></a><h3> +<a name="id2594229"></a><h3> <a name="cairo-font-face-get-user-data"></a>cairo_font_face_get_user_data ()</h3> -<a class="indexterm" name="id2646840"></a><pre class="programlisting">void* cairo_font_face_get_user_data (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face, +<a class="indexterm" name="id2594242"></a><pre class="programlisting">void* cairo_font_face_get_user_data (<a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t">cairo_font_face_t</a> *font_face, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre> <p> Return user data previously attached to <em class="parameter"><code>font_face</code></em> using the specified @@ -402,9 +410,9 @@ attached to </div> </div> <div class="refsect1" lang="en"> -<a name="id2646965"></a><div class="refsect2" lang="en"><a name="id2646966"></a></div> +<a name="id2594367"></a><div class="refsect2" lang="en"><a name="id2594368"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2646967"></a></div> +<div class="refsect2" lang="en"><a name="id2594369"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-cairo-matrix-t.html b/doc/public/html/cairo-cairo-matrix-t.html index 3a24acc..3128c7d 100644 --- a/doc/public/html/cairo-cairo-matrix-t.html +++ b/doc/public/html/cairo-cairo-matrix-t.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Error-Handling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2617064" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2591460" class="shortcut">Top</a>  |  - <a href="#id2669175" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2665296" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-cairo-matrix-t"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2617064"></a><span class="refentrytitle">cairo_matrix_t</span> +<a name="id2591460"></a><span class="refentrytitle">cairo_matrix_t</span> </h2> <p>cairo_matrix_t — Generic matrix operations</p> </td> @@ -89,8 +89,8 @@ void <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix </pre> </div> <div class="refsect1" lang="en"> -<a name="id2669175"></a><h2>Description</h2> -<p><a class="indexterm" name="id2669186"></a><a class="indexterm" name="id2669195"></a> +<a name="id2665296"></a><h2>Description</h2> +<p><a class="indexterm" name="id2665308"></a><a class="indexterm" name="id2665316"></a> <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t"><span class="type">cairo_matrix_t</span></a> is used throughout cairo to convert between different coordinate spaces. A <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t"><span class="type">cairo_matrix_t</span></a> holds an affine transformation, such as a scale, rotation, shear, or a combination of these. @@ -109,11 +109,11 @@ void <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix </p> </div> <div class="refsect1" lang="en"> -<a name="id2665196"></a><h2>Details</h2> +<a name="id2665400"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2665207"></a><h3> +<a name="id2665411"></a><h3> <a name="cairo-matrix-t"></a>cairo_matrix_t</h3> -<a class="indexterm" name="id2665219"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2665424"></a><pre class="programlisting">typedef struct { double xx; double yx; double xy; double yy; double x0; double y0; @@ -169,9 +169,9 @@ a point (x, y) is given by: </div> <hr> <div class="refsect2" lang="en"> -<a name="id2665385"></a><h3> +<a name="id2662108"></a><h3> <a name="cairo-matrix-init"></a>cairo_matrix_init ()</h3> -<a class="indexterm" name="id2665398"></a><pre class="programlisting">void cairo_matrix_init (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2662120"></a><pre class="programlisting">void cairo_matrix_init (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double xx, double yx, double xy, @@ -233,9 +233,9 @@ by: </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670127"></a><h3> +<a name="id2670192"></a><h3> <a name="cairo-matrix-init-identity"></a>cairo_matrix_init_identity ()</h3> -<a class="indexterm" name="id2670137"></a><pre class="programlisting">void cairo_matrix_init_identity (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> +<a class="indexterm" name="id2670202"></a><pre class="programlisting">void cairo_matrix_init_identity (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Modifies <em class="parameter"><code>matrix</code></em> to be an identity transformation.</p> <p> @@ -252,9 +252,9 @@ Modifies <em class="parameter"><code>matrix</code></em> to be an identity transf </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670193"></a><h3> +<a name="id2670257"></a><h3> <a name="cairo-matrix-init-translate"></a>cairo_matrix_init_translate ()</h3> -<a class="indexterm" name="id2670203"></a><pre class="programlisting">void cairo_matrix_init_translate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2670268"></a><pre class="programlisting">void cairo_matrix_init_translate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double tx, double ty);</pre> <p> @@ -286,9 +286,9 @@ Initializes <em class="parameter"><code>matrix</code></em> to a transformation t </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670310"></a><h3> +<a name="id2670374"></a><h3> <a name="cairo-matrix-init-scale"></a>cairo_matrix_init_scale ()</h3> -<a class="indexterm" name="id2670321"></a><pre class="programlisting">void cairo_matrix_init_scale (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2670385"></a><pre class="programlisting">void cairo_matrix_init_scale (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double sx, double sy);</pre> <p> @@ -320,9 +320,9 @@ in the X and Y dimensions, respectively.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670432"></a><h3> +<a name="id2670496"></a><h3> <a name="cairo-matrix-init-rotate"></a>cairo_matrix_init_rotate ()</h3> -<a class="indexterm" name="id2670444"></a><pre class="programlisting">void cairo_matrix_init_rotate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2670507"></a><pre class="programlisting">void cairo_matrix_init_rotate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double radians);</pre> <p> Initialized <em class="parameter"><code>matrix</code></em> to a transformation that rotates by <em class="parameter"><code>radians</code></em>.</p> @@ -351,9 +351,9 @@ direction. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670532"></a><h3> +<a name="id2670595"></a><h3> <a name="cairo-matrix-translate"></a>cairo_matrix_translate ()</h3> -<a class="indexterm" name="id2670543"></a><pre class="programlisting">void cairo_matrix_translate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2670606"></a><pre class="programlisting">void cairo_matrix_translate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double tx, double ty);</pre> <p> @@ -387,9 +387,9 @@ to the coordinates.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670668"></a><h3> +<a name="id2670731"></a><h3> <a name="cairo-matrix-scale"></a>cairo_matrix_scale ()</h3> -<a class="indexterm" name="id2670680"></a><pre class="programlisting">void cairo_matrix_scale (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2670744"></a><pre class="programlisting">void cairo_matrix_scale (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double sx, double sy);</pre> <p> @@ -422,9 +422,9 @@ by <em class="parameter"><code>sx</code></em> and <em class="parameter"><code>sy </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670811"></a><h3> +<a name="id2670874"></a><h3> <a name="cairo-matrix-rotate"></a>cairo_matrix_rotate ()</h3> -<a class="indexterm" name="id2670823"></a><pre class="programlisting">void cairo_matrix_rotate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2670886"></a><pre class="programlisting">void cairo_matrix_rotate (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double radians);</pre> <p> Applies rotation by <em class="parameter"><code>radians</code></em> to the transformation in @@ -456,9 +456,9 @@ direction. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2670925"></a><h3> +<a name="id2670989"></a><h3> <a name="cairo-matrix-invert"></a>cairo_matrix_invert ()</h3> -<a class="indexterm" name="id2670938"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_matrix_invert (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> +<a class="indexterm" name="id2671001"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_matrix_invert (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix);</pre> <p> Changes <em class="parameter"><code>matrix</code></em> to be the inverse of it's original value. Not all transformation matrices have inverses; if the matrix @@ -478,8 +478,12 @@ then it has no inverse and this function will fail.</p> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> <td> If <em class="parameter"><code>matrix</code></em> has an inverse, modifies <em class="parameter"><code>matrix</code></em> to - be the inverse matrix and returns <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>. Otherwise, - returns <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-MATRIX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MATRIX</code></a>. + be the inverse matrix and returns <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>. Otherwise, + returns <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-MATRIX:CAPS" +><code class="literal">CAIRO_STATUS_INVALID_MATRIX</code></a>. </td> </tr> </tbody> @@ -487,9 +491,9 @@ then it has no inverse and this function will fail.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2671048"></a><h3> +<a name="id2671111"></a><h3> <a name="cairo-matrix-multiply"></a>cairo_matrix_multiply ()</h3> -<a class="indexterm" name="id2671059"></a><pre class="programlisting">void cairo_matrix_multiply (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *result, +<a class="indexterm" name="id2671122"></a><pre class="programlisting">void cairo_matrix_multiply (<a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *result, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *a, const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *b);</pre> <p> @@ -527,9 +531,9 @@ It is allowable for <em class="parameter"><code>result</code></em> to be identic </div> <hr> <div class="refsect2" lang="en"> -<a name="id2671227"></a><h3> +<a name="id2671290"></a><h3> <a name="cairo-matrix-transform-distance"></a>cairo_matrix_transform_distance ()</h3> -<a class="indexterm" name="id2671238"></a><pre class="programlisting">void cairo_matrix_transform_distance (const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2671301"></a><pre class="programlisting">void cairo_matrix_transform_distance (const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double *dx, double *dy);</pre> <p> @@ -577,9 +581,9 @@ to (<em class="parameter"><code>x2</code></em>,<em class="parameter"><code>y2</c </div> <hr> <div class="refsect2" lang="en"> -<a name="id2671468"></a><h3> +<a name="id2671530"></a><h3> <a name="cairo-matrix-transform-point"></a>cairo_matrix_transform_point ()</h3> -<a class="indexterm" name="id2671481"></a><pre class="programlisting">void cairo_matrix_transform_point (const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, +<a class="indexterm" name="id2671544"></a><pre class="programlisting">void cairo_matrix_transform_point (const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *matrix, double *x, double *y);</pre> <p> @@ -610,9 +614,9 @@ Transforms the point (<em class="parameter"><code>x</code></em>, <em class="para </div> </div> <div class="refsect1" lang="en"> -<a name="id2671601"></a><div class="refsect2" lang="en"><a name="id2671602"></a></div> +<a name="id2671664"></a><div class="refsect2" lang="en"><a name="id2671665"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2671603"></a></div> +<div class="refsect2" lang="en"><a name="id2671666"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-cairo-surface-t.html b/doc/public/html/cairo-cairo-surface-t.html index 0602d81..e199a85 100644 --- a/doc/public/html/cairo-cairo-surface-t.html +++ b/doc/public/html/cairo-cairo-surface-t.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Image-Surfaces.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2593060" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2577626" class="shortcut">Top</a>  |  - <a href="#id2656519" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2656888" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-cairo-surface-t"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2593060"></a><span class="refentrytitle">cairo_surface_t</span> +<a name="id2577626"></a><span class="refentrytitle">cairo_surface_t</span> </h2> <p>cairo_surface_t — Base class for surfaces</p> </td> @@ -95,17 +95,17 @@ void* <a class="link" href="cairo-cairo-surface-t.html#cairo-surfa </pre> </div> <div class="refsect1" lang="en"> -<a name="id2656519"></a><h2>Description</h2> +<a name="id2656888"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> -<a name="id2656535"></a><h2>Details</h2> +<a name="id2656904"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2656546"></a><h3> +<a name="id2656914"></a><h3> <a name="cairo-surface-t"></a>cairo_surface_t</h3> -<a class="indexterm" name="id2656558"></a><pre class="programlisting">typedef struct _cairo_surface cairo_surface_t; +<a class="indexterm" name="id2656927"></a><pre class="programlisting">typedef struct _cairo_surface cairo_surface_t; </pre> <p> A <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> represents an image, either as the destination @@ -128,9 +128,9 @@ Memory management of <a class="link" href="cairo-cairo-surface-t.html#cairo-surf </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653655"></a><h3> +<a name="id2653728"></a><h3> <a name="cairo-content-t"></a>enum cairo_content_t</h3> -<a class="indexterm" name="id2653667"></a><pre class="programlisting">typedef enum _cairo_content { +<a class="indexterm" name="id2653740"></a><pre class="programlisting">typedef enum _cairo_content { CAIRO_CONTENT_COLOR = 0x1000, CAIRO_CONTENT_ALPHA = 0x2000, CAIRO_CONTENT_COLOR_ALPHA = 0x3000 @@ -171,9 +171,9 @@ implementation can detect the error if users confuse the two types.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2653773"></a><h3> +<a name="id2653846"></a><h3> <a name="cairo-surface-create-similar"></a>cairo_surface_create_similar ()</h3> -<a class="indexterm" name="id2653784"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_surface_create_similar (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *other, +<a class="indexterm" name="id2653857"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_surface_create_similar (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *other, <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> content, int width, int height);</pre> @@ -230,9 +230,9 @@ or any other error occurs. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658690"></a><h3> +<a name="id2658731"></a><h3> <a name="cairo-surface-reference"></a>cairo_surface_reference ()</h3> -<a class="indexterm" name="id2658700"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_surface_reference (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2658742"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_surface_reference (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Increases the reference count on <em class="parameter"><code>surface</code></em> by one. This prevents <em class="parameter"><code>surface</code></em> from being destroyed until a matching call to @@ -262,9 +262,9 @@ The number of references to a <a class="link" href="cairo-cairo-surface-t.html#c </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658809"></a><h3> +<a name="id2658853"></a><h3> <a name="cairo-surface-destroy"></a>cairo_surface_destroy ()</h3> -<a class="indexterm" name="id2658820"></a><pre class="programlisting">void cairo_surface_destroy (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2658865"></a><pre class="programlisting">void cairo_surface_destroy (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Decreases the reference count on <em class="parameter"><code>surface</code></em> by one. If the result is zero, then <em class="parameter"><code>surface</code></em> and all associated resources are freed. See @@ -283,9 +283,9 @@ zero, then <em class="parameter"><code>surface</code></em> and all associated re </div> <hr> <div class="refsect2" lang="en"> -<a name="id2658899"></a><h3> +<a name="id2658925"></a><h3> <a name="cairo-surface-status"></a>cairo_surface_status ()</h3> -<a class="indexterm" name="id2658910"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_status (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2658935"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_status (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Checks whether an error has previously occurred for this surface.</p> @@ -302,10 +302,24 @@ surface.</p> </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NULL-POINTER:CAPS"><code class="literal">CAIRO_STATUS_NULL_POINTER</code></a>, -<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-READ-ERROR:CAPS"><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>, -<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-CONTENT:CAPS"><code class="literal">CAIRO_STATUS_INVALID_CONTENT</code></a>, <a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-FORMAT:CAPS"><code class="literal">CAIRO_STATUS_INVALID_FORMAT</code></a>, or -<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-VISUAL:CAPS"><code class="literal">CAIRO_STATUS_INVALID_VISUAL</code></a>. +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NULL-POINTER:CAPS" +><code class="literal">CAIRO_STATUS_NULL_POINTER</code></a>, +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>, <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-READ-ERROR:CAPS" +><code class="literal">CAIRO_STATUS_READ_ERROR</code></a>, +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-CONTENT:CAPS" +><code class="literal">CAIRO_STATUS_INVALID_CONTENT</code></a>, <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-FORMAT:CAPS" +><code class="literal">CAIRO_STATUS_INVALID_FORMAT</code></a>, or +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-VISUAL:CAPS" +><code class="literal">CAIRO_STATUS_INVALID_VISUAL</code></a>. </td> </tr> </tbody> @@ -313,9 +327,9 @@ surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659045"></a><h3> +<a name="id2659058"></a><h3> <a name="cairo-surface-finish"></a>cairo_surface_finish ()</h3> -<a class="indexterm" name="id2659056"></a><pre class="programlisting">void cairo_surface_finish (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2659068"></a><pre class="programlisting">void cairo_surface_finish (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> This function finishes the surface and drops all references to external resources. For example, for the Xlib backend it means @@ -345,9 +359,9 @@ associated with the surface.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659152"></a><h3> +<a name="id2659157"></a><h3> <a name="cairo-surface-flush"></a>cairo_surface_flush ()</h3> -<a class="indexterm" name="id2659165"></a><pre class="programlisting">void cairo_surface_flush (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2659167"></a><pre class="programlisting">void cairo_surface_flush (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Do any pending drawing for the surface and also restore any temporary modification's cairo has made to the surface's @@ -369,9 +383,9 @@ then this function does nothing.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659227"></a><h3> +<a name="id2659223"></a><h3> <a name="cairo-surface-get-font-options"></a>cairo_surface_get_font_options ()</h3> -<a class="indexterm" name="id2659240"></a><pre class="programlisting">void cairo_surface_get_font_options (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2659236"></a><pre class="programlisting">void cairo_surface_get_font_options (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, <a class="link" href="cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre> <p> Retrieves the default font rendering options for the surface. @@ -401,9 +415,9 @@ metrics and so forth. The result can then be used with </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659340"></a><h3> +<a name="id2659326"></a><h3> <a name="cairo-surface-get-content"></a>cairo_surface_get_content ()</h3> -<a class="indexterm" name="id2659354"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> cairo_surface_get_content (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2659339"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> cairo_surface_get_content (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> This function returns the content type of <em class="parameter"><code>surface</code></em> which indicates whether the surface contains color and/or alpha information. See @@ -432,9 +446,9 @@ whether the surface contains color and/or alpha information. See </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659449"></a><h3> +<a name="id2659424"></a><h3> <a name="cairo-surface-mark-dirty"></a>cairo_surface_mark_dirty ()</h3> -<a class="indexterm" name="id2659460"></a><pre class="programlisting">void cairo_surface_mark_dirty (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2659434"></a><pre class="programlisting">void cairo_surface_mark_dirty (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Tells cairo that drawing has been done to surface using means other than cairo, and that cairo should reread any cached areas. Note @@ -453,9 +467,9 @@ that you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surfac </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659529"></a><h3> +<a name="id2659496"></a><h3> <a name="cairo-surface-mark-dirty-rectangle"></a>cairo_surface_mark_dirty_rectangle ()</h3> -<a class="indexterm" name="id2659543"></a><pre class="programlisting">void cairo_surface_mark_dirty_rectangle (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2659509"></a><pre class="programlisting">void cairo_surface_mark_dirty_rectangle (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, int x, int y, int width, @@ -505,9 +519,9 @@ expect.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659702"></a><h3> +<a name="id2659653"></a><h3> <a name="cairo-surface-set-device-offset"></a>cairo_surface_set_device_offset ()</h3> -<a class="indexterm" name="id2659715"></a><pre class="programlisting">void cairo_surface_set_device_offset (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2659666"></a><pre class="programlisting">void cairo_surface_set_device_offset (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double x_offset, double y_offset);</pre> <p> @@ -549,9 +563,9 @@ using the surface in a source pattern.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659860"></a><h3> +<a name="id2659798"></a><h3> <a name="cairo-surface-get-device-offset"></a>cairo_surface_get_device_offset ()</h3> -<a class="indexterm" name="id2659876"></a><pre class="programlisting">void cairo_surface_get_device_offset (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2659812"></a><pre class="programlisting">void cairo_surface_get_device_offset (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double *x_offset, double *y_offset);</pre> <p> @@ -585,9 +599,9 @@ This function returns the previous device offset set by </div> <hr> <div class="refsect2" lang="en"> -<a name="id2659996"></a><h3> +<a name="id2659920"></a><h3> <a name="cairo-surface-set-fallback-resolution"></a>cairo_surface_set_fallback_resolution ()</h3> -<a class="indexterm" name="id2660011"></a><pre class="programlisting">void cairo_surface_set_fallback_resolution +<a class="indexterm" name="id2659935"></a><pre class="programlisting">void cairo_surface_set_fallback_resolution (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double x_pixels_per_inch, double y_pixels_per_inch);</pre> @@ -645,9 +659,9 @@ in effect on a single page.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2660170"></a><h3> +<a name="id2660079"></a><h3> <a name="cairo-surface-type-t"></a>enum cairo_surface_type_t</h3> -<a class="indexterm" name="id2660183"></a><pre class="programlisting">typedef enum _cairo_surface_type { +<a class="indexterm" name="id2660091"></a><pre class="programlisting">typedef enum _cairo_surface_type { CAIRO_SURFACE_TYPE_IMAGE, CAIRO_SURFACE_TYPE_PDF, CAIRO_SURFACE_TYPE_PS, @@ -767,9 +781,9 @@ New entries may be added in future versions.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2660569"></a><h3> +<a name="id2660450"></a><h3> <a name="cairo-surface-get-type"></a>cairo_surface_get_type ()</h3> -<a class="indexterm" name="id2660583"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t">cairo_surface_type_t</a> cairo_surface_get_type (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2660462"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t">cairo_surface_type_t</a> cairo_surface_get_type (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> This function returns the type of the backend used to create a surface. See <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-type-t"><span class="type">cairo_surface_type_t</span></a> for available types.</p> @@ -797,9 +811,9 @@ a surface. See <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-ty </div> <hr> <div class="refsect2" lang="en"> -<a name="id2660670"></a><h3> +<a name="id2660541"></a><h3> <a name="cairo-surface-get-reference-count"></a>cairo_surface_get_reference_count ()</h3> -<a class="indexterm" name="id2660687"></a><pre class="programlisting">unsigned int cairo_surface_get_reference_count (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2660556"></a><pre class="programlisting">unsigned int cairo_surface_get_reference_count (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Returns the current reference count of <em class="parameter"><code>surface</code></em>.</p> <p> @@ -827,9 +841,9 @@ object is a nil object, 0 will be returned. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2660776"></a><h3> +<a name="id2660636"></a><h3> <a name="cairo-surface-set-user-data"></a>cairo_surface_set_user_data ()</h3> -<a class="indexterm" name="id2660788"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_set_user_data (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2660647"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_set_user_data (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key, void *user_data, <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre> @@ -867,7 +881,11 @@ same key. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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 +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a slot could not be allocated for the user data. </td> </tr> @@ -876,9 +894,9 @@ slot could not be allocated for the user data. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2660948"></a><h3> +<a name="id2660818"></a><h3> <a name="cairo-surface-get-user-data"></a>cairo_surface_get_user_data ()</h3> -<a class="indexterm" name="id2660959"></a><pre class="programlisting">void* cairo_surface_get_user_data (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, +<a class="indexterm" name="id2660829"></a><pre class="programlisting">void* cairo_surface_get_user_data (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre> <p> Return user data previously attached to <em class="parameter"><code>surface</code></em> using the specified @@ -911,9 +929,9 @@ attached to </div> <hr> <div class="refsect2" lang="en"> -<a name="id2661070"></a><h3> +<a name="id2660940"></a><h3> <a name="cairo-surface-copy-page"></a>cairo_surface_copy_page ()</h3> -<a class="indexterm" name="id2661083"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_copy_page (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2660953"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_copy_page (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Emits the current page for backends that support multiple pages, but doesn't clear it, so that the contents of the current page will @@ -944,9 +962,9 @@ want to get an empty page after the emission.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2661155"></a><h3> +<a name="id2661024"></a><h3> <a name="cairo-surface-show-page"></a>cairo_surface_show_page ()</h3> -<a class="indexterm" name="id2661167"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_show_page (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> +<a class="indexterm" name="id2661037"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_surface_show_page (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface);</pre> <p> Emits and clears the current page for backends that support multiple pages. Use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-copy-page"><code class="function">cairo_surface_copy_page()</code></a> if you don't want to clear the page.</p> @@ -975,9 +993,9 @@ pages. Use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-copy- </div> </div> <div class="refsect1" lang="en"> -<a name="id2661244"></a><div class="refsect2" lang="en"><a name="id2661245"></a></div> +<a name="id2661114"></a><div class="refsect2" lang="en"><a name="id2661115"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2661246"></a></div> +<div class="refsect2" lang="en"><a name="id2661116"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo-cairo-t.html b/doc/public/html/cairo-cairo-t.html index af6431b..892bcda 100644 --- a/doc/public/html/cairo-cairo-t.html +++ b/doc/public/html/cairo-cairo-t.html @@ -30,16 +30,16 @@ <th width="100%" align="center">Cairo: A Vector Graphics Library</th> <td><a accesskey="n" href="cairo-Paths.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> -<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2592055" class="shortcut">Top</a> +<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2592051" class="shortcut">Top</a>  |  - <a href="#id2630498" class="shortcut">Description</a></nobr></td></tr> + <a href="#id2630478" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="cairo-cairo-t"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> -<a name="id2592055"></a><span class="refentrytitle">cairo_t</span> +<a name="id2592051"></a><span class="refentrytitle">cairo_t</span> </h2> <p>cairo_t — The cairo drawing context</p> </td> @@ -172,7 +172,7 @@ void* <a class="link" href="cairo-cairo-t.html#cairo-get-user-data </pre> </div> <div class="refsect1" lang="en"> -<a name="id2630498"></a><h2>Description</h2> +<a name="id2630478"></a><h2>Description</h2> <p> <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> is the main object used when drawing with cairo. To draw with cairo, you create a <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a>, set the target surface, @@ -187,11 +187,11 @@ void* <a class="link" href="cairo-cairo-t.html#cairo-get-user-data </p> </div> <div class="refsect1" lang="en"> -<a name="id2630608"></a><h2>Details</h2> +<a name="id2630575"></a><h2>Details</h2> <div class="refsect2" lang="en"> -<a name="id2630619"></a><h3> +<a name="id2630584"></a><h3> <a name="cairo-t"></a>cairo_t</h3> -<a class="indexterm" name="id2630631"></a><pre class="programlisting">typedef struct _cairo cairo_t; +<a class="indexterm" name="id2630595"></a><pre class="programlisting">typedef struct _cairo cairo_t; </pre> <p> A <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> contains the current state of the rendering device, @@ -211,9 +211,9 @@ Memory management of <a class="link" href="cairo-cairo-t.html#cairo-t"><span cla </div> <hr> <div class="refsect2" lang="en"> -<a name="id2630708"></a><h3> +<a name="id2630664"></a><h3> <a name="cairo-create"></a>cairo_create ()</h3> -<a class="indexterm" name="id2630721"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* cairo_create (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *target);</pre> +<a class="indexterm" name="id2630674"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* cairo_create (<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *target);</pre> <p> Creates a new <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> with all graphics state parameters set to default values and with <em class="parameter"><code>target</code></em> as a target surface. The target @@ -243,7 +243,9 @@ maintain a separate reference to it.</p> with <a class="link" href="cairo-cairo-t.html#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"><span class="type">cairo_t</span></a>. This function never returns <code class="literal">NULL</code>. If memory cannot be allocated, a special <a class="link" href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> object will be returned on - which <a class="link" href="cairo-cairo-t.html#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>. + which <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a> returns <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>. You can use this object normally, but no drawing will be done. </td> @@ -253,9 +255,9 @@ maintain a separate reference to it.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2630896"></a><h3> +<a name="id2630834"></a><h3> <a name="cairo-reference"></a>cairo_reference ()</h3> -<a class="indexterm" name="id2630908"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* cairo_reference (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2630844"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a>* cairo_reference (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Increases the reference count on <em class="parameter"><code>cr</code></em> by one. This prevents <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"><code class="function">cairo_destroy()</code></a> @@ -285,9 +287,9 @@ The number of references to a <a class="link" href="cairo-cairo-t.html#cairo-t"> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631026"></a><h3> +<a name="id2630949"></a><h3> <a name="cairo-destroy"></a>cairo_destroy ()</h3> -<a class="indexterm" name="id2631038"></a><pre class="programlisting">void cairo_destroy (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2630959"></a><pre class="programlisting">void cairo_destroy (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Decreases the reference count on <em class="parameter"><code>cr</code></em> by one. If the result is zero, then <em class="parameter"><code>cr</code></em> and all associated resources are freed. @@ -306,9 +308,9 @@ See <a class="link" href="cairo-cairo-t.html#cairo-reference"><code class="funct </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631117"></a><h3> +<a name="id2631030"></a><h3> <a name="cairo-status"></a>cairo_status ()</h3> -<a class="indexterm" name="id2631130"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_status (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631041"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_status (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Checks whether an error has previously occurred for this context.</p> <p> @@ -332,9 +334,9 @@ Checks whether an error has previously occurred for this context.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631198"></a><h3> +<a name="id2631102"></a><h3> <a name="cairo-save"></a>cairo_save ()</h3> -<a class="indexterm" name="id2631210"></a><pre class="programlisting">void cairo_save (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631113"></a><pre class="programlisting">void cairo_save (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Makes a copy of the current state of <em class="parameter"><code>cr</code></em> and saves it on an internal stack of saved states for <em class="parameter"><code>cr</code></em>. When @@ -362,9 +364,9 @@ any saved states will be freed along with the <a class="link" href="cairo-cairo- </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631373"></a><h3> +<a name="id2631258"></a><h3> <a name="cairo-restore"></a>cairo_restore ()</h3> -<a class="indexterm" name="id2631385"></a><pre class="programlisting">void cairo_restore (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631269"></a><pre class="programlisting">void cairo_restore (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Restores <em class="parameter"><code>cr</code></em> to the state saved by a preceding call to <a class="link" href="cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and removes that state from the stack of @@ -383,9 +385,9 @@ saved states.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631459"></a><h3> +<a name="id2631334"></a><h3> <a name="cairo-get-target"></a>cairo_get_target ()</h3> -<a class="indexterm" name="id2631471"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_get_target (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631345"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_get_target (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the target surface for the cairo context as passed to <a class="link" href="cairo-cairo-t.html#cairo-create"><code class="function">cairo_create()</code></a>. @@ -393,9 +395,13 @@ Gets the target surface for the cairo context as passed to <p> This function will always return a valid pointer, but the result can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state, -(ie. <a class="link" href="cairo-cairo-t.html#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>). +(ie. <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>). A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status"><code class="function">cairo_surface_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>.</p> +<code class="literal">!=</code> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p> <p> </p> @@ -418,9 +424,9 @@ keep a reference to it, you must call <a class="link" href="cairo-cairo-surface- </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631613"></a><h3> +<a name="id2631473"></a><h3> <a name="cairo-push-group"></a>cairo_push_group ()</h3> -<a class="indexterm" name="id2631628"></a><pre class="programlisting">void cairo_push_group (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631485"></a><pre class="programlisting">void cairo_push_group (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Temporarily redirects drawing to an intermediate surface known as a group. The redirection lasts until the group is completed by a call @@ -482,9 +488,9 @@ cairo_paint_with_alpha (cr, alpha); </div> <hr> <div class="refsect2" lang="en"> -<a name="id2631810"></a><h3> +<a name="id2631650"></a><h3> <a name="cairo-push-group-with-content"></a>cairo_push_group_with_content ()</h3> -<a class="indexterm" name="id2631825"></a><pre class="programlisting">void cairo_push_group_with_content (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2631664"></a><pre class="programlisting">void cairo_push_group_with_content (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-surface-t.html#cairo-content-t">cairo_content_t</a> content);</pre> <p> Temporarily redirects drawing to an intermediate surface known as a @@ -522,9 +528,9 @@ detailed description of group rendering.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2605709"></a><h3> +<a name="id2631786"></a><h3> <a name="cairo-pop-group"></a>cairo_pop_group ()</h3> -<a class="indexterm" name="id2631956"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pop_group (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631798"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_pop_group (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#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"><code class="function">cairo_push_group_with_content()</code></a> and returns a new pattern @@ -563,9 +569,9 @@ caller owns the returned object and should call </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632078"></a><h3> +<a name="id2631919"></a><h3> <a name="cairo-pop-group-to-source"></a>cairo_pop_group_to_source ()</h3> -<a class="indexterm" name="id2632091"></a><pre class="programlisting">void cairo_pop_group_to_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2631932"></a><pre class="programlisting">void cairo_pop_group_to_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Terminates the redirection begun by a call to <a class="link" href="cairo-cairo-t.html#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"><code class="function">cairo_push_group_with_content()</code></a> and installs the resulting pattern @@ -609,18 +615,25 @@ group.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632212"></a><h3> +<a name="id2632054"></a><h3> <a name="cairo-get-group-target"></a>cairo_get_group_target ()</h3> -<a class="indexterm" name="id2632225"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_get_group_target (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2632066"></a><pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a>* cairo_get_group_target (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> -Gets the target surface for the current group as started by the -most recent call to <a class="link" href="cairo-cairo-t.html#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"><code class="function">cairo_push_group_with_content()</code></a>. +Gets the current destination surface for the context. This is either +the original target surface as passed to <a class="link" href="cairo-cairo-t.html#cairo-create"><code class="function">cairo_create()</code></a> or the target +surface for the current group as started by the most recent call to +<a class="link" href="cairo-cairo-t.html#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"><code class="function">cairo_push_group_with_content()</code></a>. </p> <p> -This function will return NULL if called "outside" of any group -rendering blocks, (that is, after the last balancing call to -<a class="link" href="cairo-cairo-t.html#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"><code class="function">cairo_pop_group_to_source()</code></a>).</p> +This function will always return a valid pointer, but the result +can be a "nil" surface if <em class="parameter"><code>cr</code></em> is already in an error state, +(ie. <a class="link" href="cairo-cairo-t.html#cairo-status"><code class="function">cairo_status()</code></a> <code class="literal">!=</code> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>). +A nil surface is indicated by <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status"><code class="function">cairo_surface_status()</code></a> +<code class="literal">!=</code> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a>.</p> <p> </p> @@ -634,9 +647,8 @@ rendering blocks, (that is, after the last balancing call to </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> the target group surface, or NULL if none. This -object is owned by cairo. To keep a reference to it, you must call -<a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference"><code class="function">cairo_surface_reference()</code></a>. +<td> the target surface. This object is owned by cairo. To +keep a reference to it, you must call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-reference"><code class="function">cairo_surface_reference()</code></a>. </td> </tr> @@ -647,9 +659,9 @@ object is owned by cairo. To keep a reference to it, you must call </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632336"></a><h3> +<a name="id2632221"></a><h3> <a name="cairo-set-source-rgb"></a>cairo_set_source_rgb ()</h3> -<a class="indexterm" name="id2632347"></a><pre class="programlisting">void cairo_set_source_rgb (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2632231"></a><pre class="programlisting">void cairo_set_source_rgb (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double red, double green, double blue);</pre> @@ -693,9 +705,9 @@ clamped.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632462"></a><h3> +<a name="id2632346"></a><h3> <a name="cairo-set-source-rgba"></a>cairo_set_source_rgba ()</h3> -<a class="indexterm" name="id2632472"></a><pre class="programlisting">void cairo_set_source_rgba (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2632356"></a><pre class="programlisting">void cairo_set_source_rgba (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double red, double green, double blue, @@ -745,9 +757,9 @@ will be clamped.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632606"></a><h3> +<a name="id2632491"></a><h3> <a name="cairo-set-source"></a>cairo_set_source ()</h3> -<a class="indexterm" name="id2632617"></a><pre class="programlisting">void cairo_set_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2632501"></a><pre class="programlisting">void cairo_set_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *source);</pre> <p> Sets the source pattern within <em class="parameter"><code>cr</code></em> to <em class="parameter"><code>source</code></em>. This pattern @@ -786,9 +798,9 @@ subsequent drawing operations. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632730"></a><h3> +<a name="id2632614"></a><h3> <a name="cairo-set-source-surface"></a>cairo_set_source_surface ()</h3> -<a class="indexterm" name="id2632740"></a><pre class="programlisting">void cairo_set_source_surface (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2632625"></a><pre class="programlisting">void cairo_set_source_surface (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double x, double y);</pre> @@ -841,9 +853,9 @@ repeating pattern with <a class="link" href="cairo-Patterns.html#cairo-pattern-s </div> <hr> <div class="refsect2" lang="en"> -<a name="id2632929"></a><h3> +<a name="id2632830"></a><h3> <a name="cairo-get-source"></a>cairo_get_source ()</h3> -<a class="indexterm" name="id2632939"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_get_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2632843"></a><pre class="programlisting"><a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a>* cairo_get_source (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current source pattern for <em class="parameter"><code>cr</code></em>.</p> <p> @@ -869,9 +881,9 @@ cairo. To keep a reference to it, you must call </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633008"></a><h3> +<a name="id2632922"></a><h3> <a name="cairo-antialias-t"></a>enum cairo_antialias_t</h3> -<a class="indexterm" name="id2633019"></a><pre class="programlisting">typedef enum _cairo_antialias { +<a class="indexterm" name="id2632935"></a><pre class="programlisting">typedef enum _cairo_antialias { CAIRO_ANTIALIAS_DEFAULT, CAIRO_ANTIALIAS_NONE, CAIRO_ANTIALIAS_GRAY, @@ -915,9 +927,9 @@ Specifies the type of antialiasing to do when rendering text or shapes.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633128"></a><h3> +<a name="id2633060"></a><h3> <a name="cairo-set-antialias"></a>cairo_set_antialias ()</h3> -<a class="indexterm" name="id2633138"></a><pre class="programlisting">void cairo_set_antialias (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2633074"></a><pre class="programlisting">void cairo_set_antialias (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> antialias);</pre> <p> Set the antialiasing mode of the rasterizer used for drawing shapes. @@ -949,9 +961,9 @@ Note that this option does not affect text rendering, instead see </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633233"></a><h3> +<a name="id2633180"></a><h3> <a name="cairo-get-antialias"></a>cairo_get_antialias ()</h3> -<a class="indexterm" name="id2633244"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> cairo_get_antialias (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2633193"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> cairo_get_antialias (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current shape antialiasing mode, as set by <code class="function">cairo_set_shape_antialias()</code>.</p> <p> @@ -975,9 +987,9 @@ Gets the current shape antialiasing mode, as set by <code class="function">cairo </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633307"></a><h3> +<a name="id2633264"></a><h3> <a name="cairo-set-dash"></a>cairo_set_dash ()</h3> -<a class="indexterm" name="id2633318"></a><pre class="programlisting">void cairo_set_dash (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2633277"></a><pre class="programlisting">void cairo_set_dash (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const double *dashes, int num_dashes, double offset);</pre> @@ -1010,7 +1022,9 @@ on and off portions of the size specified by the single value in <p> If any value in <em class="parameter"><code>dashes</code></em> is negative, or if all values are 0, then <em class="parameter"><code>cairo_t</code></em> will be put into an error state with a status of -<a class="link" href="cairo-Error-Handling.html#CAIRO-STATUS-INVALID-DASH:CAPS"><span class="type">CAIRO_STATUS_INVALID_DASH</span></a>.</p> +<a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-DASH:CAPS" +><span class="type">CAIRO_STATUS_INVALID_DASH</span></a>.</p> <p> </p> @@ -1042,9 +1056,9 @@ If any value in <em class="parameter"><code>dashes</code></em> is negative, or i </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633514"></a><h3> +<a name="id2633495"></a><h3> <a name="cairo-get-dash-count"></a>cairo_get_dash_count ()</h3> -<a class="indexterm" name="id2633526"></a><pre class="programlisting">int cairo_get_dash_count (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2633510"></a><pre class="programlisting">int cairo_get_dash_count (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> This function returns the length of the dash array in <em class="parameter"><code>cr</code></em> (0 if dashing is not currently in effect). @@ -1075,7 +1089,7 @@ See also <a class="link" href="cairo-cairo-t.html#cairo-set-dash"><code class="f </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633620"></a><h3> +<a name="id2633616"></a><h3> <a name="cairo-get-dash"></a>cairo_get_dash ()</h3> <a class="indexterm" name="id2633632"></a><pre class="programlisting">void cairo_get_dash (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *dashes, @@ -1112,9 +1126,9 @@ enough to hold at least the number of values returned by </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633769"></a><h3> +<a name="id2633784"></a><h3> <a name="cairo-fill-rule-t"></a>enum cairo_fill_rule_t</h3> -<a class="indexterm" name="id2633780"></a><pre class="programlisting">typedef enum _cairo_fill_rule { +<a class="indexterm" name="id2633798"></a><pre class="programlisting">typedef enum _cairo_fill_rule { CAIRO_FILL_RULE_WINDING, CAIRO_FILL_RULE_EVEN_ODD } cairo_fill_rule_t; @@ -1159,9 +1173,9 @@ filled. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633870"></a><h3> +<a name="id2633897"></a><h3> <a name="cairo-set-fill-rule"></a>cairo_set_fill_rule ()</h3> -<a class="indexterm" name="id2633880"></a><pre class="programlisting">void cairo_set_fill_rule (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2633911"></a><pre class="programlisting">void cairo_set_fill_rule (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> fill_rule);</pre> <p> Set the current fill rule within the cairo context. The fill rule @@ -1190,9 +1204,9 @@ on the semantics of each available fill rule.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2633983"></a><h3> +<a name="id2634026"></a><h3> <a name="cairo-get-fill-rule"></a>cairo_get_fill_rule ()</h3> -<a class="indexterm" name="id2633994"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> cairo_get_fill_rule (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2634040"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-fill-rule-t">cairo_fill_rule_t</a> cairo_get_fill_rule (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current fill rule, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="function">cairo_set_fill_rule()</code></a>.</p> <p> @@ -1216,9 +1230,9 @@ Gets the current fill rule, as set by <a class="link" href="cairo-cairo-t.html#c </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634056"></a><h3> +<a name="id2634111"></a><h3> <a name="cairo-line-cap-t"></a>enum cairo_line_cap_t</h3> -<a class="indexterm" name="id2634067"></a><pre class="programlisting">typedef enum _cairo_line_cap { +<a class="indexterm" name="id2634124"></a><pre class="programlisting">typedef enum _cairo_line_cap { CAIRO_LINE_CAP_BUTT, CAIRO_LINE_CAP_ROUND, CAIRO_LINE_CAP_SQUARE @@ -1252,9 +1266,9 @@ Specifies how to render the endpoint of a line when stroking.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634151"></a><h3> +<a name="id2634222"></a><h3> <a name="cairo-set-line-cap"></a>cairo_set_line_cap ()</h3> -<a class="indexterm" name="id2634161"></a><pre class="programlisting">void cairo_set_line_cap (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2634236"></a><pre class="programlisting">void cairo_set_line_cap (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> line_cap);</pre> <p> Sets the current line cap style within the cairo context. See @@ -1287,9 +1301,9 @@ construction.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634264"></a><h3> +<a name="id2634351"></a><h3> <a name="cairo-get-line-cap"></a>cairo_get_line_cap ()</h3> -<a class="indexterm" name="id2634274"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> cairo_get_line_cap (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2634365"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-cap-t">cairo_line_cap_t</a> cairo_get_line_cap (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current line cap style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-cap"><code class="function">cairo_set_line_cap()</code></a>.</p> <p> @@ -1313,9 +1327,9 @@ Gets the current line cap style, as set by <a class="link" href="cairo-cairo-t.h </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634337"></a><h3> +<a name="id2634436"></a><h3> <a name="cairo-line-join-t"></a>enum cairo_line_join_t</h3> -<a class="indexterm" name="id2634348"></a><pre class="programlisting">typedef enum _cairo_line_join { +<a class="indexterm" name="id2634449"></a><pre class="programlisting">typedef enum _cairo_line_join { CAIRO_LINE_JOIN_MITER, CAIRO_LINE_JOIN_ROUND, CAIRO_LINE_JOIN_BEVEL @@ -1352,9 +1366,9 @@ the line width from the joint point </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634453"></a><h3> +<a name="id2634557"></a><h3> <a name="cairo-set-line-join"></a>cairo_set_line_join ()</h3> -<a class="indexterm" name="id2634466"></a><pre class="programlisting">void cairo_set_line_join (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2634570"></a><pre class="programlisting">void cairo_set_line_join (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> line_join);</pre> <p> Sets the current line join style within the cairo context. See @@ -1387,9 +1401,9 @@ construction.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634582"></a><h3> +<a name="id2634686"></a><h3> <a name="cairo-get-line-join"></a>cairo_get_line_join ()</h3> -<a class="indexterm" name="id2634596"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> cairo_get_line_join (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2634700"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-line-join-t">cairo_line_join_t</a> cairo_get_line_join (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current line join style, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-join"><code class="function">cairo_set_line_join()</code></a>.</p> <p> @@ -1413,9 +1427,9 @@ Gets the current line join style, as set by <a class="link" href="cairo-cairo-t. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634667"></a><h3> +<a name="id2634771"></a><h3> <a name="cairo-set-line-width"></a>cairo_set_line_width ()</h3> -<a class="indexterm" name="id2634680"></a><pre class="programlisting">void cairo_set_line_width (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2634784"></a><pre class="programlisting">void cairo_set_line_width (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double width);</pre> <p> Sets the current line width within the cairo context. The line @@ -1462,9 +1476,9 @@ The default line width value is 2.0.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634842"></a><h3> +<a name="id2634945"></a><h3> <a name="cairo-get-line-width"></a>cairo_get_line_width ()</h3> -<a class="indexterm" name="id2634855"></a><pre class="programlisting">double cairo_get_line_width (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2634959"></a><pre class="programlisting">double cairo_get_line_width (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> This function returns the current line width value exactly as set by <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class="function">cairo_set_line_width()</code></a>. Note that the value is unchanged even if @@ -1491,9 +1505,9 @@ the CTM has changed between the calls to <a class="link" href="cairo-cairo-t.htm </div> <hr> <div class="refsect2" lang="en"> -<a name="id2634948"></a><h3> +<a name="id2635052"></a><h3> <a name="cairo-set-miter-limit"></a>cairo_set_miter_limit ()</h3> -<a class="indexterm" name="id2634961"></a><pre class="programlisting">void cairo_set_miter_limit (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2635065"></a><pre class="programlisting">void cairo_set_miter_limit (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double limit);</pre> <p> Sets the current miter limit within the cairo context. @@ -1532,9 +1546,9 @@ construction.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635096"></a><h3> +<a name="id2635200"></a><h3> <a name="cairo-get-miter-limit"></a>cairo_get_miter_limit ()</h3> -<a class="indexterm" name="id2635110"></a><pre class="programlisting">double cairo_get_miter_limit (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2635214"></a><pre class="programlisting">double cairo_get_miter_limit (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current miter limit, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-miter-limit"><code class="function">cairo_set_miter_limit()</code></a>.</p> <p> @@ -1558,9 +1572,9 @@ Gets the current miter limit, as set by <a class="link" href="cairo-cairo-t.html </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635181"></a><h3> +<a name="id2635285"></a><h3> <a name="cairo-operator-t"></a>enum cairo_operator_t</h3> -<a class="indexterm" name="id2635195"></a><pre class="programlisting">typedef enum _cairo_operator { +<a class="indexterm" name="id2635298"></a><pre class="programlisting">typedef enum _cairo_operator { CAIRO_OPERATOR_CLEAR, CAIRO_OPERATOR_SOURCE, @@ -1586,9 +1600,9 @@ Gets the current miter limit, as set by <a class="link" href="cairo-cairo-t.html </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635217"></a><h3> +<a name="id2635321"></a><h3> <a name="cairo-set-operator"></a>cairo_set_operator ()</h3> -<a class="indexterm" name="id2635231"></a><pre class="programlisting">void cairo_set_operator (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2635335"></a><pre class="programlisting">void cairo_set_operator (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> op);</pre> <p> Sets the compositing operator to be used for all drawing @@ -1620,9 +1634,9 @@ that if such a section existed? (cworth).</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635333"></a><h3> +<a name="id2635436"></a><h3> <a name="cairo-get-operator"></a>cairo_get_operator ()</h3> -<a class="indexterm" name="id2635346"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> cairo_get_operator (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2635450"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-operator-t">cairo_operator_t</a> cairo_get_operator (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current compositing operator for a cairo context.</p> <p> @@ -1646,9 +1660,9 @@ Gets the current compositing operator for a cairo context.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635408"></a><h3> +<a name="id2635511"></a><h3> <a name="cairo-set-tolerance"></a>cairo_set_tolerance ()</h3> -<a class="indexterm" name="id2635421"></a><pre class="programlisting">void cairo_set_tolerance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2635525"></a><pre class="programlisting">void cairo_set_tolerance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double tolerance);</pre> <p> Sets the tolerance used when converting paths into trapezoids. @@ -1679,9 +1693,9 @@ is unlikely to improve appearance significantly.)</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635512"></a><h3> +<a name="id2635616"></a><h3> <a name="cairo-get-tolerance"></a>cairo_get_tolerance ()</h3> -<a class="indexterm" name="id2635526"></a><pre class="programlisting">double cairo_get_tolerance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2635630"></a><pre class="programlisting">double cairo_get_tolerance (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current tolerance value, as set by <a class="link" href="cairo-cairo-t.html#cairo-set-tolerance"><code class="function">cairo_set_tolerance()</code></a>.</p> <p> @@ -1705,9 +1719,9 @@ Gets the current tolerance value, as set by <a class="link" href="cairo-cairo-t. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635597"></a><h3> +<a name="id2635700"></a><h3> <a name="cairo-clip"></a>cairo_clip ()</h3> -<a class="indexterm" name="id2635609"></a><pre class="programlisting">void cairo_clip (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2635713"></a><pre class="programlisting">void cairo_clip (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a> @@ -1743,9 +1757,9 @@ region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip"><code class </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635747"></a><h3> +<a name="id2635851"></a><h3> <a name="cairo-clip-preserve"></a>cairo_clip_preserve ()</h3> -<a class="indexterm" name="id2635761"></a><pre class="programlisting">void cairo_clip_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2635865"></a><pre class="programlisting">void cairo_clip_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function">cairo_fill()</code></a> @@ -1781,9 +1795,9 @@ region is <a class="link" href="cairo-cairo-t.html#cairo-reset-clip"><code class </div> <hr> <div class="refsect2" lang="en"> -<a name="id2635908"></a><h3> +<a name="id2636012"></a><h3> <a name="cairo-clip-extents"></a>cairo_clip_extents ()</h3> -<a class="indexterm" name="id2635924"></a><pre class="programlisting">void cairo_clip_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2636028"></a><pre class="programlisting">void cairo_clip_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *x1, double *y1, double *x2, @@ -1829,9 +1843,9 @@ current clip.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636068"></a><h3> +<a name="id2636172"></a><h3> <a name="cairo-reset-clip"></a>cairo_reset_clip ()</h3> -<a class="indexterm" name="id2636081"></a><pre class="programlisting">void cairo_reset_clip (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2636185"></a><pre class="programlisting">void cairo_reset_clip (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Reset the current clip region to its original, unrestricted state. That is, set the clip region to an infinitely large shape @@ -1859,9 +1873,9 @@ robust means of temporarily restricting the clip region.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636190"></a><h3> +<a name="id2636294"></a><h3> <a name="cairo-rectangle-t"></a>cairo_rectangle_t</h3> -<a class="indexterm" name="id2636206"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2636310"></a><pre class="programlisting">typedef struct { double x, y, width, height; } cairo_rectangle_t; </pre> @@ -1900,9 +1914,9 @@ A data structure for holding a rectangle.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636323"></a><h3> +<a name="id2636427"></a><h3> <a name="cairo-rectangle-list-t"></a>cairo_rectangle_list_t</h3> -<a class="indexterm" name="id2636339"></a><pre class="programlisting">typedef struct { +<a class="indexterm" name="id2636443"></a><pre class="programlisting">typedef struct { cairo_status_t status; cairo_rectangle_t *rectangles; int num_rectangles; @@ -1939,9 +1953,9 @@ array of rectangles.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636438"></a><h3> +<a name="id2636542"></a><h3> <a name="cairo-rectangle-list-destroy"></a>cairo_rectangle_list_destroy ()</h3> -<a class="indexterm" name="id2636454"></a><pre class="programlisting">void cairo_rectangle_list_destroy (<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a> *rectangle_list);</pre> +<a class="indexterm" name="id2636558"></a><pre class="programlisting">void cairo_rectangle_list_destroy (<a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a> *rectangle_list);</pre> <p> Unconditionally frees <em class="parameter"><code>rectangle_list</code></em> and all associated references. After this call, the <em class="parameter"><code>rectangle_list</code></em> pointer must not @@ -1962,9 +1976,9 @@ be dereferenced.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636536"></a><h3> +<a name="id2636640"></a><h3> <a name="cairo-copy-clip-rectangle-list"></a>cairo_copy_clip_rectangle_list ()</h3> -<a class="indexterm" name="id2636552"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a>* cairo_copy_clip_rectangle_list (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2636656"></a><pre class="programlisting"><a class="link" href="cairo-cairo-t.html#cairo-rectangle-list-t">cairo_rectangle_list_t</a>* cairo_copy_clip_rectangle_list (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Gets the current clip region as a list of rectangles in user coordinates. Never returns <code class="literal">NULL</code>. @@ -2002,9 +2016,9 @@ this function.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636644"></a><h3> +<a name="id2636748"></a><h3> <a name="cairo-fill"></a>cairo_fill ()</h3> -<a class="indexterm" name="id2636657"></a><pre class="programlisting">void cairo_fill (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2636761"></a><pre class="programlisting">void cairo_fill (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> A drawing operator that fills the current path according to the current fill rule, (each sub-path is implicitly closed before being @@ -2025,9 +2039,9 @@ the cairo context. See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-r </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636730"></a><h3> +<a name="id2636834"></a><h3> <a name="cairo-fill-preserve"></a>cairo_fill_preserve ()</h3> -<a class="indexterm" name="id2636743"></a><pre class="programlisting">void cairo_fill_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2636847"></a><pre class="programlisting">void cairo_fill_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> A drawing operator that fills the current path according to the current fill rule, (each sub-path is implicitly closed before being @@ -2050,9 +2064,9 @@ See <a class="link" href="cairo-cairo-t.html#cairo-set-fill-rule"><code class="f </div> <hr> <div class="refsect2" lang="en"> -<a name="id2636829"></a><h3> +<a name="id2636933"></a><h3> <a name="cairo-fill-extents"></a>cairo_fill_extents ()</h3> -<a class="indexterm" name="id2636842"></a><pre class="programlisting">void cairo_fill_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2636946"></a><pre class="programlisting">void cairo_fill_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *x1, double *y1, double *x2, @@ -2102,9 +2116,9 @@ See <a class="link" href="cairo-cairo-t.html#cairo-fill"><code class="function"> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637025"></a><h3> +<a name="id2637128"></a><h3> <a name="cairo-in-fill"></a>cairo_in_fill ()</h3> -<a class="indexterm" name="id2637038"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_in_fill (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2637142"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_in_fill (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double x, double y);</pre> <p> @@ -2147,9 +2161,9 @@ outside. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637188"></a><h3> +<a name="id2637292"></a><h3> <a name="cairo-mask"></a>cairo_mask ()</h3> -<a class="indexterm" name="id2637201"></a><pre class="programlisting">void cairo_mask (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2637305"></a><pre class="programlisting">void cairo_mask (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-Patterns.html#cairo-pattern-t">cairo_pattern_t</a> *pattern);</pre> <p> A drawing operator that paints the current source @@ -2177,9 +2191,9 @@ areas are not painted.)</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637294"></a><h3> +<a name="id2637398"></a><h3> <a name="cairo-mask-surface"></a>cairo_mask_surface ()</h3> -<a class="indexterm" name="id2637308"></a><pre class="programlisting">void cairo_mask_surface (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2637412"></a><pre class="programlisting">void cairo_mask_surface (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t">cairo_surface_t</a> *surface, double surface_x, double surface_y);</pre> @@ -2219,9 +2233,9 @@ areas are not painted.)</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637457"></a><h3> +<a name="id2637561"></a><h3> <a name="cairo-paint"></a>cairo_paint ()</h3> -<a class="indexterm" name="id2637470"></a><pre class="programlisting">void cairo_paint (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2637574"></a><pre class="programlisting">void cairo_paint (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> A drawing operator that paints the current source everywhere within the current clip region.</p> @@ -2239,9 +2253,9 @@ the current clip region.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637522"></a><h3> +<a name="id2637626"></a><h3> <a name="cairo-paint-with-alpha"></a>cairo_paint_with_alpha ()</h3> -<a class="indexterm" name="id2637535"></a><pre class="programlisting">void cairo_paint_with_alpha (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2637639"></a><pre class="programlisting">void cairo_paint_with_alpha (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double alpha);</pre> <p> A drawing operator that paints the current source everywhere within @@ -2269,9 +2283,9 @@ is faded out using the alpha value.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637626"></a><h3> +<a name="id2637730"></a><h3> <a name="cairo-stroke"></a>cairo_stroke ()</h3> -<a class="indexterm" name="id2637639"></a><pre class="programlisting">void cairo_stroke (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2637743"></a><pre class="programlisting">void cairo_stroke (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. After @@ -2318,9 +2332,9 @@ to be drawn in the case of either degenerate segments or sub-paths.</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637818"></a><h3> +<a name="id2637922"></a><h3> <a name="cairo-stroke-preserve"></a>cairo_stroke_preserve ()</h3> -<a class="indexterm" name="id2637832"></a><pre class="programlisting">void cairo_stroke_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2637936"></a><pre class="programlisting">void cairo_stroke_preserve (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. Unlike @@ -2345,9 +2359,9 @@ See <a class="link" href="cairo-cairo-t.html#cairo-set-line-width"><code class=" </div> <hr> <div class="refsect2" lang="en"> -<a name="id2637947"></a><h3> +<a name="id2638051"></a><h3> <a name="cairo-stroke-extents"></a>cairo_stroke_extents ()</h3> -<a class="indexterm" name="id2637961"></a><pre class="programlisting">void cairo_stroke_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2638064"></a><pre class="programlisting">void cairo_stroke_extents (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double *x1, double *y1, double *x2, @@ -2392,9 +2406,9 @@ current path and stroke parameters. If the current path is empty,</p> </div> <hr> <div class="refsect2" lang="en"> -<a name="id2638110"></a><h3> +<a name="id2638213"></a><h3> <a name="cairo-in-stroke"></a>cairo_in_stroke ()</h3> -<a class="indexterm" name="id2638122"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_in_stroke (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2638226"></a><pre class="programlisting"><a class="link" href="cairo-Types.html#cairo-bool-t">cairo_bool_t</a> cairo_in_stroke (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, double x, double y);</pre> <p> @@ -2439,9 +2453,9 @@ outside. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2638302"></a><h3> +<a name="id2638406"></a><h3> <a name="cairo-copy-page"></a>cairo_copy_page ()</h3> -<a class="indexterm" name="id2638316"></a><pre class="programlisting">void cairo_copy_page (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2638420"></a><pre class="programlisting">void cairo_copy_page (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Emits the current page for backends that support multiple pages, but doesn't clear it, so, the contents of the current page will be retained @@ -2465,9 +2479,9 @@ This is a convenience function that simply calls </div> <hr> <div class="refsect2" lang="en"> -<a name="id2638399"></a><h3> +<a name="id2638503"></a><h3> <a name="cairo-show-page"></a>cairo_show_page ()</h3> -<a class="indexterm" name="id2638412"></a><pre class="programlisting">void cairo_show_page (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2638516"></a><pre class="programlisting">void cairo_show_page (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Emits and clears the current page for backends that support multiple pages. Use <a class="link" href="cairo-cairo-t.html#cairo-copy-page"><code class="function">cairo_copy_page()</code></a> if you don't want to clear the page. @@ -2489,9 +2503,9 @@ This is a convenience function that simply calls </div> <hr> <div class="refsect2" lang="en"> -<a name="id2638494"></a><h3> +<a name="id2638597"></a><h3> <a name="cairo-get-reference-count"></a>cairo_get_reference_count ()</h3> -<a class="indexterm" name="id2638510"></a><pre class="programlisting">unsigned int cairo_get_reference_count (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> +<a class="indexterm" name="id2638614"></a><pre class="programlisting">unsigned int cairo_get_reference_count (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre> <p> Returns the current reference count of <em class="parameter"><code>cr</code></em>.</p> <p> @@ -2519,9 +2533,9 @@ object is a nil object, 0 will be returned. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2638599"></a><h3> +<a name="id2638703"></a><h3> <a name="cairo-set-user-data"></a>cairo_set_user_data ()</h3> -<a class="indexterm" name="id2638615"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_set_user_data (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2638719"></a><pre class="programlisting"><a class="link" href="cairo-Error-Handling.html#cairo-status-t">cairo_status_t</a> cairo_set_user_data (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key, void *user_data, <a class="link" href="cairo-Types.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre> @@ -2559,7 +2573,11 @@ same key. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<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 +<td> <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS" +><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a +href="../cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS" +><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a slot could not be allocated for the user data. </td> @@ -2571,9 +2589,9 @@ slot could not be allocated for the user data. </div> <hr> <div class="refsect2" lang="en"> -<a name="id2638830"></a><h3> +<a name="id2638933"></a><h3> <a name="cairo-get-user-data"></a>cairo_get_user_data ()</h3> -<a class="indexterm" name="id2638845"></a><pre class="programlisting">void* cairo_get_user_data (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, +<a class="indexterm" name="id2638949"></a><pre class="programlisting">void* cairo_get_user_data (<a class="link" href="cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, const <a class="link" href="cairo-Types.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre> <p> Return user data previously attached to <em class="parameter"><code>cr</code></em> using the specified @@ -2609,9 +2627,9 @@ attached to </div> </div> <div class="refsect1" lang="en"> -<a name="id2638978"></a><div class="refsect2" lang="en"><a name="id2638979"></a></div> +<a name="id2639082"></a><div class="refsect2" lang="en"><a name="id2639083"></a></div> <hr> -<div class="refsect2" lang="en"><a name="id2638980"></a></div> +<div class="refsect2" lang="en"><a name="id2639084"></a></div> </div> </div> </body> diff --git a/doc/public/html/cairo.devhelp b/doc/public/html/cairo.devhelp index 6d1625f..cf9d1d2 100644 --- a/doc/public/html/cairo.devhelp +++ b/doc/public/html/cairo.devhelp @@ -119,8 +119,8 @@ <function name="cairo_get_reference_count ()" link="cairo-cairo-t.html#cairo-get-reference-count"/> <function name="cairo_set_user_data ()" link="cairo-cairo-t.html#cairo-set-user-data"/> <function name="cairo_get_user_data ()" link="cairo-cairo-t.html#cairo-get-user-data"/> - <function name="" link="cairo-cairo-t.html#id2638979"/> - <function name="" link="cairo-cairo-t.html#id2638980"/> + <function name="" link="cairo-cairo-t.html#id2639083"/> + <function name="" link="cairo-cairo-t.html#id2639084"/> <function name="cairo_path_t" link="cairo-Paths.html#cairo-path-t"/> <function name="union cairo_path_data_t" link="cairo-Paths.html#cairo-path-data-t"/> <function name="enum cairo_path_data_type_t" link="cairo-Paths.html#cairo-path-data-type-t"/> @@ -143,8 +143,8 @@ <function name="cairo_rel_curve_to ()" link="cairo-Paths.html#cairo-rel-curve-to"/> <function name="cairo_rel_line_to ()" link="cairo-Paths.html#cairo-rel-line-to"/> <function name="cairo_rel_move_to ()" link="cairo-Paths.html#cairo-rel-move-to"/> - <function name="" link="cairo-Paths.html#id2581754"/> - <function name="" link="cairo-Paths.html#id2581755"/> + <function name="" link="cairo-Paths.html#id2581700"/> + <function name="" link="cairo-Paths.html#id2581701"/> <function name="cairo_pattern_t" link="cairo-Patterns.html#cairo-pattern-t"/> <function name="cairo_pattern_add_color_stop_rgb ()" link="cairo-Patterns.html#cairo-pattern-add-color-stop-rgb"/> <function name="cairo_pattern_add_color_stop_rgba ()" link="cairo-Patterns.html#cairo-pattern-add-color-stop-rgba"/> @@ -175,8 +175,8 @@ <function name="cairo_pattern_get_reference_count ()" link="cairo-Patterns.html#cairo-pattern-get-reference-count"/> <function name="cairo_pattern_set_user_data ()" link="cairo-Patterns.html#cairo-pattern-set-user-data"/> <function name="cairo_pattern_get_user_data ()" link="cairo-Patterns.html#cairo-pattern-get-user-data"/> - <function name="" link="cairo-Patterns.html#id2645107"/> - <function name="" link="cairo-Patterns.html#id2645108"/> + <function name="" link="cairo-Patterns.html#id2645152"/> + <function name="" link="cairo-Patterns.html#id2645153"/> <function name="cairo_translate ()" link="cairo-Transformations.html#cairo-translate"/> <function name="cairo_scale ()" link="cairo-Transformations.html#cairo-scale"/> <function name="cairo_rotate ()" link="cairo-Transformations.html#cairo-rotate"/> @@ -188,8 +188,8 @@ <function name="cairo_user_to_device_distance ()" link="cairo-Transformations.html#cairo-user-to-device-distance"/> <function name="cairo_device_to_user ()" link="cairo-Transformations.html#cairo-device-to-user"/> <function name="cairo_device_to_user_distance ()" link="cairo-Transformations.html#cairo-device-to-user-distance"/> - <function name="" link="cairo-Transformations.html#id2628818"/> - <function name="" link="cairo-Transformations.html#id2628819"/> + <function name="" link="cairo-Transformations.html#id2628282"/> + <function name="" link="cairo-Transformations.html#id2628283"/> <function name="cairo_glyph_t" link="cairo-Text.html#cairo-glyph-t"/> <function name="enum cairo_font_slant_t" link="cairo-Text.html#cairo-font-slant-t"/> <function name="enum cairo_font_weight_t" link="cairo-Text.html#cairo-font-weight-t"/> @@ -208,8 +208,8 @@ <function name="cairo_font_extents ()" link="cairo-Text.html#cairo-font-extents"/> <function name="cairo_text_extents ()" link="cairo-Text.html#cairo-text-extents"/> <function name="cairo_glyph_extents ()" link="cairo-Text.html#cairo-glyph-extents"/> - <function name="" link="cairo-Text.html#id2646660"/> - <function name="" link="cairo-Text.html#id2646661"/> + <function name="" link="cairo-Text.html#id2646738"/> + <function name="" link="cairo-Text.html#id2646739"/> <function name="cairo_font_face_t" link="cairo-cairo-font-face-t.html#cairo-font-face-t"/> <function name="cairo_font_face_reference ()" link="cairo-cairo-font-face-t.html#cairo-font-face-reference"/> <function name="cairo_font_face_destroy ()" link="cairo-cairo-font-face-t.html#cairo-font-face-destroy"/> @@ -219,8 +219,8 @@ <function name="cairo_font_face_get_reference_count ()" link="cairo-cairo-font-face-t.html#cairo-font-face-get-reference-count"/> <function name="cairo_font_face_set_user_data ()" link="cairo-cairo-font-face-t.html#cairo-font-face-set-user-data"/> <function name="cairo_font_face_get_user_data ()" link="cairo-cairo-font-face-t.html#cairo-font-face-get-user-data"/> - <function name="" link="cairo-cairo-font-face-t.html#id2646966"/> - <function name="" link="cairo-cairo-font-face-t.html#id2646967"/> + <function name="" link="cairo-cairo-font-face-t.html#id2594368"/> + <function name="" link="cairo-cairo-font-face-t.html#id2594369"/> <function name="cairo_scaled_font_t" link="cairo-Scaled-Fonts.html#cairo-scaled-font-t"/> <function name="cairo_scaled_font_create ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-create"/> <function name="cairo_scaled_font_reference ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-reference"/> @@ -239,8 +239,8 @@ <function name="cairo_scaled_font_get_reference_count ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-get-reference-count"/> <function name="cairo_scaled_font_set_user_data ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-set-user-data"/> <function name="cairo_scaled_font_get_user_data ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-get-user-data"/> - <function name="" link="cairo-Scaled-Fonts.html#id2651479"/> - <function name="" link="cairo-Scaled-Fonts.html#id2651480"/> + <function name="" link="cairo-Scaled-Fonts.html#id2651562"/> + <function name="" link="cairo-Scaled-Fonts.html#id2651563"/> <function name="cairo_font_options_t" link="cairo-Font-Options.html#cairo-font-options-t"/> <function name="cairo_font_options_create ()" link="cairo-Font-Options.html#cairo-font-options-create"/> <function name="cairo_font_options_copy ()" link="cairo-Font-Options.html#cairo-font-options-copy"/> @@ -260,15 +260,15 @@ <function name="enum cairo_hint_metrics_t" link="cairo-Font-Options.html#cairo-hint-metrics-t"/> <function name="cairo_font_options_set_hint_metrics ()" link="cairo-Font-Options.html#cairo-font-options-set-hint-metrics"/> <function name="cairo_font_options_get_hint_metrics ()" link="cairo-Font-Options.html#cairo-font-options-get-hint-metrics"/> - <function name="" link="cairo-Font-Options.html#id2653597"/> - <function name="" link="cairo-Font-Options.html#id2653598"/> + <function name="" link="cairo-Font-Options.html#id2653670"/> + <function name="" link="cairo-Font-Options.html#id2653671"/> <function name="cairo_ft_font_face_create_for_ft_face ()" link="cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-ft-face"/> <function name="cairo_ft_font_face_create_for_pattern ()" link="cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-pattern"/> <function name="cairo_ft_font_options_substitute ()" link="cairo-FreeType-Fonts.html#cairo-ft-font-options-substitute"/> <function name="cairo_ft_scaled_font_lock_face ()" link="cairo-FreeType-Fonts.html#cairo-ft-scaled-font-lock-face"/> <function name="cairo_ft_scaled_font_unlock_face ()" link="cairo-FreeType-Fonts.html#cairo-ft-scaled-font-unlock-face"/> - <function name="" link="cairo-FreeType-Fonts.html#id2647225"/> - <function name="" link="cairo-FreeType-Fonts.html#id2647226"/> + <function name="" link="cairo-FreeType-Fonts.html#id2649040"/> + <function name="" link="cairo-FreeType-Fonts.html#id2649041"/> <function name="cairo_win32_font_face_create_for_logfontw ()" link="cairo-Win32-Fonts.html#cairo-win32-font-face-create-for-logfontw"/> <function name="cairo_win32_font_face_create_for_hfont ()" link="cairo-Win32-Fonts.html#cairo-win32-font-face-create-for-hfont"/> <function name="cairo_win32_font_face_create_for_logfontw_hfont ()" link="cairo-Win32-Fonts.html#cairo-win32-font-face-create-for-logfontw-hfont"/> @@ -277,8 +277,8 @@ <function name="cairo_win32_scaled_font_get_metrics_factor ()" link="cairo-Win32-Fonts.html#cairo-win32-scaled-font-get-metrics-factor"/> <function name="cairo_win32_scaled_font_get_logical_to_device ()" link="cairo-Win32-Fonts.html#cairo-win32-scaled-font-get-logical-to-device"/> <function name="cairo_win32_scaled_font_get_device_to_logical ()" link="cairo-Win32-Fonts.html#cairo-win32-scaled-font-get-device-to-logical"/> - <function name="" link="cairo-Win32-Fonts.html#id2648946"/> - <function name="" link="cairo-Win32-Fonts.html#id2648948"/> + <function name="" link="cairo-Win32-Fonts.html#id2648269"/> + <function name="" link="cairo-Win32-Fonts.html#id2648270"/> <function name="cairo_surface_t" link="cairo-cairo-surface-t.html#cairo-surface-t"/> <function name="enum cairo_content_t" link="cairo-cairo-surface-t.html#cairo-content-t"/> <function name="cairo_surface_create_similar ()" link="cairo-cairo-surface-t.html#cairo-surface-create-similar"/> @@ -301,8 +301,8 @@ <function name="cairo_surface_get_user_data ()" link="cairo-cairo-surface-t.html#cairo-surface-get-user-data"/> <function name="cairo_surface_copy_page ()" link="cairo-cairo-surface-t.html#cairo-surface-copy-page"/> <function name="cairo_surface_show_page ()" link="cairo-cairo-surface-t.html#cairo-surface-show-page"/> - <function name="" link="cairo-cairo-surface-t.html#id2661245"/> - <function name="" link="cairo-cairo-surface-t.html#id2661246"/> + <function name="" link="cairo-cairo-surface-t.html#id2661115"/> + <function name="" link="cairo-cairo-surface-t.html#id2661116"/> <function name="enum cairo_format_t" link="cairo-Image-Surfaces.html#cairo-format-t"/> <function name="cairo_image_surface_create ()" link="cairo-Image-Surfaces.html#cairo-image-surface-create"/> <function name="cairo_image_surface_create_for_data ()" link="cairo-Image-Surfaces.html#cairo-image-surface-create-for-data"/> @@ -311,21 +311,21 @@ <function name="cairo_image_surface_get_width ()" link="cairo-Image-Surfaces.html#cairo-image-surface-get-width"/> <function name="cairo_image_surface_get_height ()" link="cairo-Image-Surfaces.html#cairo-image-surface-get-height"/> <function name="cairo_image_surface_get_stride ()" link="cairo-Image-Surfaces.html#cairo-image-surface-get-stride"/> - <function name="" link="cairo-Image-Surfaces.html#id2658482"/> - <function name="" link="cairo-Image-Surfaces.html#id2658483"/> + <function name="" link="cairo-Image-Surfaces.html#id2656586"/> + <function name="" link="cairo-Image-Surfaces.html#id2656587"/> <function name="cairo_pdf_surface_create ()" link="cairo-PDF-Surfaces.html#cairo-pdf-surface-create"/> <function name="cairo_pdf_surface_create_for_stream ()" link="cairo-PDF-Surfaces.html#cairo-pdf-surface-create-for-stream"/> <function name="cairo_pdf_surface_set_size ()" link="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-size"/> - <function name="" link="cairo-PDF-Surfaces.html#id2657859"/> - <function name="" link="cairo-PDF-Surfaces.html#id2657860"/> + <function name="" link="cairo-PDF-Surfaces.html#id2657946"/> + <function name="" link="cairo-PDF-Surfaces.html#id2657947"/> <function name="cairo_image_surface_create_from_png ()" link="cairo-PNG-Support.html#cairo-image-surface-create-from-png"/> <function name="cairo_read_func_t ()" link="cairo-PNG-Support.html#cairo-read-func-t"/> <function name="cairo_image_surface_create_from_png_stream ()" link="cairo-PNG-Support.html#cairo-image-surface-create-from-png-stream"/> <function name="cairo_surface_write_to_png ()" link="cairo-PNG-Support.html#cairo-surface-write-to-png"/> <function name="cairo_write_func_t ()" link="cairo-PNG-Support.html#cairo-write-func-t"/> <function name="cairo_surface_write_to_png_stream ()" link="cairo-PNG-Support.html#cairo-surface-write-to-png-stream"/> - <function name="" link="cairo-PNG-Support.html#id2657135"/> - <function name="" link="cairo-PNG-Support.html#id2657136"/> + <function name="" link="cairo-PNG-Support.html#id2654697"/> + <function name="" link="cairo-PNG-Support.html#id2654698"/> <function name="cairo_ps_surface_create ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-create"/> <function name="cairo_ps_surface_create_for_stream ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-create-for-stream"/> <function name="cairo_ps_surface_restrict_to_level ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-restrict-to-level"/> @@ -338,24 +338,24 @@ <function name="cairo_ps_surface_dsc_begin_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-setup"/> <function name="cairo_ps_surface_dsc_begin_page_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-page-setup"/> <function name="cairo_ps_surface_dsc_comment ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment"/> - <function name="" link="cairo-PostScript-Surfaces.html#id2665132"/> - <function name="" link="cairo-PostScript-Surfaces.html#id2665134"/> + <function name="" link="cairo-PostScript-Surfaces.html#id2665202"/> + <function name="" link="cairo-PostScript-Surfaces.html#id2665203"/> <function name="cairo_win32_surface_create ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create"/> <function name="cairo_win32_surface_create_with_dib ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-dib"/> <function name="cairo_win32_surface_create_with_ddb ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-ddb"/> <function name="cairo_win32_printing_surface_create ()" link="cairo-Win32-Surfaces.html#cairo-win32-printing-surface-create"/> <function name="cairo_win32_surface_get_dc ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-get-dc"/> <function name="cairo_win32_surface_get_image ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-get-image"/> - <function name="" link="cairo-Win32-Surfaces.html#id2655152"/> - <function name="" link="cairo-Win32-Surfaces.html#id2655154"/> + <function name="" link="cairo-Win32-Surfaces.html#id2663542"/> + <function name="" link="cairo-Win32-Surfaces.html#id2663543"/> <function name="cairo_svg_surface_create ()" link="cairo-SVG-Surfaces.html#cairo-svg-surface-create"/> <function name="cairo_svg_surface_create_for_stream ()" link="cairo-SVG-Surfaces.html#cairo-svg-surface-create-for-stream"/> <function name="cairo_svg_surface_restrict_to_version ()" link="cairo-SVG-Surfaces.html#cairo-svg-surface-restrict-to-version"/> <function name="enum cairo_svg_version_t" link="cairo-SVG-Surfaces.html#cairo-svg-version-t"/> <function name="cairo_svg_get_versions ()" link="cairo-SVG-Surfaces.html#cairo-svg-get-versions"/> <function name="cairo_svg_version_to_string ()" link="cairo-SVG-Surfaces.html#cairo-svg-version-to-string"/> - <function name="" link="cairo-SVG-Surfaces.html#id2661694"/> - <function name="" link="cairo-SVG-Surfaces.html#id2661695"/> + <function name="" link="cairo-SVG-Surfaces.html#id2661558"/> + <function name="" link="cairo-SVG-Surfaces.html#id2661560"/> <function name="cairo_xlib_surface_create ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-create"/> <function name="cairo_xlib_surface_create_for_bitmap ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-create-for-bitmap"/> <function name="cairo_xlib_surface_set_size ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-set-size"/> @@ -367,8 +367,8 @@ <function name="cairo_xlib_surface_get_width ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-width"/> <function name="cairo_xlib_surface_get_height ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-height"/> <function name="cairo_xlib_surface_get_depth ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-depth"/> - <function name="" link="cairo-XLib-Surfaces.html#id2668140"/> - <function name="" link="cairo-XLib-Surfaces.html#id2668141"/> + <function name="" link="cairo-XLib-Surfaces.html#id2668198"/> + <function name="" link="cairo-XLib-Surfaces.html#id2668199"/> <function name="cairo_matrix_t" link="cairo-cairo-matrix-t.html#cairo-matrix-t"/> <function name="cairo_matrix_init ()" link="cairo-cairo-matrix-t.html#cairo-matrix-init"/> <function name="cairo_matrix_init_identity ()" link="cairo-cairo-matrix-t.html#cairo-matrix-init-identity"/> @@ -382,15 +382,15 @@ <function name="cairo_matrix_multiply ()" link="cairo-cairo-matrix-t.html#cairo-matrix-multiply"/> <function name="cairo_matrix_transform_distance ()" link="cairo-cairo-matrix-t.html#cairo-matrix-transform-distance"/> <function name="cairo_matrix_transform_point ()" link="cairo-cairo-matrix-t.html#cairo-matrix-transform-point"/> - <function name="" link="cairo-cairo-matrix-t.html#id2671602"/> - <function name="" link="cairo-cairo-matrix-t.html#id2671603"/> - <function name="enum cairo_status_t" link="cairo-Error-Handling.html#cairo-status-t"/> + <function name="" link="cairo-cairo-matrix-t.html#id2671665"/> + <function name="" link="cairo-cairo-matrix-t.html#id2671666"/> + <function name="cairo_status_t ()" link="cairo-Error-Handling.html#cairo-status-t"/> <function name="cairo_status_to_string ()" link="cairo-Error-Handling.html#cairo-status-to-string"/> <function name="cairo_debug_reset_static_data ()" link="cairo-Error-Handling.html#cairo-debug-reset-static-data"/> - <function name="" link="cairo-Error-Handling.html#id2662533"/> - <function name="" link="cairo-Error-Handling.html#id2662534"/> - <function name="Compatibility" link="cairo-Version-Information.html#id2669986"/> - <function name="Examining the version" link="cairo-Version-Information.html#id2670025"/> + <function name="" link="cairo-Error-Handling.html#id2665646"/> + <function name="" link="cairo-Error-Handling.html#id2665647"/> + <function name="Compatibility" link="cairo-Version-Information.html#id2666698"/> + <function name="Examining the version" link="cairo-Version-Information.html#id2666737"/> <function name="CAIRO_VERSION" link="cairo-Version-Information.html#CAIRO-VERSION:CAPS"/> <function name="CAIRO_VERSION_MAJOR" link="cairo-Version-Information.html#CAIRO-VERSION-MAJOR:CAPS"/> <function name="CAIRO_VERSION_MINOR" link="cairo-Version-Information.html#CAIRO-VERSION-MINOR:CAPS"/> @@ -399,12 +399,12 @@ <function name="CAIRO_VERSION_ENCODE()" link="cairo-Version-Information.html#CAIRO-VERSION-ENCODE:CAPS"/> <function name="cairo_version ()" link="cairo-Version-Information.html#cairo-version"/> <function name="cairo_version_string ()" link="cairo-Version-Information.html#cairo-version-string"/> - <function name="" link="cairo-Version-Information.html#id2666808"/> - <function name="" link="cairo-Version-Information.html#id2666809"/> + <function name="" link="cairo-Version-Information.html#id2669653"/> + <function name="" link="cairo-Version-Information.html#id2669654"/> <function name="cairo_bool_t" link="cairo-Types.html#cairo-bool-t"/> <function name="cairo_user_data_key_t" link="cairo-Types.html#cairo-user-data-key-t"/> <function name="cairo_destroy_func_t ()" link="cairo-Types.html#cairo-destroy-func-t"/> - <function name="" link="cairo-Types.html#id2669682"/> - <function name="" link="cairo-Types.html#id2669683"/> + <function name="" link="cairo-Types.html#id2669894"/> + <function name="" link="cairo-Types.html#id2669895"/> </functions> </book> diff --git a/doc/public/html/cairo.devhelp2 b/doc/public/html/cairo.devhelp2 index a4e7c4f..0715daa 100644 --- a/doc/public/html/cairo.devhelp2 +++ b/doc/public/html/cairo.devhelp2 @@ -119,8 +119,8 @@ <keyword type="function" name="cairo_get_reference_count ()" link="cairo-cairo-t.html#cairo-get-reference-count" since="1.4"/> <keyword type="function" name="cairo_set_user_data ()" link="cairo-cairo-t.html#cairo-set-user-data" since="1.4"/> <keyword type="function" name="cairo_get_user_data ()" link="cairo-cairo-t.html#cairo-get-user-data" since="1.4"/> - <keyword type="" name="" link="cairo-cairo-t.html#id2638979"/> - <keyword type="" name="" link="cairo-cairo-t.html#id2638980"/> + <keyword type="" name="" link="cairo-cairo-t.html#id2639083"/> + <keyword type="" name="" link="cairo-cairo-t.html#id2639084"/> <keyword type="struct" name="cairo_path_t" link="cairo-Paths.html#cairo-path-t"/> <keyword type="union" name="union cairo_path_data_t" link="cairo-Paths.html#cairo-path-data-t"/> <keyword type="enum" name="enum cairo_path_data_type_t" link="cairo-Paths.html#cairo-path-data-type-t"/> @@ -143,8 +143,8 @@ <keyword type="function" name="cairo_rel_curve_to ()" link="cairo-Paths.html#cairo-rel-curve-to"/> <keyword type="function" name="cairo_rel_line_to ()" link="cairo-Paths.html#cairo-rel-line-to"/> <keyword type="function" name="cairo_rel_move_to ()" link="cairo-Paths.html#cairo-rel-move-to"/> - <keyword type="" name="" link="cairo-Paths.html#id2581754"/> - <keyword type="" name="" link="cairo-Paths.html#id2581755"/> + <keyword type="" name="" link="cairo-Paths.html#id2581700"/> + <keyword type="" name="" link="cairo-Paths.html#id2581701"/> <keyword type="typedef" name="cairo_pattern_t" link="cairo-Patterns.html#cairo-pattern-t"/> <keyword type="function" name="cairo_pattern_add_color_stop_rgb ()" link="cairo-Patterns.html#cairo-pattern-add-color-stop-rgb"/> <keyword type="function" name="cairo_pattern_add_color_stop_rgba ()" link="cairo-Patterns.html#cairo-pattern-add-color-stop-rgba"/> @@ -175,8 +175,8 @@ <keyword type="function" name="cairo_pattern_get_reference_count ()" link="cairo-Patterns.html#cairo-pattern-get-reference-count" since="1.4"/> <keyword type="function" name="cairo_pattern_set_user_data ()" link="cairo-Patterns.html#cairo-pattern-set-user-data" since="1.4"/> <keyword type="function" name="cairo_pattern_get_user_data ()" link="cairo-Patterns.html#cairo-pattern-get-user-data" since="1.4"/> - <keyword type="" name="" link="cairo-Patterns.html#id2645107"/> - <keyword type="" name="" link="cairo-Patterns.html#id2645108"/> + <keyword type="" name="" link="cairo-Patterns.html#id2645152"/> + <keyword type="" name="" link="cairo-Patterns.html#id2645153"/> <keyword type="function" name="cairo_translate ()" link="cairo-Transformations.html#cairo-translate"/> <keyword type="function" name="cairo_scale ()" link="cairo-Transformations.html#cairo-scale"/> <keyword type="function" name="cairo_rotate ()" link="cairo-Transformations.html#cairo-rotate"/> @@ -188,8 +188,8 @@ <keyword type="function" name="cairo_user_to_device_distance ()" link="cairo-Transformations.html#cairo-user-to-device-distance"/> <keyword type="function" name="cairo_device_to_user ()" link="cairo-Transformations.html#cairo-device-to-user"/> <keyword type="function" name="cairo_device_to_user_distance ()" link="cairo-Transformations.html#cairo-device-to-user-distance"/> - <keyword type="" name="" link="cairo-Transformations.html#id2628818"/> - <keyword type="" name="" link="cairo-Transformations.html#id2628819"/> + <keyword type="" name="" link="cairo-Transformations.html#id2628282"/> + <keyword type="" name="" link="cairo-Transformations.html#id2628283"/> <keyword type="struct" name="cairo_glyph_t" link="cairo-Text.html#cairo-glyph-t"/> <keyword type="enum" name="enum cairo_font_slant_t" link="cairo-Text.html#cairo-font-slant-t"/> <keyword type="enum" name="enum cairo_font_weight_t" link="cairo-Text.html#cairo-font-weight-t"/> @@ -208,8 +208,8 @@ <keyword type="function" name="cairo_font_extents ()" link="cairo-Text.html#cairo-font-extents"/> <keyword type="function" name="cairo_text_extents ()" link="cairo-Text.html#cairo-text-extents"/> <keyword type="function" name="cairo_glyph_extents ()" link="cairo-Text.html#cairo-glyph-extents"/> - <keyword type="" name="" link="cairo-Text.html#id2646660"/> - <keyword type="" name="" link="cairo-Text.html#id2646661"/> + <keyword type="" name="" link="cairo-Text.html#id2646738"/> + <keyword type="" name="" link="cairo-Text.html#id2646739"/> <keyword type="typedef" name="cairo_font_face_t" link="cairo-cairo-font-face-t.html#cairo-font-face-t"/> <keyword type="function" name="cairo_font_face_reference ()" link="cairo-cairo-font-face-t.html#cairo-font-face-reference"/> <keyword type="function" name="cairo_font_face_destroy ()" link="cairo-cairo-font-face-t.html#cairo-font-face-destroy"/> @@ -219,8 +219,8 @@ <keyword type="function" name="cairo_font_face_get_reference_count ()" link="cairo-cairo-font-face-t.html#cairo-font-face-get-reference-count" since="1.4"/> <keyword type="function" name="cairo_font_face_set_user_data ()" link="cairo-cairo-font-face-t.html#cairo-font-face-set-user-data"/> <keyword type="function" name="cairo_font_face_get_user_data ()" link="cairo-cairo-font-face-t.html#cairo-font-face-get-user-data"/> - <keyword type="" name="" link="cairo-cairo-font-face-t.html#id2646966"/> - <keyword type="" name="" link="cairo-cairo-font-face-t.html#id2646967"/> + <keyword type="" name="" link="cairo-cairo-font-face-t.html#id2594368"/> + <keyword type="" name="" link="cairo-cairo-font-face-t.html#id2594369"/> <keyword type="typedef" name="cairo_scaled_font_t" link="cairo-Scaled-Fonts.html#cairo-scaled-font-t"/> <keyword type="function" name="cairo_scaled_font_create ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-create"/> <keyword type="function" name="cairo_scaled_font_reference ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-reference"/> @@ -239,8 +239,8 @@ <keyword type="function" name="cairo_scaled_font_get_reference_count ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-get-reference-count" since="1.4"/> <keyword type="function" name="cairo_scaled_font_set_user_data ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-set-user-data" since="1.4"/> <keyword type="function" name="cairo_scaled_font_get_user_data ()" link="cairo-Scaled-Fonts.html#cairo-scaled-font-get-user-data" since="1.4"/> - <keyword type="" name="" link="cairo-Scaled-Fonts.html#id2651479"/> - <keyword type="" name="" link="cairo-Scaled-Fonts.html#id2651480"/> + <keyword type="" name="" link="cairo-Scaled-Fonts.html#id2651562"/> + <keyword type="" name="" link="cairo-Scaled-Fonts.html#id2651563"/> <keyword type="typedef" name="cairo_font_options_t" link="cairo-Font-Options.html#cairo-font-options-t"/> <keyword type="function" name="cairo_font_options_create ()" link="cairo-Font-Options.html#cairo-font-options-create"/> <keyword type="function" name="cairo_font_options_copy ()" link="cairo-Font-Options.html#cairo-font-options-copy"/> @@ -260,15 +260,15 @@ <keyword type="enum" name="enum cairo_hint_metrics_t" link="cairo-Font-Options.html#cairo-hint-metrics-t"/> <keyword type="function" name="cairo_font_options_set_hint_metrics ()" link="cairo-Font-Options.html#cairo-font-options-set-hint-metrics"/> <keyword type="function" name="cairo_font_options_get_hint_metrics ()" link="cairo-Font-Options.html#cairo-font-options-get-hint-metrics"/> - <keyword type="" name="" link="cairo-Font-Options.html#id2653597"/> - <keyword type="" name="" link="cairo-Font-Options.html#id2653598"/> + <keyword type="" name="" link="cairo-Font-Options.html#id2653670"/> + <keyword type="" name="" link="cairo-Font-Options.html#id2653671"/> <keyword type="function" name="cairo_ft_font_face_create_for_ft_face ()" link="cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-ft-face"/> <keyword type="function" name="cairo_ft_font_face_create_for_pattern ()" link="cairo-FreeType-Fonts.html#cairo-ft-font-face-create-for-pattern"/> <keyword type="function" name="cairo_ft_font_options_substitute ()" link="cairo-FreeType-Fonts.html#cairo-ft-font-options-substitute"/> <keyword type="function" name="cairo_ft_scaled_font_lock_face ()" link="cairo-FreeType-Fonts.html#cairo-ft-scaled-font-lock-face"/> <keyword type="function" name="cairo_ft_scaled_font_unlock_face ()" link="cairo-FreeType-Fonts.html#cairo-ft-scaled-font-unlock-face"/> - <keyword type="" name="" link="cairo-FreeType-Fonts.html#id2647225"/> - <keyword type="" name="" link="cairo-FreeType-Fonts.html#id2647226"/> + <keyword type="" name="" link="cairo-FreeType-Fonts.html#id2649040"/> + <keyword type="" name="" link="cairo-FreeType-Fonts.html#id2649041"/> <keyword type="function" name="cairo_win32_font_face_create_for_logfontw ()" link="cairo-Win32-Fonts.html#cairo-win32-font-face-create-for-logfontw"/> <keyword type="function" name="cairo_win32_font_face_create_for_hfont ()" link="cairo-Win32-Fonts.html#cairo-win32-font-face-create-for-hfont"/> <keyword type="function" name="cairo_win32_font_face_create_for_logfontw_hfont ()" link="cairo-Win32-Fonts.html#cairo-win32-font-face-create-for-logfontw-hfont"/> @@ -277,8 +277,8 @@ <keyword type="function" name="cairo_win32_scaled_font_get_metrics_factor ()" link="cairo-Win32-Fonts.html#cairo-win32-scaled-font-get-metrics-factor"/> <keyword type="function" name="cairo_win32_scaled_font_get_logical_to_device ()" link="cairo-Win32-Fonts.html#cairo-win32-scaled-font-get-logical-to-device" since="1.4"/> <keyword type="function" name="cairo_win32_scaled_font_get_device_to_logical ()" link="cairo-Win32-Fonts.html#cairo-win32-scaled-font-get-device-to-logical" since="1.4"/> - <keyword type="" name="" link="cairo-Win32-Fonts.html#id2648946"/> - <keyword type="" name="" link="cairo-Win32-Fonts.html#id2648948"/> + <keyword type="" name="" link="cairo-Win32-Fonts.html#id2648269"/> + <keyword type="" name="" link="cairo-Win32-Fonts.html#id2648270"/> <keyword type="typedef" name="cairo_surface_t" link="cairo-cairo-surface-t.html#cairo-surface-t"/> <keyword type="enum" name="enum cairo_content_t" link="cairo-cairo-surface-t.html#cairo-content-t"/> <keyword type="function" name="cairo_surface_create_similar ()" link="cairo-cairo-surface-t.html#cairo-surface-create-similar"/> @@ -301,8 +301,8 @@ <keyword type="function" name="cairo_surface_get_user_data ()" link="cairo-cairo-surface-t.html#cairo-surface-get-user-data"/> <keyword type="function" name="cairo_surface_copy_page ()" link="cairo-cairo-surface-t.html#cairo-surface-copy-page" since="1.6"/> <keyword type="function" name="cairo_surface_show_page ()" link="cairo-cairo-surface-t.html#cairo-surface-show-page" since="1.6"/> - <keyword type="" name="" link="cairo-cairo-surface-t.html#id2661245"/> - <keyword type="" name="" link="cairo-cairo-surface-t.html#id2661246"/> + <keyword type="" name="" link="cairo-cairo-surface-t.html#id2661115"/> + <keyword type="" name="" link="cairo-cairo-surface-t.html#id2661116"/> <keyword type="enum" name="enum cairo_format_t" link="cairo-Image-Surfaces.html#cairo-format-t"/> <keyword type="function" name="cairo_image_surface_create ()" link="cairo-Image-Surfaces.html#cairo-image-surface-create"/> <keyword type="function" name="cairo_image_surface_create_for_data ()" link="cairo-Image-Surfaces.html#cairo-image-surface-create-for-data"/> @@ -311,21 +311,21 @@ <keyword type="function" name="cairo_image_surface_get_width ()" link="cairo-Image-Surfaces.html#cairo-image-surface-get-width"/> <keyword type="function" name="cairo_image_surface_get_height ()" link="cairo-Image-Surfaces.html#cairo-image-surface-get-height"/> <keyword type="function" name="cairo_image_surface_get_stride ()" link="cairo-Image-Surfaces.html#cairo-image-surface-get-stride" since="1.2"/> - <keyword type="" name="" link="cairo-Image-Surfaces.html#id2658482"/> - <keyword type="" name="" link="cairo-Image-Surfaces.html#id2658483"/> + <keyword type="" name="" link="cairo-Image-Surfaces.html#id2656586"/> + <keyword type="" name="" link="cairo-Image-Surfaces.html#id2656587"/> <keyword type="function" name="cairo_pdf_surface_create ()" link="cairo-PDF-Surfaces.html#cairo-pdf-surface-create" since="1.2"/> <keyword type="function" name="cairo_pdf_surface_create_for_stream ()" link="cairo-PDF-Surfaces.html#cairo-pdf-surface-create-for-stream" since="1.2"/> <keyword type="function" name="cairo_pdf_surface_set_size ()" link="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-size" since="1.2"/> - <keyword type="" name="" link="cairo-PDF-Surfaces.html#id2657859"/> - <keyword type="" name="" link="cairo-PDF-Surfaces.html#id2657860"/> + <keyword type="" name="" link="cairo-PDF-Surfaces.html#id2657946"/> + <keyword type="" name="" link="cairo-PDF-Surfaces.html#id2657947"/> <keyword type="function" name="cairo_image_surface_create_from_png ()" link="cairo-PNG-Support.html#cairo-image-surface-create-from-png"/> <keyword type="function" name="cairo_read_func_t ()" link="cairo-PNG-Support.html#cairo-read-func-t"/> <keyword type="function" name="cairo_image_surface_create_from_png_stream ()" link="cairo-PNG-Support.html#cairo-image-surface-create-from-png-stream"/> <keyword type="function" name="cairo_surface_write_to_png ()" link="cairo-PNG-Support.html#cairo-surface-write-to-png"/> <keyword type="function" name="cairo_write_func_t ()" link="cairo-PNG-Support.html#cairo-write-func-t"/> <keyword type="function" name="cairo_surface_write_to_png_stream ()" link="cairo-PNG-Support.html#cairo-surface-write-to-png-stream"/> - <keyword type="" name="" link="cairo-PNG-Support.html#id2657135"/> - <keyword type="" name="" link="cairo-PNG-Support.html#id2657136"/> + <keyword type="" name="" link="cairo-PNG-Support.html#id2654697"/> + <keyword type="" name="" link="cairo-PNG-Support.html#id2654698"/> <keyword type="function" name="cairo_ps_surface_create ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-create" since="1.2"/> <keyword type="function" name="cairo_ps_surface_create_for_stream ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-create-for-stream" since="1.2"/> <keyword type="function" name="cairo_ps_surface_restrict_to_level ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-restrict-to-level" since="1.6"/> @@ -338,24 +338,24 @@ <keyword type="function" name="cairo_ps_surface_dsc_begin_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-setup" since="1.2"/> <keyword type="function" name="cairo_ps_surface_dsc_begin_page_setup ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-begin-page-setup" since="1.2"/> <keyword type="function" name="cairo_ps_surface_dsc_comment ()" link="cairo-PostScript-Surfaces.html#cairo-ps-surface-dsc-comment" since="1.2"/> - <keyword type="" name="" link="cairo-PostScript-Surfaces.html#id2665132"/> - <keyword type="" name="" link="cairo-PostScript-Surfaces.html#id2665134"/> + <keyword type="" name="" link="cairo-PostScript-Surfaces.html#id2665202"/> + <keyword type="" name="" link="cairo-PostScript-Surfaces.html#id2665203"/> <keyword type="function" name="cairo_win32_surface_create ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create"/> <keyword type="function" name="cairo_win32_surface_create_with_dib ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-dib" since="1.2"/> <keyword type="function" name="cairo_win32_surface_create_with_ddb ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-create-with-ddb" since="1.4"/> <keyword type="function" name="cairo_win32_printing_surface_create ()" link="cairo-Win32-Surfaces.html#cairo-win32-printing-surface-create"/> <keyword type="function" name="cairo_win32_surface_get_dc ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-get-dc" since="1.2"/> <keyword type="function" name="cairo_win32_surface_get_image ()" link="cairo-Win32-Surfaces.html#cairo-win32-surface-get-image" since="1.4"/> - <keyword type="" name="" link="cairo-Win32-Surfaces.html#id2655152"/> - <keyword type="" name="" link="cairo-Win32-Surfaces.html#id2655154"/> + <keyword type="" name="" link="cairo-Win32-Surfaces.html#id2663542"/> + <keyword type="" name="" link="cairo-Win32-Surfaces.html#id2663543"/> <keyword type="function" name="cairo_svg_surface_create ()" link="cairo-SVG-Surfaces.html#cairo-svg-surface-create" since="1.2"/> <keyword type="function" name="cairo_svg_surface_create_for_stream ()" link="cairo-SVG-Surfaces.html#cairo-svg-surface-create-for-stream" since="1.2"/> <keyword type="function" name="cairo_svg_surface_restrict_to_version ()" link="cairo-SVG-Surfaces.html#cairo-svg-surface-restrict-to-version" since="1.2"/> <keyword type="enum" name="enum cairo_svg_version_t" link="cairo-SVG-Surfaces.html#cairo-svg-version-t"/> <keyword type="function" name="cairo_svg_get_versions ()" link="cairo-SVG-Surfaces.html#cairo-svg-get-versions" since="1.2"/> <keyword type="function" name="cairo_svg_version_to_string ()" link="cairo-SVG-Surfaces.html#cairo-svg-version-to-string" since="1.2"/> - <keyword type="" name="" link="cairo-SVG-Surfaces.html#id2661694"/> - <keyword type="" name="" link="cairo-SVG-Surfaces.html#id2661695"/> + <keyword type="" name="" link="cairo-SVG-Surfaces.html#id2661558"/> + <keyword type="" name="" link="cairo-SVG-Surfaces.html#id2661560"/> <keyword type="function" name="cairo_xlib_surface_create ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-create"/> <keyword type="function" name="cairo_xlib_surface_create_for_bitmap ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-create-for-bitmap"/> <keyword type="function" name="cairo_xlib_surface_set_size ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-set-size"/> @@ -367,8 +367,8 @@ <keyword type="function" name="cairo_xlib_surface_get_width ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-width" since="1.2"/> <keyword type="function" name="cairo_xlib_surface_get_height ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-height" since="1.2"/> <keyword type="function" name="cairo_xlib_surface_get_depth ()" link="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-depth" since="1.2"/> - <keyword type="" name="" link="cairo-XLib-Surfaces.html#id2668140"/> - <keyword type="" name="" link="cairo-XLib-Surfaces.html#id2668141"/> + <keyword type="" name="" link="cairo-XLib-Surfaces.html#id2668198"/> + <keyword type="" name="" link="cairo-XLib-Surfaces.html#id2668199"/> <keyword type="struct" name="cairo_matrix_t" link="cairo-cairo-matrix-t.html#cairo-matrix-t"/> <keyword type="function" name="cairo_matrix_init ()" link="cairo-cairo-matrix-t.html#cairo-matrix-init"/> <keyword type="function" name="cairo_matrix_init_identity ()" link="cairo-cairo-matrix-t.html#cairo-matrix-init-identity"/> @@ -382,15 +382,15 @@ <keyword type="function" name="cairo_matrix_multiply ()" link="cairo-cairo-matrix-t.html#cairo-matrix-multiply"/> <keyword type="function" name="cairo_matrix_transform_distance ()" link="cairo-cairo-matrix-t.html#cairo-matrix-transform-distance"/> <keyword type="function" name="cairo_matrix_transform_point ()" link="cairo-cairo-matrix-t.html#cairo-matrix-transform-point"/> - <keyword type="" name="" link="cairo-cairo-matrix-t.html#id2671602"/> - <keyword type="" name="" link="cairo-cairo-matrix-t.html#id2671603"/> - <keyword type="enum" name="enum cairo_status_t" link="cairo-Error-Handling.html#cairo-status-t"/> + <keyword type="" name="" link="cairo-cairo-matrix-t.html#id2671665"/> + <keyword type="" name="" link="cairo-cairo-matrix-t.html#id2671666"/> + <keyword type="function" name="cairo_status_t ()" link="cairo-Error-Handling.html#cairo-status-t"/> <keyword type="function" name="cairo_status_to_string ()" link="cairo-Error-Handling.html#cairo-status-to-string"/> <keyword type="function" name="cairo_debug_reset_static_data ()" link="cairo-Error-Handling.html#cairo-debug-reset-static-data"/> - <keyword type="" name="" link="cairo-Error-Handling.html#id2662533"/> - <keyword type="" name="" link="cairo-Error-Handling.html#id2662534"/> - <keyword type="" name="Compatibility" link="cairo-Version-Information.html#id2669986"/> - <keyword type="" name="Examining the version" link="cairo-Version-Information.html#id2670025"/> + <keyword type="" name="" link="cairo-Error-Handling.html#id2665646"/> + <keyword type="" name="" link="cairo-Error-Handling.html#id2665647"/> + <keyword type="" name="Compatibility" link="cairo-Version-Information.html#id2666698"/> + <keyword type="" name="Examining the version" link="cairo-Version-Information.html#id2666737"/> <keyword type="macro" name="CAIRO_VERSION" link="cairo-Version-Information.html#CAIRO-VERSION:CAPS"/> <keyword type="macro" name="CAIRO_VERSION_MAJOR" link="cairo-Version-Information.html#CAIRO-VERSION-MAJOR:CAPS"/> <keyword type="macro" name="CAIRO_VERSION_MINOR" link="cairo-Version-Information.html#CAIRO-VERSION-MINOR:CAPS"/> @@ -399,12 +399,12 @@ <keyword type="macro" name="CAIRO_VERSION_ENCODE()" link="cairo-Version-Information.html#CAIRO-VERSION-ENCODE:CAPS"/> <keyword type="function" name="cairo_version ()" link="cairo-Version-Information.html#cairo-version"/> <keyword type="function" name="cairo_version_string ()" link="cairo-Version-Information.html#cairo-version-string"/> - <keyword type="" name="" link="cairo-Version-Information.html#id2666808"/> - <keyword type="" name="" link="cairo-Version-Information.html#id2666809"/> + <keyword type="" name="" link="cairo-Version-Information.html#id2669653"/> + <keyword type="" name="" link="cairo-Version-Information.html#id2669654"/> <keyword type="typedef" name="cairo_bool_t" link="cairo-Types.html#cairo-bool-t"/> <keyword type="struct" name="cairo_user_data_key_t" link="cairo-Types.html#cairo-user-data-key-t"/> <keyword type="function" name="cairo_destroy_func_t ()" link="cairo-Types.html#cairo-destroy-func-t"/> - <keyword type="" name="" link="cairo-Types.html#id2669682"/> - <keyword type="" name="" link="cairo-Types.html#id2669683"/> + <keyword type="" name="" link="cairo-Types.html#id2669894"/> + <keyword type="" name="" link="cairo-Types.html#id2669895"/> </functions> </book> diff --git a/doc/public/html/index-1.2.html b/doc/public/html/index-1.2.html index add0e3b..11a1b1a 100644 --- a/doc/public/html/index-1.2.html +++ b/doc/public/html/index-1.2.html @@ -35,101 +35,101 @@ <div class="index"><div class="indexdiv"> <h3>C</h3> <dl> -<dt>cairo_font_face_get_type, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639518">cairo_font_face_get_type ()</a> +<dt>cairo_font_face_get_type, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639537">cairo_font_face_get_type ()</a> </dt> -<dt>cairo_font_type_t, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639317">enum cairo_font_type_t</a> +<dt>cairo_font_type_t, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639334">enum cairo_font_type_t</a> </dt> -<dt>cairo_get_group_target, <a class="indexterm" href="cairo-cairo-t.html#id2632212">cairo_get_group_target ()</a> +<dt>cairo_get_group_target, <a class="indexterm" href="cairo-cairo-t.html#id2632054">cairo_get_group_target ()</a> </dt> -<dt>cairo_image_surface_get_data, <a class="indexterm" href="cairo-Image-Surfaces.html#id2654156">cairo_image_surface_get_data ()</a> +<dt>cairo_image_surface_get_data, <a class="indexterm" href="cairo-Image-Surfaces.html#id2657234">cairo_image_surface_get_data ()</a> </dt> -<dt>cairo_image_surface_get_format, <a class="indexterm" href="cairo-Image-Surfaces.html#id2654255">cairo_image_surface_get_format ()</a> +<dt>cairo_image_surface_get_format, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656231">cairo_image_surface_get_format ()</a> </dt> -<dt>cairo_image_surface_get_stride, <a class="indexterm" href="cairo-Image-Surfaces.html#id2658380">cairo_image_surface_get_stride ()</a> +<dt>cairo_image_surface_get_stride, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656484">cairo_image_surface_get_stride ()</a> </dt> -<dt>cairo_new_sub_path, <a class="indexterm" href="cairo-Paths.html#id2579203">cairo_new_sub_path ()</a> +<dt>cairo_new_sub_path, <a class="indexterm" href="cairo-Paths.html#id2579147">cairo_new_sub_path ()</a> </dt> -<dt>cairo_pattern_get_type, <a class="indexterm" href="cairo-Patterns.html#id2644512">cairo_pattern_get_type ()</a> +<dt>cairo_pattern_get_type, <a class="indexterm" href="cairo-Patterns.html#id2644557">cairo_pattern_get_type ()</a> </dt> -<dt>cairo_pattern_type_t, <a class="indexterm" href="cairo-Patterns.html#id2644285">enum cairo_pattern_type_t</a> +<dt>cairo_pattern_type_t, <a class="indexterm" href="cairo-Patterns.html#id2644329">enum cairo_pattern_type_t</a> </dt> -<dt>cairo_pdf_surface_create, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2602857">cairo_pdf_surface_create ()</a> +<dt>cairo_pdf_surface_create, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2622684">cairo_pdf_surface_create ()</a> </dt> -<dt>cairo_pdf_surface_create_for_stream, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2627638">cairo_pdf_surface_create_for_stream ()</a> +<dt>cairo_pdf_surface_create_for_stream, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2588757">cairo_pdf_surface_create_for_stream ()</a> </dt> -<dt>cairo_pdf_surface_set_size, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2655885">cairo_pdf_surface_set_size ()</a> +<dt>cairo_pdf_surface_set_size, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2656659">cairo_pdf_surface_set_size ()</a> </dt> -<dt>cairo_pop_group, <a class="indexterm" href="cairo-cairo-t.html#id2605709">cairo_pop_group ()</a> +<dt>cairo_pop_group, <a class="indexterm" href="cairo-cairo-t.html#id2631786">cairo_pop_group ()</a> </dt> -<dt>cairo_pop_group_to_source, <a class="indexterm" href="cairo-cairo-t.html#id2632078">cairo_pop_group_to_source ()</a> +<dt>cairo_pop_group_to_source, <a class="indexterm" href="cairo-cairo-t.html#id2631919">cairo_pop_group_to_source ()</a> </dt> -<dt>cairo_ps_surface_create, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2663142">cairo_ps_surface_create ()</a> +<dt>cairo_ps_surface_create, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2654725">cairo_ps_surface_create ()</a> </dt> -<dt>cairo_ps_surface_create_for_stream, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2657173">cairo_ps_surface_create_for_stream ()</a> +<dt>cairo_ps_surface_create_for_stream, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2654895">cairo_ps_surface_create_for_stream ()</a> </dt> -<dt>cairo_ps_surface_dsc_begin_page_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664584">cairo_ps_surface_dsc_begin_page_setup ()</a> +<dt>cairo_ps_surface_dsc_begin_page_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664654">cairo_ps_surface_dsc_begin_page_setup ()</a> </dt> -<dt>cairo_ps_surface_dsc_begin_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664468">cairo_ps_surface_dsc_begin_setup ()</a> +<dt>cairo_ps_surface_dsc_begin_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664539">cairo_ps_surface_dsc_begin_setup ()</a> </dt> -<dt>cairo_ps_surface_dsc_comment, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664700">cairo_ps_surface_dsc_comment ()</a> +<dt>cairo_ps_surface_dsc_comment, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664771">cairo_ps_surface_dsc_comment ()</a> </dt> -<dt>cairo_ps_surface_set_size, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664324">cairo_ps_surface_set_size ()</a> +<dt>cairo_ps_surface_set_size, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664395">cairo_ps_surface_set_size ()</a> </dt> -<dt>cairo_push_group, <a class="indexterm" href="cairo-cairo-t.html#id2631613">cairo_push_group ()</a> +<dt>cairo_push_group, <a class="indexterm" href="cairo-cairo-t.html#id2631473">cairo_push_group ()</a> </dt> -<dt>cairo_push_group_with_content, <a class="indexterm" href="cairo-cairo-t.html#id2631810">cairo_push_group_with_content ()</a> +<dt>cairo_push_group_with_content, <a class="indexterm" href="cairo-cairo-t.html#id2631650">cairo_push_group_with_content ()</a> </dt> -<dt>cairo_scaled_font_get_ctm, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650852">cairo_scaled_font_get_ctm ()</a> +<dt>cairo_scaled_font_get_ctm, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650935">cairo_scaled_font_get_ctm ()</a> </dt> -<dt>cairo_scaled_font_get_font_face, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650554">cairo_scaled_font_get_font_face ()</a> +<dt>cairo_scaled_font_get_font_face, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650636">cairo_scaled_font_get_font_face ()</a> </dt> -<dt>cairo_scaled_font_get_font_matrix, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650750">cairo_scaled_font_get_font_matrix ()</a> +<dt>cairo_scaled_font_get_font_matrix, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650832">cairo_scaled_font_get_font_matrix ()</a> </dt> -<dt>cairo_scaled_font_get_font_options, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650647">cairo_scaled_font_get_font_options ()</a> +<dt>cairo_scaled_font_get_font_options, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650730">cairo_scaled_font_get_font_options ()</a> </dt> -<dt>cairo_scaled_font_get_type, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650951">cairo_scaled_font_get_type ()</a> +<dt>cairo_scaled_font_get_type, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651034">cairo_scaled_font_get_type ()</a> </dt> -<dt>cairo_scaled_font_text_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650229">cairo_scaled_font_text_extents ()</a> +<dt>cairo_scaled_font_text_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650300">cairo_scaled_font_text_extents ()</a> </dt> -<dt>cairo_set_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645783">cairo_set_scaled_font ()</a> +<dt>cairo_set_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645877">cairo_set_scaled_font ()</a> </dt> -<dt>cairo_surface_get_content, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659340">cairo_surface_get_content ()</a> +<dt>cairo_surface_get_content, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659326">cairo_surface_get_content ()</a> </dt> -<dt>cairo_surface_get_device_offset, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659860">cairo_surface_get_device_offset ()</a> +<dt>cairo_surface_get_device_offset, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659798">cairo_surface_get_device_offset ()</a> </dt> -<dt>cairo_surface_get_type, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660569">cairo_surface_get_type ()</a> +<dt>cairo_surface_get_type, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660450">cairo_surface_get_type ()</a> </dt> -<dt>cairo_surface_set_fallback_resolution, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659996">cairo_surface_set_fallback_resolution ()</a> +<dt>cairo_surface_set_fallback_resolution, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659920">cairo_surface_set_fallback_resolution ()</a> </dt> -<dt>cairo_surface_type_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660170">enum cairo_surface_type_t</a> +<dt>cairo_surface_type_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660079">enum cairo_surface_type_t</a> </dt> -<dt>cairo_svg_get_versions, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661484">cairo_svg_get_versions ()</a> +<dt>cairo_svg_get_versions, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661348">cairo_svg_get_versions ()</a> </dt> -<dt>cairo_svg_surface_create, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655278">cairo_svg_surface_create ()</a> +<dt>cairo_svg_surface_create, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2663007">cairo_svg_surface_create ()</a> </dt> -<dt>cairo_svg_surface_create_for_stream, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655424">cairo_svg_surface_create_for_stream ()</a> +<dt>cairo_svg_surface_create_for_stream, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655736">cairo_svg_surface_create_for_stream ()</a> </dt> -<dt>cairo_svg_surface_restrict_to_version, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655609">cairo_svg_surface_restrict_to_version ()</a> +<dt>cairo_svg_surface_restrict_to_version, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655922">cairo_svg_surface_restrict_to_version ()</a> </dt> -<dt>cairo_svg_version_to_string, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661586">cairo_svg_version_to_string ()</a> +<dt>cairo_svg_version_to_string, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661451">cairo_svg_version_to_string ()</a> </dt> -<dt>cairo_win32_surface_create_with_dib, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662832">cairo_win32_surface_create_with_dib ()</a> +<dt>cairo_win32_surface_create_with_dib, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2655349">cairo_win32_surface_create_with_dib ()</a> </dt> -<dt>cairo_win32_surface_get_dc, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2654686">cairo_win32_surface_get_dc ()</a> +<dt>cairo_win32_surface_get_dc, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2663340">cairo_win32_surface_get_dc ()</a> </dt> -<dt>cairo_xlib_surface_get_depth, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2668054">cairo_xlib_surface_get_depth ()</a> +<dt>cairo_xlib_surface_get_depth, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2668113">cairo_xlib_surface_get_depth ()</a> </dt> -<dt>cairo_xlib_surface_get_display, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667433">cairo_xlib_surface_get_display ()</a> +<dt>cairo_xlib_surface_get_display, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667491">cairo_xlib_surface_get_display ()</a> </dt> -<dt>cairo_xlib_surface_get_drawable, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667724">cairo_xlib_surface_get_drawable ()</a> +<dt>cairo_xlib_surface_get_drawable, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667783">cairo_xlib_surface_get_drawable ()</a> </dt> -<dt>cairo_xlib_surface_get_height, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667971">cairo_xlib_surface_get_height ()</a> +<dt>cairo_xlib_surface_get_height, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2668030">cairo_xlib_surface_get_height ()</a> </dt> -<dt>cairo_xlib_surface_get_screen, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667515">cairo_xlib_surface_get_screen ()</a> +<dt>cairo_xlib_surface_get_screen, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667573">cairo_xlib_surface_get_screen ()</a> </dt> -<dt>cairo_xlib_surface_get_visual, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667806">cairo_xlib_surface_get_visual ()</a> +<dt>cairo_xlib_surface_get_visual, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667865">cairo_xlib_surface_get_visual ()</a> </dt> -<dt>cairo_xlib_surface_get_width, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667888">cairo_xlib_surface_get_width ()</a> +<dt>cairo_xlib_surface_get_width, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667947">cairo_xlib_surface_get_width ()</a> </dt> </dl> </div></div> diff --git a/doc/public/html/index-1.4.html b/doc/public/html/index-1.4.html index 309ed4a..cc1fdc0 100644 --- a/doc/public/html/index-1.4.html +++ b/doc/public/html/index-1.4.html @@ -35,63 +35,63 @@ <div class="index"><div class="indexdiv"> <h3>C</h3> <dl> -<dt>cairo_clip_extents, <a class="indexterm" href="cairo-cairo-t.html#id2635908">cairo_clip_extents ()</a> +<dt>cairo_clip_extents, <a class="indexterm" href="cairo-cairo-t.html#id2636012">cairo_clip_extents ()</a> </dt> -<dt>cairo_copy_clip_rectangle_list, <a class="indexterm" href="cairo-cairo-t.html#id2636536">cairo_copy_clip_rectangle_list ()</a> +<dt>cairo_copy_clip_rectangle_list, <a class="indexterm" href="cairo-cairo-t.html#id2636640">cairo_copy_clip_rectangle_list ()</a> </dt> -<dt>cairo_font_face_get_reference_count, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639614">cairo_font_face_get_reference_count ()</a> +<dt>cairo_font_face_get_reference_count, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639632">cairo_font_face_get_reference_count ()</a> </dt> -<dt>cairo_get_dash, <a class="indexterm" href="cairo-cairo-t.html#id2633620">cairo_get_dash ()</a> +<dt>cairo_get_dash, <a class="indexterm" href="cairo-cairo-t.html#id2633616">cairo_get_dash ()</a> </dt> -<dt>cairo_get_dash_count, <a class="indexterm" href="cairo-cairo-t.html#id2633514">cairo_get_dash_count ()</a> +<dt>cairo_get_dash_count, <a class="indexterm" href="cairo-cairo-t.html#id2633495">cairo_get_dash_count ()</a> </dt> -<dt>cairo_get_reference_count, <a class="indexterm" href="cairo-cairo-t.html#id2638494">cairo_get_reference_count ()</a> +<dt>cairo_get_reference_count, <a class="indexterm" href="cairo-cairo-t.html#id2638597">cairo_get_reference_count ()</a> </dt> -<dt>cairo_get_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645914">cairo_get_scaled_font ()</a> +<dt>cairo_get_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645992">cairo_get_scaled_font ()</a> </dt> -<dt>cairo_get_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638830">cairo_get_user_data ()</a> +<dt>cairo_get_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638933">cairo_get_user_data ()</a> </dt> -<dt>cairo_pattern_get_color_stop_count, <a class="indexterm" href="cairo-Patterns.html#id2641097">cairo_pattern_get_color_stop_count ()</a> +<dt>cairo_pattern_get_color_stop_count, <a class="indexterm" href="cairo-Patterns.html#id2641174">cairo_pattern_get_color_stop_count ()</a> </dt> -<dt>cairo_pattern_get_color_stop_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641232">cairo_pattern_get_color_stop_rgba ()</a> +<dt>cairo_pattern_get_color_stop_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641323">cairo_pattern_get_color_stop_rgba ()</a> </dt> -<dt>cairo_pattern_get_linear_points, <a class="indexterm" href="cairo-Patterns.html#id2642460">cairo_pattern_get_linear_points ()</a> +<dt>cairo_pattern_get_linear_points, <a class="indexterm" href="cairo-Patterns.html#id2642536">cairo_pattern_get_linear_points ()</a> </dt> -<dt>cairo_pattern_get_radial_circles, <a class="indexterm" href="cairo-Patterns.html#id2642908">cairo_pattern_get_radial_circles ()</a> +<dt>cairo_pattern_get_radial_circles, <a class="indexterm" href="cairo-Patterns.html#id2642984">cairo_pattern_get_radial_circles ()</a> </dt> -<dt>cairo_pattern_get_reference_count, <a class="indexterm" href="cairo-Patterns.html#id2644618">cairo_pattern_get_reference_count ()</a> +<dt>cairo_pattern_get_reference_count, <a class="indexterm" href="cairo-Patterns.html#id2644663">cairo_pattern_get_reference_count ()</a> </dt> -<dt>cairo_pattern_get_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641822">cairo_pattern_get_rgba ()</a> +<dt>cairo_pattern_get_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641898">cairo_pattern_get_rgba ()</a> </dt> -<dt>cairo_pattern_get_surface, <a class="indexterm" href="cairo-Patterns.html#id2642128">cairo_pattern_get_surface ()</a> +<dt>cairo_pattern_get_surface, <a class="indexterm" href="cairo-Patterns.html#id2642204">cairo_pattern_get_surface ()</a> </dt> -<dt>cairo_pattern_get_user_data, <a class="indexterm" href="cairo-Patterns.html#id2644956">cairo_pattern_get_user_data ()</a> +<dt>cairo_pattern_get_user_data, <a class="indexterm" href="cairo-Patterns.html#id2645001">cairo_pattern_get_user_data ()</a> </dt> -<dt>cairo_pattern_set_user_data, <a class="indexterm" href="cairo-Patterns.html#id2644725">cairo_pattern_set_user_data ()</a> +<dt>cairo_pattern_set_user_data, <a class="indexterm" href="cairo-Patterns.html#id2644769">cairo_pattern_set_user_data ()</a> </dt> -<dt>cairo_rectangle_list_destroy, <a class="indexterm" href="cairo-cairo-t.html#id2636438">cairo_rectangle_list_destroy ()</a> +<dt>cairo_rectangle_list_destroy, <a class="indexterm" href="cairo-cairo-t.html#id2636542">cairo_rectangle_list_destroy ()</a> </dt> -<dt>cairo_rectangle_list_t, <a class="indexterm" href="cairo-cairo-t.html#id2636323">cairo_rectangle_list_t</a> +<dt>cairo_rectangle_list_t, <a class="indexterm" href="cairo-cairo-t.html#id2636427">cairo_rectangle_list_t</a> </dt> -<dt>cairo_rectangle_t, <a class="indexterm" href="cairo-cairo-t.html#id2636190">cairo_rectangle_t</a> +<dt>cairo_rectangle_t, <a class="indexterm" href="cairo-cairo-t.html#id2636294">cairo_rectangle_t</a> </dt> -<dt>cairo_scaled_font_get_reference_count, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651043">cairo_scaled_font_get_reference_count ()</a> +<dt>cairo_scaled_font_get_reference_count, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651126">cairo_scaled_font_get_reference_count ()</a> </dt> -<dt>cairo_scaled_font_get_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651344">cairo_scaled_font_get_user_data ()</a> +<dt>cairo_scaled_font_get_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651427">cairo_scaled_font_get_user_data ()</a> </dt> -<dt>cairo_scaled_font_set_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651140">cairo_scaled_font_set_user_data ()</a> +<dt>cairo_scaled_font_set_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651222">cairo_scaled_font_set_user_data ()</a> </dt> -<dt>cairo_set_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638599">cairo_set_user_data ()</a> +<dt>cairo_set_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638703">cairo_set_user_data ()</a> </dt> -<dt>cairo_surface_get_reference_count, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660670">cairo_surface_get_reference_count ()</a> +<dt>cairo_surface_get_reference_count, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660541">cairo_surface_get_reference_count ()</a> </dt> -<dt>cairo_win32_scaled_font_get_device_to_logical, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648840">cairo_win32_scaled_font_get_device_to_logical ()</a> +<dt>cairo_win32_scaled_font_get_device_to_logical, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648162">cairo_win32_scaled_font_get_device_to_logical ()</a> </dt> -<dt>cairo_win32_scaled_font_get_logical_to_device, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648736">cairo_win32_scaled_font_get_logical_to_device ()</a> +<dt>cairo_win32_scaled_font_get_logical_to_device, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648058">cairo_win32_scaled_font_get_logical_to_device ()</a> </dt> -<dt>cairo_win32_surface_create_with_ddb, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662956">cairo_win32_surface_create_with_ddb ()</a> +<dt>cairo_win32_surface_create_with_ddb, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662687">cairo_win32_surface_create_with_ddb ()</a> </dt> -<dt>cairo_win32_surface_get_image, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2654777">cairo_win32_surface_get_image ()</a> +<dt>cairo_win32_surface_get_image, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2663431">cairo_win32_surface_get_image ()</a> </dt> </dl> </div></div> diff --git a/doc/public/html/index.html b/doc/public/html/index.html index 25c346a..d5eaabe 100644 --- a/doc/public/html/index.html +++ b/doc/public/html/index.html @@ -23,7 +23,7 @@ <div class="titlepage"> <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Cairo: A Vector Graphics Library</p></th></tr></table></div> -<div><p class="releaseinfo">for Cairo 1.5.4 +<div><p class="releaseinfo">for Cairo 1.5.6 </p></div> </div> <hr> diff --git a/doc/public/html/index.sgml b/doc/public/html/index.sgml index 25032a1..b26427c 100644 --- a/doc/public/html/index.sgml +++ b/doc/public/html/index.sgml @@ -383,29 +383,6 @@ <ANCHOR id="cairo-matrix-transform-point" href="cairo/cairo-cairo-matrix-t.html#cairo-matrix-transform-point"> <ANCHOR id="cairo-Error-Handling" href="cairo/cairo-Error-Handling.html"> <ANCHOR id="cairo-status-t" href="cairo/cairo-Error-Handling.html#cairo-status-t"> -<ANCHOR id="CAIRO-STATUS-SUCCESS:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-SUCCESS:CAPS"> -<ANCHOR id="CAIRO-STATUS-NO-MEMORY:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-RESTORE:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-RESTORE:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-POP-GROUP:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-POP-GROUP:CAPS"> -<ANCHOR id="CAIRO-STATUS-NO-CURRENT-POINT:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-NO-CURRENT-POINT:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-MATRIX:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-MATRIX:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-STATUS:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-STATUS:CAPS"> -<ANCHOR id="CAIRO-STATUS-NULL-POINTER:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-NULL-POINTER:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-STRING:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-STRING:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-PATH-DATA:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-PATH-DATA:CAPS"> -<ANCHOR id="CAIRO-STATUS-READ-ERROR:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-READ-ERROR:CAPS"> -<ANCHOR id="CAIRO-STATUS-WRITE-ERROR:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-WRITE-ERROR:CAPS"> -<ANCHOR id="CAIRO-STATUS-SURFACE-FINISHED:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-SURFACE-FINISHED:CAPS"> -<ANCHOR id="CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS"> -<ANCHOR id="CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-CONTENT:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-CONTENT:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-FORMAT:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-FORMAT:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-VISUAL:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-VISUAL:CAPS"> -<ANCHOR id="CAIRO-STATUS-FILE-NOT-FOUND:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-FILE-NOT-FOUND:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-DASH:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-DASH:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-DSC-COMMENT:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-DSC-COMMENT:CAPS"> -<ANCHOR id="CAIRO-STATUS-INVALID-INDEX:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"> -<ANCHOR id="CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS" href="cairo/cairo-Error-Handling.html#CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS"> <ANCHOR id="cairo-status-to-string" href="cairo/cairo-Error-Handling.html#cairo-status-to-string"> <ANCHOR id="cairo-debug-reset-static-data" href="cairo/cairo-Error-Handling.html#cairo-debug-reset-static-data"> <ANCHOR id="cairo-Version-Information" href="cairo/cairo-Version-Information.html"> diff --git a/doc/public/html/ix01.html b/doc/public/html/ix01.html index 98139cb..9ebaddb 100644 --- a/doc/public/html/ix01.html +++ b/doc/public/html/ix01.html @@ -31,631 +31,631 @@ </tr></table> <div class="index"> <div class="titlepage"><div><div><h2 class="title"> -<a name="id2528119"></a>Index</h2></div></div></div> +<a name="id2528115"></a>Index</h2></div></div></div> <div class="index"> <div class="indexdiv"> <h3></h3> -<dl><dt>, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2669175">Description</a> +<dl><dt>, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2665296">Description</a> </dt></dl> </div> <div class="indexdiv"> <h3>C</h3> <dl> -<dt>cairo_antialias_t, <a class="indexterm" href="cairo-cairo-t.html#id2633008">enum cairo_antialias_t</a> +<dt>cairo_antialias_t, <a class="indexterm" href="cairo-cairo-t.html#id2632922">enum cairo_antialias_t</a> </dt> -<dt>cairo_append_path, <a class="indexterm" href="cairo-Paths.html#id2578673">cairo_append_path ()</a> +<dt>cairo_append_path, <a class="indexterm" href="cairo-Paths.html#id2578620">cairo_append_path ()</a> </dt> -<dt>cairo_arc, <a class="indexterm" href="cairo-Paths.html#id2579453">cairo_arc ()</a> +<dt>cairo_arc, <a class="indexterm" href="cairo-Paths.html#id2579395">cairo_arc ()</a> </dt> -<dt>cairo_arc_negative, <a class="indexterm" href="cairo-Paths.html#id2579784">cairo_arc_negative ()</a> +<dt>cairo_arc_negative, <a class="indexterm" href="cairo-Paths.html#id2579728">cairo_arc_negative ()</a> </dt> -<dt>cairo_bool_t, <a class="indexterm" href="cairo-Types.html#id2623921">cairo_bool_t</a> +<dt>cairo_bool_t, <a class="indexterm" href="cairo-Types.html#id2669682">cairo_bool_t</a> </dt> -<dt>cairo_clip, <a class="indexterm" href="cairo-cairo-t.html#id2635597">cairo_clip ()</a> +<dt>cairo_clip, <a class="indexterm" href="cairo-cairo-t.html#id2635700">cairo_clip ()</a> </dt> -<dt>cairo_clip_extents, <a class="indexterm" href="cairo-cairo-t.html#id2635908">cairo_clip_extents ()</a> +<dt>cairo_clip_extents, <a class="indexterm" href="cairo-cairo-t.html#id2636012">cairo_clip_extents ()</a> </dt> -<dt>cairo_clip_preserve, <a class="indexterm" href="cairo-cairo-t.html#id2635747">cairo_clip_preserve ()</a> +<dt>cairo_clip_preserve, <a class="indexterm" href="cairo-cairo-t.html#id2635851">cairo_clip_preserve ()</a> </dt> -<dt>cairo_close_path, <a class="indexterm" href="cairo-Paths.html#id2579326">cairo_close_path ()</a> +<dt>cairo_close_path, <a class="indexterm" href="cairo-Paths.html#id2579268">cairo_close_path ()</a> </dt> -<dt>cairo_content_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2653655">enum cairo_content_t</a> +<dt>cairo_content_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2653728">enum cairo_content_t</a> </dt> -<dt>cairo_copy_clip_rectangle_list, <a class="indexterm" href="cairo-cairo-t.html#id2636536">cairo_copy_clip_rectangle_list ()</a> +<dt>cairo_copy_clip_rectangle_list, <a class="indexterm" href="cairo-cairo-t.html#id2636640">cairo_copy_clip_rectangle_list ()</a> </dt> -<dt>cairo_copy_page, <a class="indexterm" href="cairo-cairo-t.html#id2638302">cairo_copy_page ()</a> +<dt>cairo_copy_page, <a class="indexterm" href="cairo-cairo-t.html#id2638406">cairo_copy_page ()</a> </dt> -<dt>cairo_copy_path, <a class="indexterm" href="cairo-Paths.html#id2626812">cairo_copy_path ()</a> +<dt>cairo_copy_path, <a class="indexterm" href="cairo-Paths.html#id2578099">cairo_copy_path ()</a> </dt> -<dt>cairo_copy_path_flat, <a class="indexterm" href="cairo-Paths.html#id2578347">cairo_copy_path_flat ()</a> +<dt>cairo_copy_path_flat, <a class="indexterm" href="cairo-Paths.html#id2578296">cairo_copy_path_flat ()</a> </dt> -<dt>cairo_create, <a class="indexterm" href="cairo-cairo-t.html#id2630708">cairo_create ()</a> +<dt>cairo_create, <a class="indexterm" href="cairo-cairo-t.html#id2630664">cairo_create ()</a> </dt> -<dt>cairo_curve_to, <a class="indexterm" href="cairo-Paths.html#id2580017">cairo_curve_to ()</a> +<dt>cairo_curve_to, <a class="indexterm" href="cairo-Paths.html#id2579961">cairo_curve_to ()</a> </dt> -<dt>cairo_debug_reset_static_data, <a class="indexterm" href="cairo-Error-Handling.html#id2662470">cairo_debug_reset_static_data ()</a> +<dt>cairo_debug_reset_static_data, <a class="indexterm" href="cairo-Error-Handling.html#id2662401">cairo_debug_reset_static_data ()</a> </dt> -<dt>cairo_destroy, <a class="indexterm" href="cairo-cairo-t.html#id2631026">cairo_destroy ()</a> +<dt>cairo_destroy, <a class="indexterm" href="cairo-cairo-t.html#id2630949">cairo_destroy ()</a> </dt> -<dt>cairo_destroy_func_t, <a class="indexterm" href="cairo-Types.html#id2666934">cairo_destroy_func_t ()</a> +<dt>cairo_destroy_func_t, <a class="indexterm" href="cairo-Types.html#id2669821">cairo_destroy_func_t ()</a> </dt> -<dt>cairo_device_to_user, <a class="indexterm" href="cairo-Transformations.html#id2588508">cairo_device_to_user ()</a> +<dt>cairo_device_to_user, <a class="indexterm" href="cairo-Transformations.html#id2628931">cairo_device_to_user ()</a> </dt> -<dt>cairo_device_to_user_distance, <a class="indexterm" href="cairo-Transformations.html#id2628687">cairo_device_to_user_distance ()</a> +<dt>cairo_device_to_user_distance, <a class="indexterm" href="cairo-Transformations.html#id2629037">cairo_device_to_user_distance ()</a> </dt> -<dt>cairo_extend_t, <a class="indexterm" href="cairo-Patterns.html#id2643482">enum cairo_extend_t</a> +<dt>cairo_extend_t, <a class="indexterm" href="cairo-Patterns.html#id2643558">enum cairo_extend_t</a> </dt> -<dt>cairo_fill, <a class="indexterm" href="cairo-cairo-t.html#id2636644">cairo_fill ()</a> +<dt>cairo_fill, <a class="indexterm" href="cairo-cairo-t.html#id2636748">cairo_fill ()</a> </dt> -<dt>cairo_fill_extents, <a class="indexterm" href="cairo-cairo-t.html#id2636829">cairo_fill_extents ()</a> +<dt>cairo_fill_extents, <a class="indexterm" href="cairo-cairo-t.html#id2636933">cairo_fill_extents ()</a> </dt> -<dt>cairo_fill_preserve, <a class="indexterm" href="cairo-cairo-t.html#id2636730">cairo_fill_preserve ()</a> +<dt>cairo_fill_preserve, <a class="indexterm" href="cairo-cairo-t.html#id2636834">cairo_fill_preserve ()</a> </dt> -<dt>cairo_fill_rule_t, <a class="indexterm" href="cairo-cairo-t.html#id2633769">enum cairo_fill_rule_t</a> +<dt>cairo_fill_rule_t, <a class="indexterm" href="cairo-cairo-t.html#id2633784">enum cairo_fill_rule_t</a> </dt> -<dt>cairo_filter_t, <a class="indexterm" href="cairo-Patterns.html#id2643791">enum cairo_filter_t</a> +<dt>cairo_filter_t, <a class="indexterm" href="cairo-Patterns.html#id2643860">enum cairo_filter_t</a> </dt> -<dt>cairo_font_extents, <a class="indexterm" href="cairo-Text.html#id2646277">cairo_font_extents ()</a> +<dt>cairo_font_extents, <a class="indexterm" href="cairo-Text.html#id2646354">cairo_font_extents ()</a> </dt> -<dt>cairo_font_extents_t, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2649754">cairo_font_extents_t</a> +<dt>cairo_font_extents_t, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2649786">cairo_font_extents_t</a> </dt> -<dt>cairo_font_face_destroy, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2640076">cairo_font_face_destroy ()</a> +<dt>cairo_font_face_destroy, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639148">cairo_font_face_destroy ()</a> </dt> -<dt>cairo_font_face_get_reference_count, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639614">cairo_font_face_get_reference_count ()</a> +<dt>cairo_font_face_get_reference_count, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639632">cairo_font_face_get_reference_count ()</a> </dt> -<dt>cairo_font_face_get_type, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639518">cairo_font_face_get_type ()</a> +<dt>cairo_font_face_get_type, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639537">cairo_font_face_get_type ()</a> </dt> -<dt>cairo_font_face_get_user_data, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2646827">cairo_font_face_get_user_data ()</a> +<dt>cairo_font_face_get_user_data, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2594229">cairo_font_face_get_user_data ()</a> </dt> -<dt>cairo_font_face_reference, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2627829">cairo_font_face_reference ()</a> +<dt>cairo_font_face_reference, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2582070">cairo_font_face_reference ()</a> </dt> -<dt>cairo_font_face_set_user_data, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639720">cairo_font_face_set_user_data ()</a> +<dt>cairo_font_face_set_user_data, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639737">cairo_font_face_set_user_data ()</a> </dt> -<dt>cairo_font_face_status, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2640165">cairo_font_face_status ()</a> +<dt>cairo_font_face_status, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639237">cairo_font_face_status ()</a> </dt> -<dt>cairo_font_face_t, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2627706">cairo_font_face_t</a> +<dt>cairo_font_face_t, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2640068">cairo_font_face_t</a> </dt> -<dt>cairo_font_options_copy, <a class="indexterm" href="cairo-Font-Options.html#id2576532">cairo_font_options_copy ()</a> +<dt>cairo_font_options_copy, <a class="indexterm" href="cairo-Font-Options.html#id2649289">cairo_font_options_copy ()</a> </dt> -<dt>cairo_font_options_create, <a class="indexterm" href="cairo-Font-Options.html#id2576453">cairo_font_options_create ()</a> +<dt>cairo_font_options_create, <a class="indexterm" href="cairo-Font-Options.html#id2649210">cairo_font_options_create ()</a> </dt> -<dt>cairo_font_options_destroy, <a class="indexterm" href="cairo-Font-Options.html#id2576644">cairo_font_options_destroy ()</a> +<dt>cairo_font_options_destroy, <a class="indexterm" href="cairo-Font-Options.html#id2588222">cairo_font_options_destroy ()</a> </dt> -<dt>cairo_font_options_equal, <a class="indexterm" href="cairo-Font-Options.html#id2652394">cairo_font_options_equal ()</a> +<dt>cairo_font_options_equal, <a class="indexterm" href="cairo-Font-Options.html#id2652451">cairo_font_options_equal ()</a> </dt> -<dt>cairo_font_options_get_antialias, <a class="indexterm" href="cairo-Font-Options.html#id2652584">cairo_font_options_get_antialias ()</a> +<dt>cairo_font_options_get_antialias, <a class="indexterm" href="cairo-Font-Options.html#id2652659">cairo_font_options_get_antialias ()</a> </dt> -<dt>cairo_font_options_get_hint_metrics, <a class="indexterm" href="cairo-Font-Options.html#id2653512">cairo_font_options_get_hint_metrics ()</a> +<dt>cairo_font_options_get_hint_metrics, <a class="indexterm" href="cairo-Font-Options.html#id2653585">cairo_font_options_get_hint_metrics ()</a> </dt> -<dt>cairo_font_options_get_hint_style, <a class="indexterm" href="cairo-Font-Options.html#id2653240">cairo_font_options_get_hint_style ()</a> +<dt>cairo_font_options_get_hint_style, <a class="indexterm" href="cairo-Font-Options.html#id2653313">cairo_font_options_get_hint_style ()</a> </dt> -<dt>cairo_font_options_get_subpixel_order, <a class="indexterm" href="cairo-Font-Options.html#id2652915">cairo_font_options_get_subpixel_order ()</a> +<dt>cairo_font_options_get_subpixel_order, <a class="indexterm" href="cairo-Font-Options.html#id2652989">cairo_font_options_get_subpixel_order ()</a> </dt> -<dt>cairo_font_options_hash, <a class="indexterm" href="cairo-Font-Options.html#id2652318">cairo_font_options_hash ()</a> +<dt>cairo_font_options_hash, <a class="indexterm" href="cairo-Font-Options.html#id2652374">cairo_font_options_hash ()</a> </dt> -<dt>cairo_font_options_merge, <a class="indexterm" href="cairo-Font-Options.html#id2576831">cairo_font_options_merge ()</a> +<dt>cairo_font_options_merge, <a class="indexterm" href="cairo-Font-Options.html#id2588411">cairo_font_options_merge ()</a> </dt> -<dt>cairo_font_options_set_antialias, <a class="indexterm" href="cairo-Font-Options.html#id2652500">cairo_font_options_set_antialias ()</a> +<dt>cairo_font_options_set_antialias, <a class="indexterm" href="cairo-Font-Options.html#id2652566">cairo_font_options_set_antialias ()</a> </dt> -<dt>cairo_font_options_set_hint_metrics, <a class="indexterm" href="cairo-Font-Options.html#id2653420">cairo_font_options_set_hint_metrics ()</a> +<dt>cairo_font_options_set_hint_metrics, <a class="indexterm" href="cairo-Font-Options.html#id2653494">cairo_font_options_set_hint_metrics ()</a> </dt> -<dt>cairo_font_options_set_hint_style, <a class="indexterm" href="cairo-Font-Options.html#id2653148">cairo_font_options_set_hint_style ()</a> +<dt>cairo_font_options_set_hint_style, <a class="indexterm" href="cairo-Font-Options.html#id2653221">cairo_font_options_set_hint_style ()</a> </dt> -<dt>cairo_font_options_set_subpixel_order, <a class="indexterm" href="cairo-Font-Options.html#id2652813">cairo_font_options_set_subpixel_order ()</a> +<dt>cairo_font_options_set_subpixel_order, <a class="indexterm" href="cairo-Font-Options.html#id2652886">cairo_font_options_set_subpixel_order ()</a> </dt> -<dt>cairo_font_options_status, <a class="indexterm" href="cairo-Font-Options.html#id2576735">cairo_font_options_status ()</a> +<dt>cairo_font_options_status, <a class="indexterm" href="cairo-Font-Options.html#id2588314">cairo_font_options_status ()</a> </dt> -<dt>cairo_font_options_t, <a class="indexterm" href="cairo-Font-Options.html#id2576327">cairo_font_options_t</a> +<dt>cairo_font_options_t, <a class="indexterm" href="cairo-Font-Options.html#id2649086">cairo_font_options_t</a> </dt> -<dt>cairo_font_slant_t, <a class="indexterm" href="cairo-Text.html#id2640336">enum cairo_font_slant_t</a> +<dt>cairo_font_slant_t, <a class="indexterm" href="cairo-Text.html#id2640355">enum cairo_font_slant_t</a> </dt> -<dt>cairo_font_type_t, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639317">enum cairo_font_type_t</a> +<dt>cairo_font_type_t, <a class="indexterm" href="cairo-cairo-font-face-t.html#id2639334">enum cairo_font_type_t</a> </dt> -<dt>cairo_font_weight_t, <a class="indexterm" href="cairo-Text.html#id2640436">enum cairo_font_weight_t</a> +<dt>cairo_font_weight_t, <a class="indexterm" href="cairo-Text.html#id2628358">enum cairo_font_weight_t</a> </dt> -<dt>cairo_format_t, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656014">enum cairo_format_t</a> +<dt>cairo_format_t, <a class="indexterm" href="cairo-Image-Surfaces.html#id2653958">enum cairo_format_t</a> </dt> -<dt>cairo_ft_font_face_create_for_ft_face, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2651586">cairo_ft_font_face_create_for_ft_face ()</a> +<dt>cairo_ft_font_face_create_for_ft_face, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2648738">cairo_ft_font_face_create_for_ft_face ()</a> </dt> -<dt>cairo_ft_font_face_create_for_pattern, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2651725">cairo_ft_font_face_create_for_pattern ()</a> +<dt>cairo_ft_font_face_create_for_pattern, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2651845">cairo_ft_font_face_create_for_pattern ()</a> </dt> -<dt>cairo_ft_font_options_substitute, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2594227">cairo_ft_font_options_substitute ()</a> +<dt>cairo_ft_font_options_substitute, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2649407">cairo_ft_font_options_substitute ()</a> </dt> -<dt>cairo_ft_scaled_font_lock_face, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2594358">cairo_ft_scaled_font_lock_face ()</a> +<dt>cairo_ft_scaled_font_lock_face, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2649540">cairo_ft_scaled_font_lock_face ()</a> </dt> -<dt>cairo_ft_scaled_font_unlock_face, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2647110">cairo_ft_scaled_font_unlock_face ()</a> +<dt>cairo_ft_scaled_font_unlock_face, <a class="indexterm" href="cairo-FreeType-Fonts.html#id2648924">cairo_ft_scaled_font_unlock_face ()</a> </dt> -<dt>cairo_get_antialias, <a class="indexterm" href="cairo-cairo-t.html#id2633233">cairo_get_antialias ()</a> +<dt>cairo_get_antialias, <a class="indexterm" href="cairo-cairo-t.html#id2633180">cairo_get_antialias ()</a> </dt> -<dt>cairo_get_current_point, <a class="indexterm" href="cairo-Paths.html#id2578811">cairo_get_current_point ()</a> +<dt>cairo_get_current_point, <a class="indexterm" href="cairo-Paths.html#id2578757">cairo_get_current_point ()</a> </dt> -<dt>cairo_get_dash, <a class="indexterm" href="cairo-cairo-t.html#id2633620">cairo_get_dash ()</a> +<dt>cairo_get_dash, <a class="indexterm" href="cairo-cairo-t.html#id2633616">cairo_get_dash ()</a> </dt> -<dt>cairo_get_dash_count, <a class="indexterm" href="cairo-cairo-t.html#id2633514">cairo_get_dash_count ()</a> +<dt>cairo_get_dash_count, <a class="indexterm" href="cairo-cairo-t.html#id2633495">cairo_get_dash_count ()</a> </dt> -<dt>cairo_get_fill_rule, <a class="indexterm" href="cairo-cairo-t.html#id2633983">cairo_get_fill_rule ()</a> +<dt>cairo_get_fill_rule, <a class="indexterm" href="cairo-cairo-t.html#id2634026">cairo_get_fill_rule ()</a> </dt> -<dt>cairo_get_font_face, <a class="indexterm" href="cairo-Text.html#id2645659">cairo_get_font_face ()</a> +<dt>cairo_get_font_face, <a class="indexterm" href="cairo-Text.html#id2645740">cairo_get_font_face ()</a> </dt> -<dt>cairo_get_font_matrix, <a class="indexterm" href="cairo-Text.html#id2645232">cairo_get_font_matrix ()</a> +<dt>cairo_get_font_matrix, <a class="indexterm" href="cairo-Text.html#id2645275">cairo_get_font_matrix ()</a> </dt> -<dt>cairo_get_font_options, <a class="indexterm" href="cairo-Text.html#id2645448">cairo_get_font_options ()</a> +<dt>cairo_get_font_options, <a class="indexterm" href="cairo-Text.html#id2645489">cairo_get_font_options ()</a> </dt> -<dt>cairo_get_group_target, <a class="indexterm" href="cairo-cairo-t.html#id2632212">cairo_get_group_target ()</a> +<dt>cairo_get_group_target, <a class="indexterm" href="cairo-cairo-t.html#id2632054">cairo_get_group_target ()</a> </dt> -<dt>cairo_get_line_cap, <a class="indexterm" href="cairo-cairo-t.html#id2634264">cairo_get_line_cap ()</a> +<dt>cairo_get_line_cap, <a class="indexterm" href="cairo-cairo-t.html#id2634351">cairo_get_line_cap ()</a> </dt> -<dt>cairo_get_line_join, <a class="indexterm" href="cairo-cairo-t.html#id2634582">cairo_get_line_join ()</a> +<dt>cairo_get_line_join, <a class="indexterm" href="cairo-cairo-t.html#id2634686">cairo_get_line_join ()</a> </dt> -<dt>cairo_get_line_width, <a class="indexterm" href="cairo-cairo-t.html#id2634842">cairo_get_line_width ()</a> +<dt>cairo_get_line_width, <a class="indexterm" href="cairo-cairo-t.html#id2634945">cairo_get_line_width ()</a> </dt> -<dt>cairo_get_matrix, <a class="indexterm" href="cairo-Transformations.html#id2589130">cairo_get_matrix ()</a> +<dt>cairo_get_matrix, <a class="indexterm" href="cairo-Transformations.html#id2626647">cairo_get_matrix ()</a> </dt> -<dt>cairo_get_miter_limit, <a class="indexterm" href="cairo-cairo-t.html#id2635096">cairo_get_miter_limit ()</a> +<dt>cairo_get_miter_limit, <a class="indexterm" href="cairo-cairo-t.html#id2635200">cairo_get_miter_limit ()</a> </dt> -<dt>cairo_get_operator, <a class="indexterm" href="cairo-cairo-t.html#id2635333">cairo_get_operator ()</a> +<dt>cairo_get_operator, <a class="indexterm" href="cairo-cairo-t.html#id2635436">cairo_get_operator ()</a> </dt> -<dt>cairo_get_reference_count, <a class="indexterm" href="cairo-cairo-t.html#id2638494">cairo_get_reference_count ()</a> +<dt>cairo_get_reference_count, <a class="indexterm" href="cairo-cairo-t.html#id2638597">cairo_get_reference_count ()</a> </dt> -<dt>cairo_get_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645914">cairo_get_scaled_font ()</a> +<dt>cairo_get_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645992">cairo_get_scaled_font ()</a> </dt> -<dt>cairo_get_source, <a class="indexterm" href="cairo-cairo-t.html#id2632929">cairo_get_source ()</a> +<dt>cairo_get_source, <a class="indexterm" href="cairo-cairo-t.html#id2632830">cairo_get_source ()</a> </dt> -<dt>cairo_get_target, <a class="indexterm" href="cairo-cairo-t.html#id2631459">cairo_get_target ()</a> +<dt>cairo_get_target, <a class="indexterm" href="cairo-cairo-t.html#id2631334">cairo_get_target ()</a> </dt> -<dt>cairo_get_tolerance, <a class="indexterm" href="cairo-cairo-t.html#id2635512">cairo_get_tolerance ()</a> +<dt>cairo_get_tolerance, <a class="indexterm" href="cairo-cairo-t.html#id2635616">cairo_get_tolerance ()</a> </dt> -<dt>cairo_get_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638830">cairo_get_user_data ()</a> +<dt>cairo_get_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638933">cairo_get_user_data ()</a> </dt> -<dt>cairo_glyph_extents, <a class="indexterm" href="cairo-Text.html#id2646503">cairo_glyph_extents ()</a> +<dt>cairo_glyph_extents, <a class="indexterm" href="cairo-Text.html#id2646580">cairo_glyph_extents ()</a> </dt> -<dt>cairo_glyph_path, <a class="indexterm" href="cairo-Paths.html#id2580752">cairo_glyph_path ()</a> +<dt>cairo_glyph_path, <a class="indexterm" href="cairo-Paths.html#id2580696">cairo_glyph_path ()</a> </dt> -<dt>cairo_glyph_t, <a class="indexterm" href="cairo-Text.html#id2628520">cairo_glyph_t</a> +<dt>cairo_glyph_t, <a class="indexterm" href="cairo-Text.html#id2640234">cairo_glyph_t</a> </dt> -<dt>cairo_hint_metrics_t, <a class="indexterm" href="cairo-Font-Options.html#id2653322">enum cairo_hint_metrics_t</a> +<dt>cairo_hint_metrics_t, <a class="indexterm" href="cairo-Font-Options.html#id2653395">enum cairo_hint_metrics_t</a> </dt> -<dt>cairo_hint_style_t, <a class="indexterm" href="cairo-Font-Options.html#id2652998">enum cairo_hint_style_t</a> +<dt>cairo_hint_style_t, <a class="indexterm" href="cairo-Font-Options.html#id2653072">enum cairo_hint_style_t</a> </dt> -<dt>cairo_identity_matrix, <a class="indexterm" href="cairo-Transformations.html#id2588211">cairo_identity_matrix ()</a> +<dt>cairo_identity_matrix, <a class="indexterm" href="cairo-Transformations.html#id2626737">cairo_identity_matrix ()</a> </dt> -<dt>cairo_image_surface_create, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656165">cairo_image_surface_create ()</a> +<dt>cairo_image_surface_create, <a class="indexterm" href="cairo-Image-Surfaces.html#id2654108">cairo_image_surface_create ()</a> </dt> -<dt>cairo_image_surface_create_for_data, <a class="indexterm" href="cairo-Image-Surfaces.html#id2653920">cairo_image_surface_create_for_data ()</a> +<dt>cairo_image_surface_create_for_data, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656999">cairo_image_surface_create_for_data ()</a> </dt> -<dt>cairo_image_surface_create_from_png, <a class="indexterm" href="cairo-PNG-Support.html#id2657932">cairo_image_surface_create_from_png ()</a> +<dt>cairo_image_surface_create_from_png, <a class="indexterm" href="cairo-PNG-Support.html#id2658092">cairo_image_surface_create_from_png ()</a> </dt> -<dt>cairo_image_surface_create_from_png_stream, <a class="indexterm" href="cairo-PNG-Support.html#id2656622">cairo_image_surface_create_from_png_stream ()</a> +<dt>cairo_image_surface_create_from_png_stream, <a class="indexterm" href="cairo-PNG-Support.html#id2658304">cairo_image_surface_create_from_png_stream ()</a> </dt> -<dt>cairo_image_surface_get_data, <a class="indexterm" href="cairo-Image-Surfaces.html#id2654156">cairo_image_surface_get_data ()</a> +<dt>cairo_image_surface_get_data, <a class="indexterm" href="cairo-Image-Surfaces.html#id2657234">cairo_image_surface_get_data ()</a> </dt> -<dt>cairo_image_surface_get_format, <a class="indexterm" href="cairo-Image-Surfaces.html#id2654255">cairo_image_surface_get_format ()</a> +<dt>cairo_image_surface_get_format, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656231">cairo_image_surface_get_format ()</a> </dt> -<dt>cairo_image_surface_get_height, <a class="indexterm" href="cairo-Image-Surfaces.html#id2658298">cairo_image_surface_get_height ()</a> +<dt>cairo_image_surface_get_height, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656402">cairo_image_surface_get_height ()</a> </dt> -<dt>cairo_image_surface_get_stride, <a class="indexterm" href="cairo-Image-Surfaces.html#id2658380">cairo_image_surface_get_stride ()</a> +<dt>cairo_image_surface_get_stride, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656484">cairo_image_surface_get_stride ()</a> </dt> -<dt>cairo_image_surface_get_width, <a class="indexterm" href="cairo-Image-Surfaces.html#id2658216">cairo_image_surface_get_width ()</a> +<dt>cairo_image_surface_get_width, <a class="indexterm" href="cairo-Image-Surfaces.html#id2656321">cairo_image_surface_get_width ()</a> </dt> -<dt>cairo_in_fill, <a class="indexterm" href="cairo-cairo-t.html#id2637025">cairo_in_fill ()</a> +<dt>cairo_in_fill, <a class="indexterm" href="cairo-cairo-t.html#id2637128">cairo_in_fill ()</a> </dt> -<dt>cairo_in_stroke, <a class="indexterm" href="cairo-cairo-t.html#id2638110">cairo_in_stroke ()</a> +<dt>cairo_in_stroke, <a class="indexterm" href="cairo-cairo-t.html#id2638213">cairo_in_stroke ()</a> </dt> -<dt>cairo_line_cap_t, <a class="indexterm" href="cairo-cairo-t.html#id2634056">enum cairo_line_cap_t</a> +<dt>cairo_line_cap_t, <a class="indexterm" href="cairo-cairo-t.html#id2634111">enum cairo_line_cap_t</a> </dt> -<dt>cairo_line_join_t, <a class="indexterm" href="cairo-cairo-t.html#id2634337">enum cairo_line_join_t</a> +<dt>cairo_line_join_t, <a class="indexterm" href="cairo-cairo-t.html#id2634436">enum cairo_line_join_t</a> </dt> -<dt>cairo_line_to, <a class="indexterm" href="cairo-Paths.html#id2580294">cairo_line_to ()</a> +<dt>cairo_line_to, <a class="indexterm" href="cairo-Paths.html#id2580238">cairo_line_to ()</a> </dt> -<dt>cairo_mask, <a class="indexterm" href="cairo-cairo-t.html#id2637188">cairo_mask ()</a> +<dt>cairo_mask, <a class="indexterm" href="cairo-cairo-t.html#id2637292">cairo_mask ()</a> </dt> -<dt>cairo_mask_surface, <a class="indexterm" href="cairo-cairo-t.html#id2637294">cairo_mask_surface ()</a> +<dt>cairo_mask_surface, <a class="indexterm" href="cairo-cairo-t.html#id2637398">cairo_mask_surface ()</a> </dt> -<dt>cairo_matrix_init, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2665385">cairo_matrix_init ()</a> +<dt>cairo_matrix_init, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2662108">cairo_matrix_init ()</a> </dt> -<dt>cairo_matrix_init_identity, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670127">cairo_matrix_init_identity ()</a> +<dt>cairo_matrix_init_identity, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670192">cairo_matrix_init_identity ()</a> </dt> -<dt>cairo_matrix_init_rotate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670432">cairo_matrix_init_rotate ()</a> +<dt>cairo_matrix_init_rotate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670496">cairo_matrix_init_rotate ()</a> </dt> -<dt>cairo_matrix_init_scale, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670310">cairo_matrix_init_scale ()</a> +<dt>cairo_matrix_init_scale, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670374">cairo_matrix_init_scale ()</a> </dt> -<dt>cairo_matrix_init_translate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670193">cairo_matrix_init_translate ()</a> +<dt>cairo_matrix_init_translate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670257">cairo_matrix_init_translate ()</a> </dt> -<dt>cairo_matrix_invert, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670925">cairo_matrix_invert ()</a> +<dt>cairo_matrix_invert, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670989">cairo_matrix_invert ()</a> </dt> -<dt>cairo_matrix_multiply, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2671048">cairo_matrix_multiply ()</a> +<dt>cairo_matrix_multiply, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2671111">cairo_matrix_multiply ()</a> </dt> -<dt>cairo_matrix_rotate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670811">cairo_matrix_rotate ()</a> +<dt>cairo_matrix_rotate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670874">cairo_matrix_rotate ()</a> </dt> -<dt>cairo_matrix_scale, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670668">cairo_matrix_scale ()</a> +<dt>cairo_matrix_scale, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670731">cairo_matrix_scale ()</a> </dt> -<dt>cairo_matrix_t, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2665207">cairo_matrix_t</a> +<dt>cairo_matrix_t, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2665411">cairo_matrix_t</a> </dt> -<dt>cairo_matrix_transform_distance, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2671227">cairo_matrix_transform_distance ()</a> +<dt>cairo_matrix_transform_distance, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2671290">cairo_matrix_transform_distance ()</a> </dt> -<dt>cairo_matrix_transform_point, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2671468">cairo_matrix_transform_point ()</a> +<dt>cairo_matrix_transform_point, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2671530">cairo_matrix_transform_point ()</a> </dt> -<dt>cairo_matrix_translate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670532">cairo_matrix_translate ()</a> +<dt>cairo_matrix_translate, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2670595">cairo_matrix_translate ()</a> </dt> -<dt>cairo_move_to, <a class="indexterm" href="cairo-Paths.html#id2580459">cairo_move_to ()</a> +<dt>cairo_move_to, <a class="indexterm" href="cairo-Paths.html#id2580403">cairo_move_to ()</a> </dt> -<dt>cairo_new_path, <a class="indexterm" href="cairo-Paths.html#id2579140">cairo_new_path ()</a> +<dt>cairo_new_path, <a class="indexterm" href="cairo-Paths.html#id2579085">cairo_new_path ()</a> </dt> -<dt>cairo_new_sub_path, <a class="indexterm" href="cairo-Paths.html#id2579203">cairo_new_sub_path ()</a> +<dt>cairo_new_sub_path, <a class="indexterm" href="cairo-Paths.html#id2579147">cairo_new_sub_path ()</a> </dt> -<dt>cairo_operator_t, <a class="indexterm" href="cairo-cairo-t.html#id2635181">enum cairo_operator_t</a> +<dt>cairo_operator_t, <a class="indexterm" href="cairo-cairo-t.html#id2635285">enum cairo_operator_t</a> </dt> -<dt>cairo_paint, <a class="indexterm" href="cairo-cairo-t.html#id2637457">cairo_paint ()</a> +<dt>cairo_paint, <a class="indexterm" href="cairo-cairo-t.html#id2637561">cairo_paint ()</a> </dt> -<dt>cairo_paint_with_alpha, <a class="indexterm" href="cairo-cairo-t.html#id2637522">cairo_paint_with_alpha ()</a> +<dt>cairo_paint_with_alpha, <a class="indexterm" href="cairo-cairo-t.html#id2637626">cairo_paint_with_alpha ()</a> </dt> -<dt>cairo_path_data_t, <a class="indexterm" href="cairo-Paths.html#id2624841">union cairo_path_data_t</a> +<dt>cairo_path_data_t, <a class="indexterm" href="cairo-Paths.html#id2624920">union cairo_path_data_t</a> </dt> -<dt>cairo_path_data_type_t, <a class="indexterm" href="cairo-Paths.html#id2626669">enum cairo_path_data_type_t</a> +<dt>cairo_path_data_type_t, <a class="indexterm" href="cairo-Paths.html#id2614928">enum cairo_path_data_type_t</a> </dt> -<dt>cairo_path_destroy, <a class="indexterm" href="cairo-Paths.html#id2578556">cairo_path_destroy ()</a> +<dt>cairo_path_destroy, <a class="indexterm" href="cairo-Paths.html#id2578503">cairo_path_destroy ()</a> </dt> -<dt>cairo_path_t, <a class="indexterm" href="cairo-Paths.html#id2624686">cairo_path_t</a> +<dt>cairo_path_t, <a class="indexterm" href="cairo-Paths.html#id2624765">cairo_path_t</a> </dt> -<dt>cairo_pattern_add_color_stop_rgb, <a class="indexterm" href="cairo-Patterns.html#id2640714">cairo_pattern_add_color_stop_rgb ()</a> +<dt>cairo_pattern_add_color_stop_rgb, <a class="indexterm" href="cairo-Patterns.html#id2640756">cairo_pattern_add_color_stop_rgb ()</a> </dt> -<dt>cairo_pattern_add_color_stop_rgba, <a class="indexterm" href="cairo-Patterns.html#id2640911">cairo_pattern_add_color_stop_rgba ()</a> +<dt>cairo_pattern_add_color_stop_rgba, <a class="indexterm" href="cairo-Patterns.html#id2640954">cairo_pattern_add_color_stop_rgba ()</a> </dt> -<dt>cairo_pattern_create_for_surface, <a class="indexterm" href="cairo-Patterns.html#id2642033">cairo_pattern_create_for_surface ()</a> +<dt>cairo_pattern_create_for_surface, <a class="indexterm" href="cairo-Patterns.html#id2642109">cairo_pattern_create_for_surface ()</a> </dt> -<dt>cairo_pattern_create_linear, <a class="indexterm" href="cairo-Patterns.html#id2642271">cairo_pattern_create_linear ()</a> +<dt>cairo_pattern_create_linear, <a class="indexterm" href="cairo-Patterns.html#id2642347">cairo_pattern_create_linear ()</a> </dt> -<dt>cairo_pattern_create_radial, <a class="indexterm" href="cairo-Patterns.html#id2642679">cairo_pattern_create_radial ()</a> +<dt>cairo_pattern_create_radial, <a class="indexterm" href="cairo-Patterns.html#id2642755">cairo_pattern_create_radial ()</a> </dt> -<dt>cairo_pattern_create_rgb, <a class="indexterm" href="cairo-Patterns.html#id2641530">cairo_pattern_create_rgb ()</a> +<dt>cairo_pattern_create_rgb, <a class="indexterm" href="cairo-Patterns.html#id2641606">cairo_pattern_create_rgb ()</a> </dt> -<dt>cairo_pattern_create_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641666">cairo_pattern_create_rgba ()</a> +<dt>cairo_pattern_create_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641742">cairo_pattern_create_rgba ()</a> </dt> -<dt>cairo_pattern_destroy, <a class="indexterm" href="cairo-Patterns.html#id2643303">cairo_pattern_destroy ()</a> +<dt>cairo_pattern_destroy, <a class="indexterm" href="cairo-Patterns.html#id2643379">cairo_pattern_destroy ()</a> </dt> -<dt>cairo_pattern_get_color_stop_count, <a class="indexterm" href="cairo-Patterns.html#id2641097">cairo_pattern_get_color_stop_count ()</a> +<dt>cairo_pattern_get_color_stop_count, <a class="indexterm" href="cairo-Patterns.html#id2641174">cairo_pattern_get_color_stop_count ()</a> </dt> -<dt>cairo_pattern_get_color_stop_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641232">cairo_pattern_get_color_stop_rgba ()</a> +<dt>cairo_pattern_get_color_stop_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641323">cairo_pattern_get_color_stop_rgba ()</a> </dt> -<dt>cairo_pattern_get_extend, <a class="indexterm" href="cairo-Patterns.html#id2643705">cairo_pattern_get_extend ()</a> +<dt>cairo_pattern_get_extend, <a class="indexterm" href="cairo-Patterns.html#id2643781">cairo_pattern_get_extend ()</a> </dt> -<dt>cairo_pattern_get_filter, <a class="indexterm" href="cairo-Patterns.html#id2643933">cairo_pattern_get_filter ()</a> +<dt>cairo_pattern_get_filter, <a class="indexterm" href="cairo-Patterns.html#id2643983">cairo_pattern_get_filter ()</a> </dt> -<dt>cairo_pattern_get_linear_points, <a class="indexterm" href="cairo-Patterns.html#id2642460">cairo_pattern_get_linear_points ()</a> +<dt>cairo_pattern_get_linear_points, <a class="indexterm" href="cairo-Patterns.html#id2642536">cairo_pattern_get_linear_points ()</a> </dt> -<dt>cairo_pattern_get_matrix, <a class="indexterm" href="cairo-Patterns.html#id2644185">cairo_pattern_get_matrix ()</a> +<dt>cairo_pattern_get_matrix, <a class="indexterm" href="cairo-Patterns.html#id2644229">cairo_pattern_get_matrix ()</a> </dt> -<dt>cairo_pattern_get_radial_circles, <a class="indexterm" href="cairo-Patterns.html#id2642908">cairo_pattern_get_radial_circles ()</a> +<dt>cairo_pattern_get_radial_circles, <a class="indexterm" href="cairo-Patterns.html#id2642984">cairo_pattern_get_radial_circles ()</a> </dt> -<dt>cairo_pattern_get_reference_count, <a class="indexterm" href="cairo-Patterns.html#id2644618">cairo_pattern_get_reference_count ()</a> +<dt>cairo_pattern_get_reference_count, <a class="indexterm" href="cairo-Patterns.html#id2644663">cairo_pattern_get_reference_count ()</a> </dt> -<dt>cairo_pattern_get_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641822">cairo_pattern_get_rgba ()</a> +<dt>cairo_pattern_get_rgba, <a class="indexterm" href="cairo-Patterns.html#id2641898">cairo_pattern_get_rgba ()</a> </dt> -<dt>cairo_pattern_get_surface, <a class="indexterm" href="cairo-Patterns.html#id2642128">cairo_pattern_get_surface ()</a> +<dt>cairo_pattern_get_surface, <a class="indexterm" href="cairo-Patterns.html#id2642204">cairo_pattern_get_surface ()</a> </dt> -<dt>cairo_pattern_get_type, <a class="indexterm" href="cairo-Patterns.html#id2644512">cairo_pattern_get_type ()</a> +<dt>cairo_pattern_get_type, <a class="indexterm" href="cairo-Patterns.html#id2644557">cairo_pattern_get_type ()</a> </dt> -<dt>cairo_pattern_get_user_data, <a class="indexterm" href="cairo-Patterns.html#id2644956">cairo_pattern_get_user_data ()</a> +<dt>cairo_pattern_get_user_data, <a class="indexterm" href="cairo-Patterns.html#id2645001">cairo_pattern_get_user_data ()</a> </dt> -<dt>cairo_pattern_reference, <a class="indexterm" href="cairo-Patterns.html#id2643187">cairo_pattern_reference ()</a> +<dt>cairo_pattern_reference, <a class="indexterm" href="cairo-Patterns.html#id2643263">cairo_pattern_reference ()</a> </dt> -<dt>cairo_pattern_set_extend, <a class="indexterm" href="cairo-Patterns.html#id2643609">cairo_pattern_set_extend ()</a> +<dt>cairo_pattern_set_extend, <a class="indexterm" href="cairo-Patterns.html#id2643685">cairo_pattern_set_extend ()</a> </dt> -<dt>cairo_pattern_set_filter, <a class="indexterm" href="cairo-Patterns.html#id2643823">cairo_pattern_set_filter ()</a> +<dt>cairo_pattern_set_filter, <a class="indexterm" href="cairo-Patterns.html#id2643888">cairo_pattern_set_filter ()</a> </dt> -<dt>cairo_pattern_set_matrix, <a class="indexterm" href="cairo-Patterns.html#id2644024">cairo_pattern_set_matrix ()</a> +<dt>cairo_pattern_set_matrix, <a class="indexterm" href="cairo-Patterns.html#id2644068">cairo_pattern_set_matrix ()</a> </dt> -<dt>cairo_pattern_set_user_data, <a class="indexterm" href="cairo-Patterns.html#id2644725">cairo_pattern_set_user_data ()</a> +<dt>cairo_pattern_set_user_data, <a class="indexterm" href="cairo-Patterns.html#id2644769">cairo_pattern_set_user_data ()</a> </dt> -<dt>cairo_pattern_status, <a class="indexterm" href="cairo-Patterns.html#id2643385">cairo_pattern_status ()</a> +<dt>cairo_pattern_status, <a class="indexterm" href="cairo-Patterns.html#id2643461">cairo_pattern_status ()</a> </dt> -<dt>cairo_pattern_t, <a class="indexterm" href="cairo-Patterns.html#id2640604">cairo_pattern_t</a> +<dt>cairo_pattern_t, <a class="indexterm" href="cairo-Patterns.html#id2640646">cairo_pattern_t</a> </dt> -<dt>cairo_pattern_type_t, <a class="indexterm" href="cairo-Patterns.html#id2644285">enum cairo_pattern_type_t</a> +<dt>cairo_pattern_type_t, <a class="indexterm" href="cairo-Patterns.html#id2644329">enum cairo_pattern_type_t</a> </dt> -<dt>cairo_pdf_surface_create, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2602857">cairo_pdf_surface_create ()</a> +<dt>cairo_pdf_surface_create, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2622684">cairo_pdf_surface_create ()</a> </dt> -<dt>cairo_pdf_surface_create_for_stream, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2627638">cairo_pdf_surface_create_for_stream ()</a> +<dt>cairo_pdf_surface_create_for_stream, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2588757">cairo_pdf_surface_create_for_stream ()</a> </dt> -<dt>cairo_pdf_surface_set_size, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2655885">cairo_pdf_surface_set_size ()</a> +<dt>cairo_pdf_surface_set_size, <a class="indexterm" href="cairo-PDF-Surfaces.html#id2656659">cairo_pdf_surface_set_size ()</a> </dt> -<dt>cairo_pop_group, <a class="indexterm" href="cairo-cairo-t.html#id2605709">cairo_pop_group ()</a> +<dt>cairo_pop_group, <a class="indexterm" href="cairo-cairo-t.html#id2631786">cairo_pop_group ()</a> </dt> -<dt>cairo_pop_group_to_source, <a class="indexterm" href="cairo-cairo-t.html#id2632078">cairo_pop_group_to_source ()</a> +<dt>cairo_pop_group_to_source, <a class="indexterm" href="cairo-cairo-t.html#id2631919">cairo_pop_group_to_source ()</a> </dt> -<dt>cairo_ps_get_levels, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2663935">cairo_ps_get_levels ()</a> +<dt>cairo_ps_get_levels, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664004">cairo_ps_get_levels ()</a> </dt> -<dt>cairo_ps_level_t, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2657507">enum cairo_ps_level_t</a> +<dt>cairo_ps_level_t, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2655229">enum cairo_ps_level_t</a> </dt> -<dt>cairo_ps_level_to_string, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664028">cairo_ps_level_to_string ()</a> +<dt>cairo_ps_level_to_string, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664098">cairo_ps_level_to_string ()</a> </dt> -<dt>cairo_ps_surface_create, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2663142">cairo_ps_surface_create ()</a> +<dt>cairo_ps_surface_create, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2654725">cairo_ps_surface_create ()</a> </dt> -<dt>cairo_ps_surface_create_for_stream, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2657173">cairo_ps_surface_create_for_stream ()</a> +<dt>cairo_ps_surface_create_for_stream, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2654895">cairo_ps_surface_create_for_stream ()</a> </dt> -<dt>cairo_ps_surface_dsc_begin_page_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664584">cairo_ps_surface_dsc_begin_page_setup ()</a> +<dt>cairo_ps_surface_dsc_begin_page_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664654">cairo_ps_surface_dsc_begin_page_setup ()</a> </dt> -<dt>cairo_ps_surface_dsc_begin_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664468">cairo_ps_surface_dsc_begin_setup ()</a> +<dt>cairo_ps_surface_dsc_begin_setup, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664539">cairo_ps_surface_dsc_begin_setup ()</a> </dt> -<dt>cairo_ps_surface_dsc_comment, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664700">cairo_ps_surface_dsc_comment ()</a> +<dt>cairo_ps_surface_dsc_comment, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664771">cairo_ps_surface_dsc_comment ()</a> </dt> -<dt>cairo_ps_surface_get_eps, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664241">cairo_ps_surface_get_eps ()</a> +<dt>cairo_ps_surface_get_eps, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664312">cairo_ps_surface_get_eps ()</a> </dt> -<dt>cairo_ps_surface_restrict_to_level, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2657384">cairo_ps_surface_restrict_to_level ()</a> +<dt>cairo_ps_surface_restrict_to_level, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2655104">cairo_ps_surface_restrict_to_level ()</a> </dt> -<dt>cairo_ps_surface_set_eps, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664133">cairo_ps_surface_set_eps ()</a> +<dt>cairo_ps_surface_set_eps, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664204">cairo_ps_surface_set_eps ()</a> </dt> -<dt>cairo_ps_surface_set_size, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664324">cairo_ps_surface_set_size ()</a> +<dt>cairo_ps_surface_set_size, <a class="indexterm" href="cairo-PostScript-Surfaces.html#id2664395">cairo_ps_surface_set_size ()</a> </dt> -<dt>cairo_push_group, <a class="indexterm" href="cairo-cairo-t.html#id2631613">cairo_push_group ()</a> +<dt>cairo_push_group, <a class="indexterm" href="cairo-cairo-t.html#id2631473">cairo_push_group ()</a> </dt> -<dt>cairo_push_group_with_content, <a class="indexterm" href="cairo-cairo-t.html#id2631810">cairo_push_group_with_content ()</a> +<dt>cairo_push_group_with_content, <a class="indexterm" href="cairo-cairo-t.html#id2631650">cairo_push_group_with_content ()</a> </dt> -<dt>cairo_read_func_t, <a class="indexterm" href="cairo-PNG-Support.html#id2658016">cairo_read_func_t ()</a> +<dt>cairo_read_func_t, <a class="indexterm" href="cairo-PNG-Support.html#id2658176">cairo_read_func_t ()</a> </dt> -<dt>cairo_rectangle, <a class="indexterm" href="cairo-Paths.html#id2580578">cairo_rectangle ()</a> +<dt>cairo_rectangle, <a class="indexterm" href="cairo-Paths.html#id2580522">cairo_rectangle ()</a> </dt> -<dt>cairo_rectangle_list_destroy, <a class="indexterm" href="cairo-cairo-t.html#id2636438">cairo_rectangle_list_destroy ()</a> +<dt>cairo_rectangle_list_destroy, <a class="indexterm" href="cairo-cairo-t.html#id2636542">cairo_rectangle_list_destroy ()</a> </dt> -<dt>cairo_rectangle_list_t, <a class="indexterm" href="cairo-cairo-t.html#id2636323">cairo_rectangle_list_t</a> +<dt>cairo_rectangle_list_t, <a class="indexterm" href="cairo-cairo-t.html#id2636427">cairo_rectangle_list_t</a> </dt> -<dt>cairo_rectangle_t, <a class="indexterm" href="cairo-cairo-t.html#id2636190">cairo_rectangle_t</a> +<dt>cairo_rectangle_t, <a class="indexterm" href="cairo-cairo-t.html#id2636294">cairo_rectangle_t</a> </dt> -<dt>cairo_reference, <a class="indexterm" href="cairo-cairo-t.html#id2630896">cairo_reference ()</a> +<dt>cairo_reference, <a class="indexterm" href="cairo-cairo-t.html#id2630834">cairo_reference ()</a> </dt> -<dt>cairo_rel_curve_to, <a class="indexterm" href="cairo-Paths.html#id2581032">cairo_rel_curve_to ()</a> +<dt>cairo_rel_curve_to, <a class="indexterm" href="cairo-Paths.html#id2580977">cairo_rel_curve_to ()</a> </dt> -<dt>cairo_rel_line_to, <a class="indexterm" href="cairo-Paths.html#id2581386">cairo_rel_line_to ()</a> +<dt>cairo_rel_line_to, <a class="indexterm" href="cairo-Paths.html#id2581332">cairo_rel_line_to ()</a> </dt> -<dt>cairo_rel_move_to, <a class="indexterm" href="cairo-Paths.html#id2581581">cairo_rel_move_to ()</a> +<dt>cairo_rel_move_to, <a class="indexterm" href="cairo-Paths.html#id2581527">cairo_rel_move_to ()</a> </dt> -<dt>cairo_reset_clip, <a class="indexterm" href="cairo-cairo-t.html#id2636068">cairo_reset_clip ()</a> +<dt>cairo_reset_clip, <a class="indexterm" href="cairo-cairo-t.html#id2636172">cairo_reset_clip ()</a> </dt> -<dt>cairo_restore, <a class="indexterm" href="cairo-cairo-t.html#id2631373">cairo_restore ()</a> +<dt>cairo_restore, <a class="indexterm" href="cairo-cairo-t.html#id2631258">cairo_restore ()</a> </dt> -<dt>cairo_rotate, <a class="indexterm" href="cairo-Transformations.html#id2628352">cairo_rotate ()</a> +<dt>cairo_rotate, <a class="indexterm" href="cairo-Transformations.html#id2576746">cairo_rotate ()</a> </dt> -<dt>cairo_save, <a class="indexterm" href="cairo-cairo-t.html#id2631198">cairo_save ()</a> +<dt>cairo_save, <a class="indexterm" href="cairo-cairo-t.html#id2631102">cairo_save ()</a> </dt> -<dt>cairo_scale, <a class="indexterm" href="cairo-Transformations.html#id2628233">cairo_scale ()</a> +<dt>cairo_scale, <a class="indexterm" href="cairo-Transformations.html#id2576553">cairo_scale ()</a> </dt> -<dt>cairo_scaled_font_create, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2577030">cairo_scaled_font_create ()</a> +<dt>cairo_scaled_font_create, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2648572">cairo_scaled_font_create ()</a> </dt> -<dt>cairo_scaled_font_destroy, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2582201">cairo_scaled_font_destroy ()</a> +<dt>cairo_scaled_font_destroy, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2594622">cairo_scaled_font_destroy ()</a> </dt> -<dt>cairo_scaled_font_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2649973">cairo_scaled_font_extents ()</a> +<dt>cairo_scaled_font_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650005">cairo_scaled_font_extents ()</a> </dt> -<dt>cairo_scaled_font_get_ctm, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650852">cairo_scaled_font_get_ctm ()</a> +<dt>cairo_scaled_font_get_ctm, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650935">cairo_scaled_font_get_ctm ()</a> </dt> -<dt>cairo_scaled_font_get_font_face, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650554">cairo_scaled_font_get_font_face ()</a> +<dt>cairo_scaled_font_get_font_face, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650636">cairo_scaled_font_get_font_face ()</a> </dt> -<dt>cairo_scaled_font_get_font_matrix, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650750">cairo_scaled_font_get_font_matrix ()</a> +<dt>cairo_scaled_font_get_font_matrix, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650832">cairo_scaled_font_get_font_matrix ()</a> </dt> -<dt>cairo_scaled_font_get_font_options, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650647">cairo_scaled_font_get_font_options ()</a> +<dt>cairo_scaled_font_get_font_options, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650730">cairo_scaled_font_get_font_options ()</a> </dt> -<dt>cairo_scaled_font_get_reference_count, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651043">cairo_scaled_font_get_reference_count ()</a> +<dt>cairo_scaled_font_get_reference_count, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651126">cairo_scaled_font_get_reference_count ()</a> </dt> -<dt>cairo_scaled_font_get_type, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650951">cairo_scaled_font_get_type ()</a> +<dt>cairo_scaled_font_get_type, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651034">cairo_scaled_font_get_type ()</a> </dt> -<dt>cairo_scaled_font_get_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651344">cairo_scaled_font_get_user_data ()</a> +<dt>cairo_scaled_font_get_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651427">cairo_scaled_font_get_user_data ()</a> </dt> -<dt>cairo_scaled_font_glyph_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650385">cairo_scaled_font_glyph_extents ()</a> +<dt>cairo_scaled_font_glyph_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650472">cairo_scaled_font_glyph_extents ()</a> </dt> -<dt>cairo_scaled_font_reference, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2582071">cairo_scaled_font_reference ()</a> +<dt>cairo_scaled_font_reference, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2594492">cairo_scaled_font_reference ()</a> </dt> -<dt>cairo_scaled_font_set_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651140">cairo_scaled_font_set_user_data ()</a> +<dt>cairo_scaled_font_set_user_data, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2651222">cairo_scaled_font_set_user_data ()</a> </dt> -<dt>cairo_scaled_font_status, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2649663">cairo_scaled_font_status ()</a> +<dt>cairo_scaled_font_status, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2649695">cairo_scaled_font_status ()</a> </dt> -<dt>cairo_scaled_font_t, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2576939">cairo_scaled_font_t</a> +<dt>cairo_scaled_font_t, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2648481">cairo_scaled_font_t</a> </dt> -<dt>cairo_scaled_font_text_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650229">cairo_scaled_font_text_extents ()</a> +<dt>cairo_scaled_font_text_extents, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650300">cairo_scaled_font_text_extents ()</a> </dt> -<dt>cairo_select_font_face, <a class="indexterm" href="cairo-Text.html#id2628838">cairo_select_font_face ()</a> +<dt>cairo_select_font_face, <a class="indexterm" href="cairo-Text.html#id2628438">cairo_select_font_face ()</a> </dt> -<dt>cairo_set_antialias, <a class="indexterm" href="cairo-cairo-t.html#id2633128">cairo_set_antialias ()</a> +<dt>cairo_set_antialias, <a class="indexterm" href="cairo-cairo-t.html#id2633060">cairo_set_antialias ()</a> </dt> -<dt>cairo_set_dash, <a class="indexterm" href="cairo-cairo-t.html#id2633307">cairo_set_dash ()</a> +<dt>cairo_set_dash, <a class="indexterm" href="cairo-cairo-t.html#id2633264">cairo_set_dash ()</a> </dt> -<dt>cairo_set_fill_rule, <a class="indexterm" href="cairo-cairo-t.html#id2633870">cairo_set_fill_rule ()</a> +<dt>cairo_set_fill_rule, <a class="indexterm" href="cairo-cairo-t.html#id2633897">cairo_set_fill_rule ()</a> </dt> -<dt>cairo_set_font_face, <a class="indexterm" href="cairo-Text.html#id2645538">cairo_set_font_face ()</a> +<dt>cairo_set_font_face, <a class="indexterm" href="cairo-Text.html#id2645604">cairo_set_font_face ()</a> </dt> -<dt>cairo_set_font_matrix, <a class="indexterm" href="cairo-Text.html#id2645126">cairo_set_font_matrix ()</a> +<dt>cairo_set_font_matrix, <a class="indexterm" href="cairo-Text.html#id2645170">cairo_set_font_matrix ()</a> </dt> -<dt>cairo_set_font_options, <a class="indexterm" href="cairo-Text.html#id2645335">cairo_set_font_options ()</a> +<dt>cairo_set_font_options, <a class="indexterm" href="cairo-Text.html#id2645376">cairo_set_font_options ()</a> </dt> -<dt>cairo_set_font_size, <a class="indexterm" href="cairo-Text.html#id2628976">cairo_set_font_size ()</a> +<dt>cairo_set_font_size, <a class="indexterm" href="cairo-Text.html#id2628576">cairo_set_font_size ()</a> </dt> -<dt>cairo_set_line_cap, <a class="indexterm" href="cairo-cairo-t.html#id2634151">cairo_set_line_cap ()</a> +<dt>cairo_set_line_cap, <a class="indexterm" href="cairo-cairo-t.html#id2634222">cairo_set_line_cap ()</a> </dt> -<dt>cairo_set_line_join, <a class="indexterm" href="cairo-cairo-t.html#id2634453">cairo_set_line_join ()</a> +<dt>cairo_set_line_join, <a class="indexterm" href="cairo-cairo-t.html#id2634557">cairo_set_line_join ()</a> </dt> -<dt>cairo_set_line_width, <a class="indexterm" href="cairo-cairo-t.html#id2634667">cairo_set_line_width ()</a> +<dt>cairo_set_line_width, <a class="indexterm" href="cairo-cairo-t.html#id2634771">cairo_set_line_width ()</a> </dt> -<dt>cairo_set_matrix, <a class="indexterm" href="cairo-Transformations.html#id2589038">cairo_set_matrix ()</a> +<dt>cairo_set_matrix, <a class="indexterm" href="cairo-Transformations.html#id2626555">cairo_set_matrix ()</a> </dt> -<dt>cairo_set_miter_limit, <a class="indexterm" href="cairo-cairo-t.html#id2634948">cairo_set_miter_limit ()</a> +<dt>cairo_set_miter_limit, <a class="indexterm" href="cairo-cairo-t.html#id2635052">cairo_set_miter_limit ()</a> </dt> -<dt>cairo_set_operator, <a class="indexterm" href="cairo-cairo-t.html#id2635217">cairo_set_operator ()</a> +<dt>cairo_set_operator, <a class="indexterm" href="cairo-cairo-t.html#id2635321">cairo_set_operator ()</a> </dt> -<dt>cairo_set_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645783">cairo_set_scaled_font ()</a> +<dt>cairo_set_scaled_font, <a class="indexterm" href="cairo-Text.html#id2645877">cairo_set_scaled_font ()</a> </dt> -<dt>cairo_set_source, <a class="indexterm" href="cairo-cairo-t.html#id2632606">cairo_set_source ()</a> +<dt>cairo_set_source, <a class="indexterm" href="cairo-cairo-t.html#id2632491">cairo_set_source ()</a> </dt> -<dt>cairo_set_source_rgb, <a class="indexterm" href="cairo-cairo-t.html#id2632336">cairo_set_source_rgb ()</a> +<dt>cairo_set_source_rgb, <a class="indexterm" href="cairo-cairo-t.html#id2632221">cairo_set_source_rgb ()</a> </dt> -<dt>cairo_set_source_rgba, <a class="indexterm" href="cairo-cairo-t.html#id2632462">cairo_set_source_rgba ()</a> +<dt>cairo_set_source_rgba, <a class="indexterm" href="cairo-cairo-t.html#id2632346">cairo_set_source_rgba ()</a> </dt> -<dt>cairo_set_source_surface, <a class="indexterm" href="cairo-cairo-t.html#id2632730">cairo_set_source_surface ()</a> +<dt>cairo_set_source_surface, <a class="indexterm" href="cairo-cairo-t.html#id2632614">cairo_set_source_surface ()</a> </dt> -<dt>cairo_set_tolerance, <a class="indexterm" href="cairo-cairo-t.html#id2635408">cairo_set_tolerance ()</a> +<dt>cairo_set_tolerance, <a class="indexterm" href="cairo-cairo-t.html#id2635511">cairo_set_tolerance ()</a> </dt> -<dt>cairo_set_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638599">cairo_set_user_data ()</a> +<dt>cairo_set_user_data, <a class="indexterm" href="cairo-cairo-t.html#id2638703">cairo_set_user_data ()</a> </dt> -<dt>cairo_show_glyphs, <a class="indexterm" href="cairo-Text.html#id2646181">cairo_show_glyphs ()</a> +<dt>cairo_show_glyphs, <a class="indexterm" href="cairo-Text.html#id2646259">cairo_show_glyphs ()</a> </dt> -<dt>cairo_show_page, <a class="indexterm" href="cairo-cairo-t.html#id2638399">cairo_show_page ()</a> +<dt>cairo_show_page, <a class="indexterm" href="cairo-cairo-t.html#id2638503">cairo_show_page ()</a> </dt> -<dt>cairo_show_text, <a class="indexterm" href="cairo-Text.html#id2646056">cairo_show_text ()</a> +<dt>cairo_show_text, <a class="indexterm" href="cairo-Text.html#id2646133">cairo_show_text ()</a> </dt> -<dt>cairo_status, <a class="indexterm" href="cairo-cairo-t.html#id2631117">cairo_status ()</a> +<dt>cairo_status, <a class="indexterm" href="cairo-cairo-t.html#id2631030">cairo_status ()</a> </dt> -<dt>cairo_status_t, <a class="indexterm" href="cairo-Error-Handling.html#id2667034">enum cairo_status_t</a> +<dt>cairo_status_t, <a class="indexterm" href="cairo-Error-Handling.html#id2663656">cairo_status_t ()</a> </dt> -<dt>cairo_status_to_string, <a class="indexterm" href="cairo-Error-Handling.html#id2669457">cairo_status_to_string ()</a> +<dt>cairo_status_to_string, <a class="indexterm" href="cairo-Error-Handling.html#id2662323">cairo_status_to_string ()</a> </dt> -<dt>cairo_stroke, <a class="indexterm" href="cairo-cairo-t.html#id2637626">cairo_stroke ()</a> +<dt>cairo_stroke, <a class="indexterm" href="cairo-cairo-t.html#id2637730">cairo_stroke ()</a> </dt> -<dt>cairo_stroke_extents, <a class="indexterm" href="cairo-cairo-t.html#id2637947">cairo_stroke_extents ()</a> +<dt>cairo_stroke_extents, <a class="indexterm" href="cairo-cairo-t.html#id2638051">cairo_stroke_extents ()</a> </dt> -<dt>cairo_stroke_preserve, <a class="indexterm" href="cairo-cairo-t.html#id2637818">cairo_stroke_preserve ()</a> +<dt>cairo_stroke_preserve, <a class="indexterm" href="cairo-cairo-t.html#id2637922">cairo_stroke_preserve ()</a> </dt> -<dt>cairo_subpixel_order_t, <a class="indexterm" href="cairo-Font-Options.html#id2652658">enum cairo_subpixel_order_t</a> +<dt>cairo_subpixel_order_t, <a class="indexterm" href="cairo-Font-Options.html#id2652740">enum cairo_subpixel_order_t</a> </dt> -<dt>cairo_surface_copy_page, <a class="indexterm" href="cairo-cairo-surface-t.html#id2661070">cairo_surface_copy_page ()</a> +<dt>cairo_surface_copy_page, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660940">cairo_surface_copy_page ()</a> </dt> -<dt>cairo_surface_create_similar, <a class="indexterm" href="cairo-cairo-surface-t.html#id2653773">cairo_surface_create_similar ()</a> +<dt>cairo_surface_create_similar, <a class="indexterm" href="cairo-cairo-surface-t.html#id2653846">cairo_surface_create_similar ()</a> </dt> -<dt>cairo_surface_destroy, <a class="indexterm" href="cairo-cairo-surface-t.html#id2658809">cairo_surface_destroy ()</a> +<dt>cairo_surface_destroy, <a class="indexterm" href="cairo-cairo-surface-t.html#id2658853">cairo_surface_destroy ()</a> </dt> -<dt>cairo_surface_finish, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659045">cairo_surface_finish ()</a> +<dt>cairo_surface_finish, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659058">cairo_surface_finish ()</a> </dt> -<dt>cairo_surface_flush, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659152">cairo_surface_flush ()</a> +<dt>cairo_surface_flush, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659157">cairo_surface_flush ()</a> </dt> -<dt>cairo_surface_get_content, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659340">cairo_surface_get_content ()</a> +<dt>cairo_surface_get_content, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659326">cairo_surface_get_content ()</a> </dt> -<dt>cairo_surface_get_device_offset, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659860">cairo_surface_get_device_offset ()</a> +<dt>cairo_surface_get_device_offset, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659798">cairo_surface_get_device_offset ()</a> </dt> -<dt>cairo_surface_get_font_options, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659227">cairo_surface_get_font_options ()</a> +<dt>cairo_surface_get_font_options, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659223">cairo_surface_get_font_options ()</a> </dt> -<dt>cairo_surface_get_reference_count, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660670">cairo_surface_get_reference_count ()</a> +<dt>cairo_surface_get_reference_count, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660541">cairo_surface_get_reference_count ()</a> </dt> -<dt>cairo_surface_get_type, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660569">cairo_surface_get_type ()</a> +<dt>cairo_surface_get_type, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660450">cairo_surface_get_type ()</a> </dt> -<dt>cairo_surface_get_user_data, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660948">cairo_surface_get_user_data ()</a> +<dt>cairo_surface_get_user_data, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660818">cairo_surface_get_user_data ()</a> </dt> -<dt>cairo_surface_mark_dirty, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659449">cairo_surface_mark_dirty ()</a> +<dt>cairo_surface_mark_dirty, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659424">cairo_surface_mark_dirty ()</a> </dt> -<dt>cairo_surface_mark_dirty_rectangle, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659529">cairo_surface_mark_dirty_rectangle ()</a> +<dt>cairo_surface_mark_dirty_rectangle, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659496">cairo_surface_mark_dirty_rectangle ()</a> </dt> -<dt>cairo_surface_reference, <a class="indexterm" href="cairo-cairo-surface-t.html#id2658690">cairo_surface_reference ()</a> +<dt>cairo_surface_reference, <a class="indexterm" href="cairo-cairo-surface-t.html#id2658731">cairo_surface_reference ()</a> </dt> -<dt>cairo_surface_set_device_offset, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659702">cairo_surface_set_device_offset ()</a> +<dt>cairo_surface_set_device_offset, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659653">cairo_surface_set_device_offset ()</a> </dt> -<dt>cairo_surface_set_fallback_resolution, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659996">cairo_surface_set_fallback_resolution ()</a> +<dt>cairo_surface_set_fallback_resolution, <a class="indexterm" href="cairo-cairo-surface-t.html#id2659920">cairo_surface_set_fallback_resolution ()</a> </dt> -<dt>cairo_surface_set_user_data, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660776">cairo_surface_set_user_data ()</a> +<dt>cairo_surface_set_user_data, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660636">cairo_surface_set_user_data ()</a> </dt> -<dt>cairo_surface_show_page, <a class="indexterm" href="cairo-cairo-surface-t.html#id2661155">cairo_surface_show_page ()</a> +<dt>cairo_surface_show_page, <a class="indexterm" href="cairo-cairo-surface-t.html#id2661024">cairo_surface_show_page ()</a> </dt> -<dt>cairo_surface_status, <a class="indexterm" href="cairo-cairo-surface-t.html#id2658899">cairo_surface_status ()</a> +<dt>cairo_surface_status, <a class="indexterm" href="cairo-cairo-surface-t.html#id2658925">cairo_surface_status ()</a> </dt> -<dt>cairo_surface_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2656546">cairo_surface_t</a> +<dt>cairo_surface_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2656914">cairo_surface_t</a> </dt> -<dt>cairo_surface_type_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660170">enum cairo_surface_type_t</a> +<dt>cairo_surface_type_t, <a class="indexterm" href="cairo-cairo-surface-t.html#id2660079">enum cairo_surface_type_t</a> </dt> -<dt>cairo_surface_write_to_png, <a class="indexterm" href="cairo-PNG-Support.html#id2656752">cairo_surface_write_to_png ()</a> +<dt>cairo_surface_write_to_png, <a class="indexterm" href="cairo-PNG-Support.html#id2658431">cairo_surface_write_to_png ()</a> </dt> -<dt>cairo_surface_write_to_png_stream, <a class="indexterm" href="cairo-PNG-Support.html#id2656998">cairo_surface_write_to_png_stream ()</a> +<dt>cairo_surface_write_to_png_stream, <a class="indexterm" href="cairo-PNG-Support.html#id2654560">cairo_surface_write_to_png_stream ()</a> </dt> -<dt>cairo_svg_get_versions, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661484">cairo_svg_get_versions ()</a> +<dt>cairo_svg_get_versions, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661348">cairo_svg_get_versions ()</a> </dt> -<dt>cairo_svg_surface_create, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655278">cairo_svg_surface_create ()</a> +<dt>cairo_svg_surface_create, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2663007">cairo_svg_surface_create ()</a> </dt> -<dt>cairo_svg_surface_create_for_stream, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655424">cairo_svg_surface_create_for_stream ()</a> +<dt>cairo_svg_surface_create_for_stream, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655736">cairo_svg_surface_create_for_stream ()</a> </dt> -<dt>cairo_svg_surface_restrict_to_version, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655609">cairo_svg_surface_restrict_to_version ()</a> +<dt>cairo_svg_surface_restrict_to_version, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655922">cairo_svg_surface_restrict_to_version ()</a> </dt> -<dt>cairo_svg_version_t, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2655734">enum cairo_svg_version_t</a> +<dt>cairo_svg_version_t, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2656044">enum cairo_svg_version_t</a> </dt> -<dt>cairo_svg_version_to_string, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661586">cairo_svg_version_to_string ()</a> +<dt>cairo_svg_version_to_string, <a class="indexterm" href="cairo-SVG-Surfaces.html#id2661451">cairo_svg_version_to_string ()</a> </dt> -<dt>cairo_t, <a class="indexterm" href="cairo-cairo-t.html#id2630619">cairo_t</a> +<dt>cairo_t, <a class="indexterm" href="cairo-cairo-t.html#id2630584">cairo_t</a> </dt> -<dt>cairo_text_extents, <a class="indexterm" href="cairo-Text.html#id2646365">cairo_text_extents ()</a> +<dt>cairo_text_extents, <a class="indexterm" href="cairo-Text.html#id2646442">cairo_text_extents ()</a> </dt> -<dt>cairo_text_extents_t, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650056">cairo_text_extents_t</a> +<dt>cairo_text_extents_t, <a class="indexterm" href="cairo-Scaled-Fonts.html#id2650109">cairo_text_extents_t</a> </dt> -<dt>cairo_text_path, <a class="indexterm" href="cairo-Paths.html#id2580868">cairo_text_path ()</a> +<dt>cairo_text_path, <a class="indexterm" href="cairo-Paths.html#id2580812">cairo_text_path ()</a> </dt> -<dt>cairo_transform, <a class="indexterm" href="cairo-Transformations.html#id2588945">cairo_transform ()</a> +<dt>cairo_transform, <a class="indexterm" href="cairo-Transformations.html#id2576841">cairo_transform ()</a> </dt> -<dt>cairo_translate, <a class="indexterm" href="cairo-Transformations.html#id2588763">cairo_translate ()</a> +<dt>cairo_translate, <a class="indexterm" href="cairo-Transformations.html#id2576431">cairo_translate ()</a> </dt> -<dt>cairo_user_data_key_t, <a class="indexterm" href="cairo-Types.html#id2666855">cairo_user_data_key_t</a> +<dt>cairo_user_data_key_t, <a class="indexterm" href="cairo-Types.html#id2669741">cairo_user_data_key_t</a> </dt> -<dt>cairo_user_to_device, <a class="indexterm" href="cairo-Transformations.html#id2588275">cairo_user_to_device ()</a> +<dt>cairo_user_to_device, <a class="indexterm" href="cairo-Transformations.html#id2626801">cairo_user_to_device ()</a> </dt> -<dt>cairo_user_to_device_distance, <a class="indexterm" href="cairo-Transformations.html#id2588380">cairo_user_to_device_distance ()</a> +<dt>cairo_user_to_device_distance, <a class="indexterm" href="cairo-Transformations.html#id2628803">cairo_user_to_device_distance ()</a> </dt> -<dt>CAIRO_VERSION, <a class="indexterm" href="cairo-Version-Information.html#id2669513">CAIRO_VERSION</a> +<dt>CAIRO_VERSION, <a class="indexterm" href="cairo-Version-Information.html#id2666796">CAIRO_VERSION</a> </dt> -<dt>cairo_version, <a class="indexterm" href="cairo-Version-Information.html#id2662658">cairo_version ()</a> +<dt>cairo_version, <a class="indexterm" href="cairo-Version-Information.html#id2669443">cairo_version ()</a> </dt> -<dt>CAIRO_VERSION_ENCODE, <a class="indexterm" href="cairo-Version-Information.html#id2662560">CAIRO_VERSION_ENCODE()</a> +<dt>CAIRO_VERSION_ENCODE, <a class="indexterm" href="cairo-Version-Information.html#id2669345">CAIRO_VERSION_ENCODE()</a> </dt> -<dt>CAIRO_VERSION_MAJOR, <a class="indexterm" href="cairo-Version-Information.html#id2669550">CAIRO_VERSION_MAJOR</a> +<dt>CAIRO_VERSION_MAJOR, <a class="indexterm" href="cairo-Version-Information.html#id2666833">CAIRO_VERSION_MAJOR</a> </dt> -<dt>CAIRO_VERSION_MICRO, <a class="indexterm" href="cairo-Version-Information.html#id2669606">CAIRO_VERSION_MICRO</a> +<dt>CAIRO_VERSION_MICRO, <a class="indexterm" href="cairo-Version-Information.html#id2669288">CAIRO_VERSION_MICRO</a> </dt> -<dt>CAIRO_VERSION_MINOR, <a class="indexterm" href="cairo-Version-Information.html#id2669578">CAIRO_VERSION_MINOR</a> +<dt>CAIRO_VERSION_MINOR, <a class="indexterm" href="cairo-Version-Information.html#id2666861">CAIRO_VERSION_MINOR</a> </dt> -<dt>CAIRO_VERSION_STRING, <a class="indexterm" href="cairo-Version-Information.html#id2669634">CAIRO_VERSION_STRING</a> +<dt>CAIRO_VERSION_STRING, <a class="indexterm" href="cairo-Version-Information.html#id2669317">CAIRO_VERSION_STRING</a> </dt> -<dt>cairo_version_string, <a class="indexterm" href="cairo-Version-Information.html#id2666720">cairo_version_string ()</a> +<dt>cairo_version_string, <a class="indexterm" href="cairo-Version-Information.html#id2669547">cairo_version_string ()</a> </dt> -<dt>cairo_win32_font_face_create_for_hfont, <a class="indexterm" href="cairo-Win32-Fonts.html#id2647652">cairo_win32_font_face_create_for_hfont ()</a> +<dt>cairo_win32_font_face_create_for_hfont, <a class="indexterm" href="cairo-Win32-Fonts.html#id2646879">cairo_win32_font_face_create_for_hfont ()</a> </dt> -<dt>cairo_win32_font_face_create_for_logfontw, <a class="indexterm" href="cairo-Win32-Fonts.html#id2594776">cairo_win32_font_face_create_for_logfontw ()</a> +<dt>cairo_win32_font_face_create_for_logfontw, <a class="indexterm" href="cairo-Win32-Fonts.html#id2588565">cairo_win32_font_face_create_for_logfontw ()</a> </dt> -<dt>cairo_win32_font_face_create_for_logfontw_hfont, <a class="indexterm" href="cairo-Win32-Fonts.html#id2647804">cairo_win32_font_face_create_for_logfontw_hfont ()</a> +<dt>cairo_win32_font_face_create_for_logfontw_hfont, <a class="indexterm" href="cairo-Win32-Fonts.html#id2647030">cairo_win32_font_face_create_for_logfontw_hfont ()</a> </dt> -<dt>cairo_win32_printing_surface_create, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2654593">cairo_win32_printing_surface_create ()</a> +<dt>cairo_win32_printing_surface_create, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662836">cairo_win32_printing_surface_create ()</a> </dt> -<dt>cairo_win32_scaled_font_done_font, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648573">cairo_win32_scaled_font_done_font ()</a> +<dt>cairo_win32_scaled_font_done_font, <a class="indexterm" href="cairo-Win32-Fonts.html#id2647897">cairo_win32_scaled_font_done_font ()</a> </dt> -<dt>cairo_win32_scaled_font_get_device_to_logical, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648840">cairo_win32_scaled_font_get_device_to_logical ()</a> +<dt>cairo_win32_scaled_font_get_device_to_logical, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648162">cairo_win32_scaled_font_get_device_to_logical ()</a> </dt> -<dt>cairo_win32_scaled_font_get_logical_to_device, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648736">cairo_win32_scaled_font_get_logical_to_device ()</a> +<dt>cairo_win32_scaled_font_get_logical_to_device, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648058">cairo_win32_scaled_font_get_logical_to_device ()</a> </dt> -<dt>cairo_win32_scaled_font_get_metrics_factor, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648645">cairo_win32_scaled_font_get_metrics_factor ()</a> +<dt>cairo_win32_scaled_font_get_metrics_factor, <a class="indexterm" href="cairo-Win32-Fonts.html#id2647968">cairo_win32_scaled_font_get_metrics_factor ()</a> </dt> -<dt>cairo_win32_scaled_font_select_font, <a class="indexterm" href="cairo-Win32-Fonts.html#id2648388">cairo_win32_scaled_font_select_font ()</a> +<dt>cairo_win32_scaled_font_select_font, <a class="indexterm" href="cairo-Win32-Fonts.html#id2647711">cairo_win32_scaled_font_select_font ()</a> </dt> -<dt>cairo_win32_surface_create, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2663387">cairo_win32_surface_create ()</a> +<dt>cairo_win32_surface_create, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2655274">cairo_win32_surface_create ()</a> </dt> -<dt>cairo_win32_surface_create_with_ddb, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662956">cairo_win32_surface_create_with_ddb ()</a> +<dt>cairo_win32_surface_create_with_ddb, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662687">cairo_win32_surface_create_with_ddb ()</a> </dt> -<dt>cairo_win32_surface_create_with_dib, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2662832">cairo_win32_surface_create_with_dib ()</a> +<dt>cairo_win32_surface_create_with_dib, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2655349">cairo_win32_surface_create_with_dib ()</a> </dt> -<dt>cairo_win32_surface_get_dc, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2654686">cairo_win32_surface_get_dc ()</a> +<dt>cairo_win32_surface_get_dc, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2663340">cairo_win32_surface_get_dc ()</a> </dt> -<dt>cairo_win32_surface_get_image, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2654777">cairo_win32_surface_get_image ()</a> +<dt>cairo_win32_surface_get_image, <a class="indexterm" href="cairo-Win32-Surfaces.html#id2663431">cairo_win32_surface_get_image ()</a> </dt> -<dt>cairo_write_func_t, <a class="indexterm" href="cairo-PNG-Support.html#id2656869">cairo_write_func_t ()</a> +<dt>cairo_write_func_t, <a class="indexterm" href="cairo-PNG-Support.html#id2654431">cairo_write_func_t ()</a> </dt> -<dt>cairo_xlib_surface_create, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2661730">cairo_xlib_surface_create ()</a> +<dt>cairo_xlib_surface_create, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2661584">cairo_xlib_surface_create ()</a> </dt> -<dt>cairo_xlib_surface_create_for_bitmap, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2661932">cairo_xlib_surface_create_for_bitmap ()</a> +<dt>cairo_xlib_surface_create_for_bitmap, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2661785">cairo_xlib_surface_create_for_bitmap ()</a> </dt> -<dt>cairo_xlib_surface_get_depth, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2668054">cairo_xlib_surface_get_depth ()</a> +<dt>cairo_xlib_surface_get_depth, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2668113">cairo_xlib_surface_get_depth ()</a> </dt> -<dt>cairo_xlib_surface_get_display, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667433">cairo_xlib_surface_get_display ()</a> +<dt>cairo_xlib_surface_get_display, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667491">cairo_xlib_surface_get_display ()</a> </dt> -<dt>cairo_xlib_surface_get_drawable, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667724">cairo_xlib_surface_get_drawable ()</a> +<dt>cairo_xlib_surface_get_drawable, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667783">cairo_xlib_surface_get_drawable ()</a> </dt> -<dt>cairo_xlib_surface_get_height, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667971">cairo_xlib_surface_get_height ()</a> +<dt>cairo_xlib_surface_get_height, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2668030">cairo_xlib_surface_get_height ()</a> </dt> -<dt>cairo_xlib_surface_get_screen, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667515">cairo_xlib_surface_get_screen ()</a> +<dt>cairo_xlib_surface_get_screen, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667573">cairo_xlib_surface_get_screen ()</a> </dt> -<dt>cairo_xlib_surface_get_visual, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667806">cairo_xlib_surface_get_visual ()</a> +<dt>cairo_xlib_surface_get_visual, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667865">cairo_xlib_surface_get_visual ()</a> </dt> -<dt>cairo_xlib_surface_get_width, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667888">cairo_xlib_surface_get_width ()</a> +<dt>cairo_xlib_surface_get_width, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667947">cairo_xlib_surface_get_width ()</a> </dt> -<dt>cairo_xlib_surface_set_drawable, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667597">cairo_xlib_surface_set_drawable ()</a> +<dt>cairo_xlib_surface_set_drawable, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2667655">cairo_xlib_surface_set_drawable ()</a> </dt> -<dt>cairo_xlib_surface_set_size, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2662107">cairo_xlib_surface_set_size ()</a> +<dt>cairo_xlib_surface_set_size, <a class="indexterm" href="cairo-XLib-Surfaces.html#id2661960">cairo_xlib_surface_set_size ()</a> </dt> </dl> </div> @@ -663,7 +663,7 @@ <h3>T</h3> <dl> <dt>types</dt> -<dd><dl><dt>cairo_matrix, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2669175">Description</a> +<dd><dl><dt>cairo_matrix, <a class="indexterm" href="cairo-cairo-matrix-t.html#id2665296">Description</a> </dt></dl></dd> </dl> </div> diff --git a/doc/public/html/pt01.html b/doc/public/html/pt01.html index 6b916b4..72672a0 100644 --- a/doc/public/html/pt01.html +++ b/doc/public/html/pt01.html @@ -30,6 +30,6 @@ <td><a accesskey="n" href="pt02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr></table> <div class="part" lang="en"><div class="titlepage"><div><div><h1 class="title"> -<a name="id2566370"></a>Part I. Tutorial</h1></div></div></div></div> +<a name="id2566365"></a>Part I. Tutorial</h1></div></div></div></div> </body> </html> diff --git a/doc/public/html/pt02.html b/doc/public/html/pt02.html index cc734ab..6494e0a 100644 --- a/doc/public/html/pt02.html +++ b/doc/public/html/pt02.html @@ -31,7 +31,7 @@ </tr></table> <div class="part" lang="en"> <div class="titlepage"><div><div><h1 class="title"> -<a name="id2566326"></a>Part II. Reference</h1></div></div></div> +<a name="id2566321"></a>Part II. Reference</h1></div></div></div> <div class="toc"> <p><b>Table of Contents</b></p> <dl> diff --git a/doc/public/tmpl/cairo-status.sgml b/doc/public/tmpl/cairo-status.sgml index 0f34961..ada6333 100644 --- a/doc/public/tmpl/cairo-status.sgml +++ b/doc/public/tmpl/cairo-status.sgml @@ -17,34 +17,13 @@ Decoding cairo's status <!-- ##### SECTION Stability_Level ##### --> -<!-- ##### ENUM cairo_status_t ##### --> +<!-- ##### FUNCTION cairo_status_t ##### --> <para> </para> -@CAIRO_STATUS_SUCCESS: -@CAIRO_STATUS_NO_MEMORY: -@CAIRO_STATUS_INVALID_RESTORE: -@CAIRO_STATUS_INVALID_POP_GROUP: -@CAIRO_STATUS_NO_CURRENT_POINT: -@CAIRO_STATUS_INVALID_MATRIX: -@CAIRO_STATUS_INVALID_STATUS: -@CAIRO_STATUS_NULL_POINTER: -@CAIRO_STATUS_INVALID_STRING: -@CAIRO_STATUS_INVALID_PATH_DATA: -@CAIRO_STATUS_READ_ERROR: -@CAIRO_STATUS_WRITE_ERROR: -@CAIRO_STATUS_SURFACE_FINISHED: -@CAIRO_STATUS_SURFACE_TYPE_MISMATCH: -@CAIRO_STATUS_PATTERN_TYPE_MISMATCH: -@CAIRO_STATUS_INVALID_CONTENT: -@CAIRO_STATUS_INVALID_FORMAT: -@CAIRO_STATUS_INVALID_VISUAL: -@CAIRO_STATUS_FILE_NOT_FOUND: -@CAIRO_STATUS_INVALID_DASH: -@CAIRO_STATUS_INVALID_DSC_COMMENT: -@CAIRO_STATUS_INVALID_INDEX: -@CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: +@Returns: + <!-- ##### FUNCTION cairo_status_to_string ##### --> <para> diff --git a/doc/public/version.xml b/doc/public/version.xml index 94fe62c..eac1e0a 100644 --- a/doc/public/version.xml +++ b/doc/public/version.xml @@ -1 +1 @@ -1.5.4 +1.5.6 diff --git a/doc/public/xml/cairo-status.xml b/doc/public/xml/cairo-status.xml index 9330bcb..644ba7d 100644 --- a/doc/public/xml/cairo-status.xml +++ b/doc/public/xml/cairo-status.xml @@ -23,7 +23,7 @@ -enum <link linkend="cairo-status-t">cairo_status_t</link>; +<link linkend="typedef">typedef</link> <link linkend="cairo-status-t">cairo_status_t</link> (); const <link linkend="char">char</link>* <link linkend="cairo-status-to-string">cairo_status_to_string</link> (<link linkend="cairo-status-t">cairo_status_t</link> status); <link linkend="void">void</link> <link linkend="cairo-debug-reset-static-data">cairo_debug_reset_static_data</link> (void); </synopsis> @@ -47,33 +47,8 @@ const <link linkend="char">char</link>* <link linkend="cairo-status-to-s <refsect1 role="details"> <title role="details.title">Details</title> <refsect2> -<title><anchor id="cairo-status-t" role="enum"/>enum cairo_status_t</title> -<indexterm><primary>cairo_status_t</primary></indexterm><programlisting>typedef enum _cairo_status { - CAIRO_STATUS_SUCCESS = 0, - CAIRO_STATUS_NO_MEMORY, - CAIRO_STATUS_INVALID_RESTORE, - CAIRO_STATUS_INVALID_POP_GROUP, - CAIRO_STATUS_NO_CURRENT_POINT, - CAIRO_STATUS_INVALID_MATRIX, - CAIRO_STATUS_INVALID_STATUS, - CAIRO_STATUS_NULL_POINTER, - CAIRO_STATUS_INVALID_STRING, - CAIRO_STATUS_INVALID_PATH_DATA, - CAIRO_STATUS_READ_ERROR, - CAIRO_STATUS_WRITE_ERROR, - CAIRO_STATUS_SURFACE_FINISHED, - CAIRO_STATUS_SURFACE_TYPE_MISMATCH, - CAIRO_STATUS_PATTERN_TYPE_MISMATCH, - CAIRO_STATUS_INVALID_CONTENT, - CAIRO_STATUS_INVALID_FORMAT, - CAIRO_STATUS_INVALID_VISUAL, - CAIRO_STATUS_FILE_NOT_FOUND, - CAIRO_STATUS_INVALID_DASH, - CAIRO_STATUS_INVALID_DSC_COMMENT, - CAIRO_STATUS_INVALID_INDEX, - CAIRO_STATUS_CLIP_NOT_REPRESENTABLE -} cairo_status_t; -</programlisting> +<title><anchor id="cairo-status-t" role="function"/>cairo_status_t ()</title> +<indexterm><primary>cairo_status_t</primary></indexterm><programlisting><link linkend="typedef">typedef</link> cairo_status_t ();</programlisting> <para> <link linkend="cairo-status-t"><type>cairo_status_t</type></link> is used to indicate errors that can occur when using Cairo. In some cases it is returned directly by functions. @@ -85,122 +60,11 @@ New entries may be added in future versions. Use <link linkend="cairo-status-to to get a human-readable representation of an error message.</para> <para> -</para><variablelist role="enum"> -<varlistentry> -<term><anchor id="CAIRO-STATUS-SUCCESS:CAPS" role="constant"/><literal>CAIRO_STATUS_SUCCESS</literal></term> -<listitem><simpara> no error has occurred -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-NO-MEMORY:CAPS" role="constant"/><literal>CAIRO_STATUS_NO_MEMORY</literal></term> -<listitem><simpara> out of memory -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-RESTORE:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_RESTORE</literal></term> -<listitem><simpara> cairo_restore without matching cairo_save -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-POP-GROUP:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_POP_GROUP</literal></term> -<listitem><simpara> no saved group to pop -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-NO-CURRENT-POINT:CAPS" role="constant"/><literal>CAIRO_STATUS_NO_CURRENT_POINT</literal></term> -<listitem><simpara> no current point defined -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-MATRIX:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_MATRIX</literal></term> -<listitem><simpara> invalid matrix (not invertible) -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-STATUS:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_STATUS</literal></term> -<listitem><simpara> invalid value for an input cairo_status_t -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-NULL-POINTER:CAPS" role="constant"/><literal>CAIRO_STATUS_NULL_POINTER</literal></term> -<listitem><simpara> NULL pointer -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-STRING:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_STRING</literal></term> -<listitem><simpara> input string not valid UTF-8 -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-PATH-DATA:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_PATH_DATA</literal></term> -<listitem><simpara> input path data not valid -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-READ-ERROR:CAPS" role="constant"/><literal>CAIRO_STATUS_READ_ERROR</literal></term> -<listitem><simpara> error while reading from input stream -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-WRITE-ERROR:CAPS" role="constant"/><literal>CAIRO_STATUS_WRITE_ERROR</literal></term> -<listitem><simpara> error while writing to output stream -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-SURFACE-FINISHED:CAPS" role="constant"/><literal>CAIRO_STATUS_SURFACE_FINISHED</literal></term> -<listitem><simpara> target surface has been finished -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-SURFACE-TYPE-MISMATCH:CAPS" role="constant"/><literal>CAIRO_STATUS_SURFACE_TYPE_MISMATCH</literal></term> -<listitem><simpara> the surface type is not appropriate for the operation -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS" role="constant"/><literal>CAIRO_STATUS_PATTERN_TYPE_MISMATCH</literal></term> -<listitem><simpara> the pattern type is not appropriate for the operation -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-CONTENT:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_CONTENT</literal></term> -<listitem><simpara> invalid value for an input cairo_content_t -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-FORMAT:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_FORMAT</literal></term> -<listitem><simpara> invalid value for an input cairo_format_t -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-VISUAL:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_VISUAL</literal></term> -<listitem><simpara> invalid value for an input Visual* -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-FILE-NOT-FOUND:CAPS" role="constant"/><literal>CAIRO_STATUS_FILE_NOT_FOUND</literal></term> -<listitem><simpara> file not found -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-DASH:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_DASH</literal></term> -<listitem><simpara> invalid value for a dash setting -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-DSC-COMMENT:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_DSC_COMMENT</literal></term> -<listitem><simpara> invalid value for a DSC comment (Since 1.2) -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-INVALID-INDEX:CAPS" role="constant"/><literal>CAIRO_STATUS_INVALID_INDEX</literal></term> -<listitem><simpara> invalid index passed to getter (Since 1.4) -</simpara></listitem> -</varlistentry> -<varlistentry> -<term><anchor id="CAIRO-STATUS-CLIP-NOT-REPRESENTABLE:CAPS" role="constant"/><literal>CAIRO_STATUS_CLIP_NOT_REPRESENTABLE</literal></term> -<listitem><simpara> clip region not representable in desired format (Since 1.4) -</simpara></listitem> -</varlistentry> +</para><variablelist role="params"> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> + + +</simpara></listitem></varlistentry> </variablelist></refsect2> <refsect2> <title><anchor id="cairo-status-to-string" role="function"/>cairo_status_to_string ()</title> diff --git a/doc/public/xml/cairo-version.xml b/doc/public/xml/cairo-version.xml index 885c526..f0adbd9 100644 --- a/doc/public/xml/cairo-version.xml +++ b/doc/public/xml/cairo-version.xml @@ -174,14 +174,14 @@ The minor component of the version of cairo available at compile-time. </para></refsect2> <refsect2> <title><anchor id="CAIRO-VERSION-MICRO:CAPS" role="macro"/>CAIRO_VERSION_MICRO</title> -<indexterm><primary>CAIRO_VERSION_MICRO</primary></indexterm><programlisting>#define CAIRO_VERSION_MICRO 4 +<indexterm><primary>CAIRO_VERSION_MICRO</primary></indexterm><programlisting>#define CAIRO_VERSION_MICRO 6 </programlisting> <para> The micro component of the version of cairo available at compile-time. </para></refsect2> <refsect2> <title><anchor id="CAIRO-VERSION-STRING:CAPS" role="macro"/>CAIRO_VERSION_STRING</title> -<indexterm><primary>CAIRO_VERSION_STRING</primary></indexterm><programlisting>#define CAIRO_VERSION_STRING "1.5.4" +<indexterm><primary>CAIRO_VERSION_STRING</primary></indexterm><programlisting>#define CAIRO_VERSION_STRING "1.5.6" </programlisting> <para> A human-readable string literal containing the version of cairo available diff --git a/doc/public/xml/cairo.xml b/doc/public/xml/cairo.xml index 6a83a0c..6790396 100644 --- a/doc/public/xml/cairo.xml +++ b/doc/public/xml/cairo.xml @@ -479,23 +479,25 @@ group.</para> <title><anchor id="cairo-get-group-target" role="function" condition="since:1.2"/>cairo_get_group_target ()</title> <indexterm role="1.2"><primary>cairo_get_group_target</primary></indexterm><programlisting><link linkend="cairo-surface-t">cairo_surface_t</link>* cairo_get_group_target (<link linkend="cairo-t">cairo_t</link> *cr);</programlisting> <para> -Gets the target surface for the current group as started by the -most recent call to <link linkend="cairo-push-group"><function>cairo_push_group()</function></link> or -<link linkend="cairo-push-group-with-content"><function>cairo_push_group_with_content()</function></link>. +Gets the current destination surface for the context. This is either +the original target surface as passed to <link linkend="cairo-create"><function>cairo_create()</function></link> or the target +surface for the current group as started by the most recent call to +<link linkend="cairo-push-group"><function>cairo_push_group()</function></link> or <link linkend="cairo-push-group-with-content"><function>cairo_push_group_with_content()</function></link>. </para> <para> -This function will return NULL if called "outside" of any group -rendering blocks, (that is, after the last balancing call to -<link linkend="cairo-pop-group"><function>cairo_pop_group()</function></link> or <link linkend="cairo-pop-group-to-source"><function>cairo_pop_group_to_source()</function></link>).</para> +This function will always return a valid pointer, but the result +can be a "nil" surface if <parameter>cr</parameter> is already in an error state, +(ie. <link linkend="cairo-status"><function>cairo_status()</function></link> <literal>!=</literal> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link>). +A nil surface is indicated by <link linkend="cairo-surface-status"><function>cairo_surface_status()</function></link> +<literal>!=</literal> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link>.</para> <para> </para><variablelist role="params"> <varlistentry><term><parameter>cr</parameter> :</term> <listitem><simpara> a cairo context </simpara></listitem></varlistentry> -<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the target group surface, or NULL if none. This -object is owned by cairo. To keep a reference to it, you must call -<link linkend="cairo-surface-reference"><function>cairo_surface_reference()</function></link>. +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the target surface. This object is owned by cairo. To +keep a reference to it, you must call <link linkend="cairo-surface-reference"><function>cairo_surface_reference()</function></link>. </simpara></listitem></varlistentry> </variablelist><para role="since">Since 1.2 diff --git a/perf/Makefile.am b/perf/Makefile.am index 4701abf..78fdeb2 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -77,14 +77,14 @@ CAIRO_PERF_ENVIRONMENT = CAIRO_PERF_ITERATIONS="$(ITERS)" CAIRO_TEST_TARGET="$(T # Cap the maximum number of iterations during 'make check' TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10" -TESTS = cairo-perf +TESTS = cairo-perf$(EXEEXT) -perf: cairo-perf - $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf +perf: cairo-perf$(EXEEXT) + $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf$(EXEEXT) html: index.html -index.html: cairo-perf +index.html: cairo-perf$(EXEEXT) $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@ diff --git a/perf/Makefile.in b/perf/Makefile.in index 016de61..7cc977c 100644 --- a/perf/Makefile.in +++ b/perf/Makefile.in @@ -125,6 +125,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ @@ -366,7 +368,7 @@ CAIRO_PERF_ENVIRONMENT = CAIRO_PERF_ITERATIONS="$(ITERS)" CAIRO_TEST_TARGET="$(T # Cap the maximum number of iterations during 'make check' TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10" -TESTS = cairo-perf +TESTS = cairo-perf$(EXEEXT) EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS) VALGRIND_MEMCHECK_FLAGS = \ --tool=memcheck \ @@ -727,12 +729,12 @@ $(top_builddir)/boilerplate/libcairoboilerplate.la: $(top_builddir)/src/libcairo $(top_builddir)/src/libcairo.la: cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libcairo.la -perf: cairo-perf - $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf +perf: cairo-perf$(EXEEXT) + $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf$(EXEEXT) html: index.html -index.html: cairo-perf +index.html: cairo-perf$(EXEEXT) $(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@ check-valgrind perf-valgrind: diff --git a/perf/cairo-perf-cover.c b/perf/cairo-perf-cover.c index 53dc7b7..bd12f07 100644 --- a/perf/cairo-perf-cover.c +++ b/perf/cairo-perf-cover.c @@ -103,7 +103,7 @@ set_source_similar_surface_rgb (cairo_t *cr, { cairo_surface_t *source; - source = cairo_surface_create_similar (cairo_get_target (cr), + source = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR, width, height); init_and_set_source_surface (cr, source, width, height); @@ -118,7 +118,7 @@ set_source_similar_surface_rgba (cairo_t *cr, { cairo_surface_t *source; - source = cairo_surface_create_similar (cairo_get_target (cr), + source = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, width, height); init_and_set_source_surface (cr, source, width, height); diff --git a/src/Makefile.am b/src/Makefile.am index 4492e6a..4953d59 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,6 +22,7 @@ endif if CAIRO_HAS_PDF_SURFACE libcairo_pdf_headers = cairo-pdf.h libcairo_pdf_sources = cairo-pdf-surface.c cairo-pdf-surface-private.h \ + cairo-pdf-operators.c cairo-pdf-operators-private.h \ cairo-deflate-stream.c libcairo_font_subset_sources = $(font_subset_sources) backend_pkgconfigs += cairo-pdf.pc @@ -46,7 +47,7 @@ libcairo_test_sources = test-fallback-surface.c test-fallback-surface.h \ endif if CAIRO_HAS_XLIB_SURFACE -libcairo_xlib_headers = cairo-xlib.h cairo-xlib-xrender.h +libcairo_xlib_headers = cairo-xlib.h libcairo_xlib_sources = cairo-xlib-surface.c \ cairo-xlib-surface-private.h \ cairo-xlib-display.c \ @@ -73,12 +74,13 @@ libcairo_quartz_sources = cairo-quartz-surface.c cairo-quartz-private.h backend_pkgconfigs += cairo-quartz.pc endif +libcairo_win32_sources = if OS_WIN32 +libcairo_win32_sources += cairo-win32.c export_symbols = -export-symbols cairo.def cairo_def_dependency = cairo.def endif -libcairo_win32_sources = if CAIRO_HAS_WIN32_SURFACE libcairo_win32_headers = cairo-win32.h libcairo_win32_sources += cairo-win32-surface.c cairo-win32-printing-surface.c cairo-win32-private.h @@ -291,7 +293,7 @@ cairo-features.h: cd $(top_builddir) && ./config.status src/cairo-features.h CLEANFILES = cairo.def -cairo.def: $(cairoinclude_HEADERS) +cairo.def: $(cairo_headers) cairo-features.h @echo Generating $@ @(echo EXPORTS; \ (cd $(srcdir); cat $(cairo_headers) || echo 'cairo_ERROR ()' ) | \ @@ -314,9 +316,15 @@ install-data-local: false ; \ fi -TESTS_ENVIRONMENT = srcdir="$(srcdir)" +TESTS_ENVIRONMENT = srcdir="$(srcdir)" MAKE="$(MAKE)" TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh -EXTRA_DIST += $(TESTS) +EXTRA_DIST += $(TESTS) check-has-hidden-symbols.c +DISTCLEANFILES += check-has-hidden-symbols.i + +# The pre-processed result is used by check-{def,plt}.sh to determine whether +# cairo has been compiled with symbol hiding. +.c.i: $(cairoinclude_HEADERS) $(nodist_cairoinclude_HEADERS) cairoint.h $(top_builddir)/config.h + $(CPP) -DHAVE_CONFIG_H -I$(top_builddir) -I. $(libcairo_la_CFLAGS) $< -o $@ SPARSE = sparse sparse: diff --git a/src/Makefile.in b/src/Makefile.in index 7da45e5..bb51d4b 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -47,17 +47,18 @@ host_triplet = @host@ @CAIRO_HAS_XLIB_XRENDER_SURFACE_TRUE@am__append_7 = cairo-xlib-xrender.pc @CAIRO_HAS_XCB_SURFACE_TRUE@am__append_8 = cairo-xcb.pc @CAIRO_HAS_QUARTZ_SURFACE_TRUE@am__append_9 = cairo-quartz.pc -@CAIRO_HAS_WIN32_SURFACE_TRUE@am__append_10 = cairo-win32-surface.c cairo-win32-printing-surface.c cairo-win32-private.h -@CAIRO_HAS_WIN32_SURFACE_TRUE@am__append_11 = cairo-win32.pc +@OS_WIN32_TRUE@am__append_10 = cairo-win32.c +@CAIRO_HAS_WIN32_SURFACE_TRUE@am__append_11 = cairo-win32-surface.c cairo-win32-printing-surface.c cairo-win32-private.h +@CAIRO_HAS_WIN32_SURFACE_TRUE@am__append_12 = cairo-win32.pc # This is not really a separate conditional. Is TRUE iff the previous one is. -@CAIRO_HAS_WIN32_FONT_TRUE@am__append_12 = cairo-win32-font.c -@CAIRO_HAS_OS2_SURFACE_TRUE@am__append_13 = cairo-os2-surface.c cairo-os2-private.h -@CAIRO_HAS_BEOS_SURFACE_TRUE@am__append_14 = cairo-beos-surface.cpp -@CAIRO_HAS_BEOS_SURFACE_TRUE@am__append_15 = cairo-beos.pc -@CAIRO_HAS_GLITZ_SURFACE_TRUE@am__append_16 = cairo-glitz.pc -@CAIRO_HAS_DIRECTFB_SURFACE_TRUE@am__append_17 = cairo-directfb.pc -@CAIRO_HAS_FT_FONT_TRUE@am__append_18 = cairo-ft.pc -@CAIRO_HAS_ATSUI_FONT_TRUE@am__append_19 = cairo-atsui.pc +@CAIRO_HAS_WIN32_FONT_TRUE@am__append_13 = cairo-win32-font.c +@CAIRO_HAS_OS2_SURFACE_TRUE@am__append_14 = cairo-os2-surface.c cairo-os2-private.h +@CAIRO_HAS_BEOS_SURFACE_TRUE@am__append_15 = cairo-beos-surface.cpp +@CAIRO_HAS_BEOS_SURFACE_TRUE@am__append_16 = cairo-beos.pc +@CAIRO_HAS_GLITZ_SURFACE_TRUE@am__append_17 = cairo-glitz.pc +@CAIRO_HAS_DIRECTFB_SURFACE_TRUE@am__append_18 = cairo-directfb.pc +@CAIRO_HAS_FT_FONT_TRUE@am__append_19 = cairo-ft.pc +@CAIRO_HAS_ATSUI_FONT_TRUE@am__append_20 = cairo-atsui.pc subdir = src DIST_COMMON = $(am__cairoinclude_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/cairo.pc.in @@ -111,6 +112,7 @@ am__libcairo_la_SOURCES_DIST = cairo.c cairo.h cairo-private.h \ cairo-atsui-font.c cairo-ft-font.c cairo-ft-private.h \ cairo-ps-surface.c cairo-ps-surface-private.h \ cairo-pdf-surface.c cairo-pdf-surface-private.h \ + cairo-pdf-operators.c cairo-pdf-operators-private.h \ cairo-deflate-stream.c cairo-png.c cairo-svg-surface.c \ cairo-svg-surface-private.h test-fallback-surface.c \ test-fallback-surface.h test-meta-surface.c \ @@ -124,7 +126,7 @@ am__libcairo_la_SOURCES_DIST = cairo.c cairo.h cairo-private.h \ cairo-xlib-display.c cairo-xlib-screen.c cairo-xlib-private.h \ cairo-xlib-xrender-private.h cairo-xcb-surface.c \ cairo-quartz-surface.c cairo-quartz-private.h \ - cairo-glitz-surface.c cairo-glitz-private.h \ + cairo-glitz-surface.c cairo-glitz-private.h cairo-win32.c \ cairo-win32-surface.c cairo-win32-printing-surface.c \ cairo-win32-private.h cairo-win32-font.c cairo-os2-surface.c \ cairo-os2-private.h cairo-directfb-surface.c cairoint.h \ @@ -137,6 +139,7 @@ am__libcairo_la_SOURCES_DIST = cairo.c cairo.h cairo-private.h \ @CAIRO_HAS_PS_SURFACE_TRUE@ libcairo_la-cairo-ps-surface.lo @CAIRO_HAS_PDF_SURFACE_TRUE@am__objects_4 = \ @CAIRO_HAS_PDF_SURFACE_TRUE@ libcairo_la-cairo-pdf-surface.lo \ +@CAIRO_HAS_PDF_SURFACE_TRUE@ libcairo_la-cairo-pdf-operators.lo \ @CAIRO_HAS_PDF_SURFACE_TRUE@ libcairo_la-cairo-deflate-stream.lo @CAIRO_HAS_PNG_FUNCTIONS_TRUE@am__objects_5 = \ @CAIRO_HAS_PNG_FUNCTIONS_TRUE@ libcairo_la-cairo-png.lo @@ -161,16 +164,17 @@ am__objects_9 = libcairo_la-cairo-cff-subset.lo \ @CAIRO_HAS_XCB_SURFACE_TRUE@ libcairo_la-cairo-xcb-surface.lo @CAIRO_HAS_QUARTZ_SURFACE_TRUE@am__objects_13 = libcairo_la-cairo-quartz-surface.lo @CAIRO_HAS_GLITZ_SURFACE_TRUE@am__objects_14 = libcairo_la-cairo-glitz-surface.lo -@CAIRO_HAS_WIN32_SURFACE_TRUE@am__objects_15 = libcairo_la-cairo-win32-surface.lo \ +@OS_WIN32_TRUE@am__objects_15 = libcairo_la-cairo-win32.lo +@CAIRO_HAS_WIN32_SURFACE_TRUE@am__objects_16 = libcairo_la-cairo-win32-surface.lo \ @CAIRO_HAS_WIN32_SURFACE_TRUE@ libcairo_la-cairo-win32-printing-surface.lo -@CAIRO_HAS_WIN32_FONT_TRUE@am__objects_16 = \ +@CAIRO_HAS_WIN32_FONT_TRUE@am__objects_17 = \ @CAIRO_HAS_WIN32_FONT_TRUE@ libcairo_la-cairo-win32-font.lo -am__objects_17 = $(am__objects_15) $(am__objects_16) -@CAIRO_HAS_OS2_SURFACE_TRUE@am__objects_18 = \ +am__objects_18 = $(am__objects_15) $(am__objects_16) $(am__objects_17) +@CAIRO_HAS_OS2_SURFACE_TRUE@am__objects_19 = \ @CAIRO_HAS_OS2_SURFACE_TRUE@ libcairo_la-cairo-os2-surface.lo -am__objects_19 = $(am__objects_18) -@CAIRO_HAS_DIRECTFB_SURFACE_TRUE@am__objects_20 = libcairo_la-cairo-directfb-surface.lo -am__objects_21 = libcairo_la-cairo.lo libcairo_la-cairo-arc.lo \ +am__objects_20 = $(am__objects_19) +@CAIRO_HAS_DIRECTFB_SURFACE_TRUE@am__objects_21 = libcairo_la-cairo-directfb-surface.lo +am__objects_22 = libcairo_la-cairo.lo libcairo_la-cairo-arc.lo \ libcairo_la-cairo-array.lo libcairo_la-cairo-atomic.lo \ libcairo_la-cairo-base85-stream.lo \ libcairo_la-cairo-bentley-ottmann.lo \ @@ -201,17 +205,17 @@ am__objects_21 = libcairo_la-cairo.lo libcairo_la-cairo-arc.lo \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) $(am__objects_7) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \ - $(am__objects_13) $(am__objects_14) $(am__objects_17) \ - $(am__objects_19) $(am__objects_20) -am__objects_22 = -am_libcairo_la_OBJECTS = $(am__objects_21) $(am__objects_22) + $(am__objects_13) $(am__objects_14) $(am__objects_18) \ + $(am__objects_20) $(am__objects_21) +am__objects_23 = +am_libcairo_la_OBJECTS = $(am__objects_22) $(am__objects_23) libcairo_la_OBJECTS = $(am_libcairo_la_OBJECTS) libcairo_beos_la_LIBADD = am__libcairo_beos_la_SOURCES_DIST = cairo-beos-surface.cpp -@CAIRO_HAS_BEOS_SURFACE_TRUE@am__objects_23 = libcairo_beos_la-cairo-beos-surface.lo -am__objects_24 = $(am__objects_23) +@CAIRO_HAS_BEOS_SURFACE_TRUE@am__objects_24 = libcairo_beos_la-cairo-beos-surface.lo +am__objects_25 = $(am__objects_24) @CAIRO_HAS_BEOS_SURFACE_TRUE@am_libcairo_beos_la_OBJECTS = \ -@CAIRO_HAS_BEOS_SURFACE_TRUE@ $(am__objects_24) +@CAIRO_HAS_BEOS_SURFACE_TRUE@ $(am__objects_25) libcairo_beos_la_OBJECTS = $(am_libcairo_beos_la_OBJECTS) @CAIRO_HAS_BEOS_SURFACE_TRUE@am_libcairo_beos_la_rpath = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -274,6 +278,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ @@ -485,9 +491,9 @@ font_subset_sources = cairo-cff-subset.c cairo-truetype-subset.c \ cairo-scaled-font-subsets-private.h $(am__append_1) backend_pkgconfigs = $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) $(am__append_7) \ - $(am__append_8) $(am__append_9) $(am__append_11) \ - $(am__append_15) $(am__append_16) $(am__append_17) \ - $(am__append_18) $(am__append_19) + $(am__append_8) $(am__append_9) $(am__append_12) \ + $(am__append_16) $(am__append_17) $(am__append_18) \ + $(am__append_19) $(am__append_20) @CAIRO_HAS_PS_SURFACE_TRUE@libcairo_ps_headers = cairo-ps.h @CAIRO_HAS_PS_SURFACE_TRUE@libcairo_ps_sources = cairo-ps-surface.c cairo-ps-surface-private.h @CAIRO_HAS_PDF_SURFACE_TRUE@libcairo_font_subset_sources = $(font_subset_sources) @@ -495,6 +501,7 @@ backend_pkgconfigs = $(am__append_2) $(am__append_3) $(am__append_4) \ @CAIRO_HAS_SVG_SURFACE_TRUE@libcairo_font_subset_sources = $(font_subset_sources) @CAIRO_HAS_PDF_SURFACE_TRUE@libcairo_pdf_headers = cairo-pdf.h @CAIRO_HAS_PDF_SURFACE_TRUE@libcairo_pdf_sources = cairo-pdf-surface.c cairo-pdf-surface-private.h \ +@CAIRO_HAS_PDF_SURFACE_TRUE@ cairo-pdf-operators.c cairo-pdf-operators-private.h \ @CAIRO_HAS_PDF_SURFACE_TRUE@ cairo-deflate-stream.c @CAIRO_HAS_PNG_FUNCTIONS_TRUE@libcairo_png_sources = cairo-png.c @@ -504,7 +511,7 @@ backend_pkgconfigs = $(am__append_2) $(am__append_3) $(am__append_4) \ @CAIRO_HAS_TEST_SURFACES_TRUE@ test-meta-surface.c test-meta-surface.h \ @CAIRO_HAS_TEST_SURFACES_TRUE@ test-paginated-surface.c test-paginated-surface.h -@CAIRO_HAS_XLIB_SURFACE_TRUE@libcairo_xlib_headers = cairo-xlib.h cairo-xlib-xrender.h +@CAIRO_HAS_XLIB_SURFACE_TRUE@libcairo_xlib_headers = cairo-xlib.h @CAIRO_HAS_XLIB_SURFACE_TRUE@libcairo_xlib_sources = cairo-xlib-surface.c \ @CAIRO_HAS_XLIB_SURFACE_TRUE@ cairo-xlib-surface-private.h \ @CAIRO_HAS_XLIB_SURFACE_TRUE@ cairo-xlib-display.c \ @@ -517,13 +524,14 @@ backend_pkgconfigs = $(am__append_2) $(am__append_3) $(am__append_4) \ @CAIRO_HAS_XCB_SURFACE_TRUE@libcairo_xcb_sources = cairo-xcb-surface.c @CAIRO_HAS_QUARTZ_SURFACE_TRUE@libcairo_quartz_headers = cairo-quartz.h @CAIRO_HAS_QUARTZ_SURFACE_TRUE@libcairo_quartz_sources = cairo-quartz-surface.c cairo-quartz-private.h +libcairo_win32_sources = $(am__append_10) $(am__append_11) \ + $(am__append_13) @OS_WIN32_TRUE@export_symbols = -export-symbols cairo.def @OS_WIN32_TRUE@cairo_def_dependency = cairo.def -libcairo_win32_sources = $(am__append_10) $(am__append_12) @CAIRO_HAS_WIN32_SURFACE_TRUE@libcairo_win32_headers = cairo-win32.h -libcairo_os2_sources = $(am__append_13) +libcairo_os2_sources = $(am__append_14) @CAIRO_HAS_OS2_SURFACE_TRUE@libcairo_os2_headers = cairo-os2.h -libcairo_beos_sources = $(am__append_14) +libcairo_beos_sources = $(am__append_15) @CAIRO_HAS_BEOS_SURFACE_TRUE@libcairo_beos_headers = cairo-beos.h @CAIRO_HAS_BEOS_SURFACE_TRUE@noinst_LTLIBRARIES = libcairo_beos.la @CAIRO_HAS_BEOS_SURFACE_TRUE@libcairo_beos_la_SOURCES = $(libcairo_beos_sources) @@ -674,17 +682,18 @@ libcairo_la_LIBADD = $(CAIRO_LIBS) $(noinst_LTLIBRARIES) $(CAIRO_LDADD) libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(noinst_LTLIBRARIES) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = cairo.pc $(backend_pkgconfigs) -DISTCLEANFILES = $(backend_pkgconfigs) cairo-features.h -EXTRA_DIST = cairo-backend.pc.in $(TESTS) +DISTCLEANFILES = $(backend_pkgconfigs) cairo-features.h \ + check-has-hidden-symbols.i +EXTRA_DIST = cairo-backend.pc.in $(TESTS) check-has-hidden-symbols.c CLEANFILES = cairo.def -TESTS_ENVIRONMENT = srcdir="$(srcdir)" +TESTS_ENVIRONMENT = srcdir="$(srcdir)" MAKE="$(MAKE)" TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh SPARSE = sparse SPLINT = splint -badflag all: all-am .SUFFIXES: -.SUFFIXES: .c .cpp .lo .o .obj +.SUFFIXES: .c .cpp .i .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -802,6 +811,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-path-stroke.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-pattern.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-pdf-operators.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-pdf-surface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-pen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-png.Plo@am__quote@ @@ -828,6 +838,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-win32-font.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-win32-printing-surface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-win32-surface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-win32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-xcb-surface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-xlib-display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcairo_la-cairo-xlib-screen.Plo@am__quote@ @@ -1208,6 +1219,13 @@ libcairo_la-cairo-pdf-surface.lo: cairo-pdf-surface.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -c -o libcairo_la-cairo-pdf-surface.lo `test -f 'cairo-pdf-surface.c' || echo '$(srcdir)/'`cairo-pdf-surface.c +libcairo_la-cairo-pdf-operators.lo: cairo-pdf-operators.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -MT libcairo_la-cairo-pdf-operators.lo -MD -MP -MF "$(DEPDIR)/libcairo_la-cairo-pdf-operators.Tpo" -c -o libcairo_la-cairo-pdf-operators.lo `test -f 'cairo-pdf-operators.c' || echo '$(srcdir)/'`cairo-pdf-operators.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcairo_la-cairo-pdf-operators.Tpo" "$(DEPDIR)/libcairo_la-cairo-pdf-operators.Plo"; else rm -f "$(DEPDIR)/libcairo_la-cairo-pdf-operators.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cairo-pdf-operators.c' object='libcairo_la-cairo-pdf-operators.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -c -o libcairo_la-cairo-pdf-operators.lo `test -f 'cairo-pdf-operators.c' || echo '$(srcdir)/'`cairo-pdf-operators.c + libcairo_la-cairo-deflate-stream.lo: cairo-deflate-stream.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -MT libcairo_la-cairo-deflate-stream.lo -MD -MP -MF "$(DEPDIR)/libcairo_la-cairo-deflate-stream.Tpo" -c -o libcairo_la-cairo-deflate-stream.lo `test -f 'cairo-deflate-stream.c' || echo '$(srcdir)/'`cairo-deflate-stream.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcairo_la-cairo-deflate-stream.Tpo" "$(DEPDIR)/libcairo_la-cairo-deflate-stream.Plo"; else rm -f "$(DEPDIR)/libcairo_la-cairo-deflate-stream.Tpo"; exit 1; fi @@ -1327,6 +1345,13 @@ libcairo_la-cairo-glitz-surface.lo: cairo-glitz-surface.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -c -o libcairo_la-cairo-glitz-surface.lo `test -f 'cairo-glitz-surface.c' || echo '$(srcdir)/'`cairo-glitz-surface.c +libcairo_la-cairo-win32.lo: cairo-win32.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -MT libcairo_la-cairo-win32.lo -MD -MP -MF "$(DEPDIR)/libcairo_la-cairo-win32.Tpo" -c -o libcairo_la-cairo-win32.lo `test -f 'cairo-win32.c' || echo '$(srcdir)/'`cairo-win32.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcairo_la-cairo-win32.Tpo" "$(DEPDIR)/libcairo_la-cairo-win32.Plo"; else rm -f "$(DEPDIR)/libcairo_la-cairo-win32.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cairo-win32.c' object='libcairo_la-cairo-win32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -c -o libcairo_la-cairo-win32.lo `test -f 'cairo-win32.c' || echo '$(srcdir)/'`cairo-win32.c + libcairo_la-cairo-win32-surface.lo: cairo-win32-surface.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcairo_la_CFLAGS) $(CFLAGS) -MT libcairo_la-cairo-win32-surface.lo -MD -MP -MF "$(DEPDIR)/libcairo_la-cairo-win32-surface.Tpo" -c -o libcairo_la-cairo-win32-surface.lo `test -f 'cairo-win32-surface.c' || echo '$(srcdir)/'`cairo-win32-surface.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcairo_la-cairo-win32-surface.Tpo" "$(DEPDIR)/libcairo_la-cairo-win32-surface.Plo"; else rm -f "$(DEPDIR)/libcairo_la-cairo-win32-surface.Tpo"; exit 1; fi @@ -1711,7 +1736,7 @@ $(top_builddir)/config.h: $(top_srcdir)/config.h.in cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) config.h cairo-features.h: cd $(top_builddir) && ./config.status src/cairo-features.h -cairo.def: $(cairoinclude_HEADERS) +cairo.def: $(cairo_headers) cairo-features.h @echo Generating $@ @(echo EXPORTS; \ (cd $(srcdir); cat $(cairo_headers) || echo 'cairo_ERROR ()' ) | \ @@ -1733,6 +1758,11 @@ install-data-local: echo "****************************************************************" ; \ false ; \ fi + +# The pre-processed result is used by check-{def,plt}.sh to determine whether +# cairo has been compiled with symbol hiding. +.c.i: $(cairoinclude_HEADERS) $(nodist_cairoinclude_HEADERS) cairoint.h $(top_builddir)/config.h + $(CPP) -DHAVE_CONFIG_H -I$(top_builddir) -I. $(libcairo_la_CFLAGS) $< -o $@ sparse: @status=true; for f in $(libcairo_la_base_sources); do \ echo sparse $$f; \ diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c index 97b245e..357e79a 100644 --- a/src/cairo-analysis-surface.c +++ b/src/cairo-analysis-surface.c @@ -57,31 +57,42 @@ typedef struct { cairo_rectangle_int_t current_clip; cairo_box_t page_bbox; + cairo_bool_t has_ctm; + cairo_matrix_t ctm; + } cairo_analysis_surface_t; static cairo_int_status_t _cairo_analysis_surface_analyze_meta_surface_pattern (cairo_analysis_surface_t *surface, cairo_pattern_t *pattern) { + cairo_surface_t *analysis = &surface->base; cairo_surface_pattern_t *surface_pattern; - cairo_surface_t *meta_surface; - cairo_surface_t *analysis; cairo_status_t status; + cairo_bool_t old_has_ctm; + cairo_matrix_t old_ctm, p2d; assert (pattern->type == CAIRO_PATTERN_TYPE_SURFACE); surface_pattern = (cairo_surface_pattern_t *) pattern; assert (_cairo_surface_is_meta (surface_pattern->surface)); - meta_surface = surface_pattern->surface; - analysis = _cairo_analysis_surface_create (surface->target, - surface->width, surface->height); - if (analysis == NULL) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + old_ctm = surface->ctm; + old_has_ctm = surface->has_ctm; + p2d = pattern->matrix; + status = cairo_matrix_invert (&p2d); + /* _cairo_pattern_set_matrix guarantees invertibility */ + assert (status == CAIRO_STATUS_SUCCESS); + + cairo_matrix_multiply (&surface->ctm, &p2d, &surface->ctm); + surface->has_ctm = !_cairo_matrix_is_identity (&surface->ctm); - status = _cairo_meta_surface_replay_analyze_meta_pattern (meta_surface, analysis); + status = _cairo_meta_surface_replay_and_create_regions (surface_pattern->surface, + analysis); if (status == CAIRO_STATUS_SUCCESS) - status = analysis->status; - cairo_surface_destroy (analysis); + status = analysis->status; + + surface->ctm = old_ctm; + surface->has_ctm = old_has_ctm; return status; } @@ -97,6 +108,28 @@ _cairo_analysis_surface_add_operation (cairo_analysis_surface_t *surface, if (rect->width == 0 || rect->height == 0) return CAIRO_STATUS_SUCCESS; + if (surface->has_ctm) { + double x1, y1, x2, y2; + + x1 = rect->x; + y1 = rect->y; + x2 = rect->x + rect->width; + y2 = rect->y + rect->height; + _cairo_matrix_transform_bounding_box (&surface->ctm, + &x1, &y1, &x2, &y2, + NULL); + rect->x = floor (x1); + rect->y = floor (y1); + + x2 = ceil (x2) - rect->x; + y2 = ceil (y2) - rect->y; + if (x2 <= 0 || y2 <= 0) + return CAIRO_STATUS_SUCCESS; + + rect->width = x2; + rect->height = y2; + } + bbox.p1.x = _cairo_fixed_from_int (rect->x); bbox.p1.y = _cairo_fixed_from_int (rect->y); bbox.p2.x = _cairo_fixed_from_int (rect->x + rect->width); @@ -188,28 +221,24 @@ _cairo_analysis_surface_intersect_clip_path (void *abstract_surface, cairo_analysis_surface_t *surface = abstract_surface; double x1, y1, x2, y2; cairo_rectangle_int_t extent; - cairo_status_t status; if (path == NULL) { surface->current_clip.x = 0; surface->current_clip.y = 0; - surface->current_clip.width = surface->width; + surface->current_clip.width = surface->width; surface->current_clip.height = surface->height; - status = CAIRO_STATUS_SUCCESS; } else { - status = _cairo_path_fixed_bounds (path, &x1, &y1, &x2, &y2); - if (status) - return status; + _cairo_path_fixed_bounds (path, &x1, &y1, &x2, &y2); extent.x = floor (x1); extent.y = floor (y1); - extent.width = ceil (x2) - extent.x; + extent.width = ceil (x2) - extent.x; extent.height = ceil (y2) - extent.y; _cairo_rectangle_intersect (&surface->current_clip, &extent); } - return status; + return CAIRO_STATUS_SUCCESS; } static cairo_int_status_t @@ -382,7 +411,7 @@ _cairo_analysis_surface_stroke (void *abstract_surface, tolerance, &traps); - if (status) { + if (status || traps.num_traps == 0) { _cairo_traps_fini (&traps); return status; } @@ -405,9 +434,9 @@ _cairo_analysis_surface_fill (void *abstract_surface, cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, - cairo_fill_rule_t fill_rule, + cairo_fill_rule_t fill_rule, double tolerance, - cairo_antialias_t antialias) + cairo_antialias_t antialias) { cairo_analysis_surface_t *surface = abstract_surface; cairo_status_t status, backend_status; @@ -454,7 +483,7 @@ _cairo_analysis_surface_fill (void *abstract_surface, tolerance, &traps); - if (status) { + if (status || traps.num_traps == 0) { _cairo_traps_fini (&traps); return status; } @@ -577,6 +606,8 @@ _cairo_analysis_surface_create (cairo_surface_t *target, surface->width = width; surface->height = height; + cairo_matrix_init_identity (&surface->ctm); + surface->has_ctm = FALSE; surface->target = target; surface->first_op = TRUE; diff --git a/src/cairo-array.c b/src/cairo-array.c index 0313caa..470b327 100644 --- a/src/cairo-array.c +++ b/src/cairo-array.c @@ -396,8 +396,7 @@ _cairo_user_data_array_get_data (cairo_user_data_array_t *array, int i, num_slots; cairo_user_data_slot_t *slots; - /* We allow this to support degenerate objects such as - * cairo_image_surface_nil. */ + /* We allow this to support degenerate objects such as cairo_surface_nil. */ if (array == NULL) return NULL; diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c index 1c96fdc..d4c1f64 100644 --- a/src/cairo-atsui-font.c +++ b/src/cairo-atsui-font.c @@ -87,6 +87,7 @@ struct _cairo_atsui_font { Fixed size; CGAffineTransform font_matrix; + CGFontRef cgfref; }; struct _cairo_atsui_font_face { @@ -272,8 +273,7 @@ _cairo_atsui_font_create_scaled (cairo_font_face_t *font_face, err = CreateSizedCopyOfStyle (style, &font->size, &font->font_matrix, &font->style); if (err != noErr) { - _cairo_error (CAIRO_STATUS_NO_MEMORY); - status = CAIRO_STATUS_NO_MEMORY; + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto FAIL; } @@ -300,6 +300,7 @@ _cairo_atsui_font_create_scaled (cairo_font_face_t *font_face, status = _cairo_atsui_font_set_metrics (font); + font->cgfref = 0; FAIL: if (status) { if (font) { @@ -448,6 +449,9 @@ _cairo_atsui_font_fini(void *abstract_font) ATSUDisposeStyle(font->style); if (font->unscaled_style) ATSUDisposeStyle(font->unscaled_style); + if (font->cgfref) + CGFontRelease(font->cgfref); + } static GlyphID @@ -943,6 +947,19 @@ _cairo_atsui_scaled_font_get_atsu_font_id (cairo_scaled_font_t *sfont) return afont->fontID; } +CGFontRef +_cairo_atsui_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont) +{ + cairo_atsui_font_t *afont = (cairo_atsui_font_t *) sfont; + + if (!afont->cgfref) { + ATSFontRef atsfref = FMGetATSFontRefFromFont (afont->fontID); + afont->cgfref = CGFontCreateWithPlatformFont (&atsfref); + } + return afont->cgfref; +} + + static cairo_int_status_t _cairo_atsui_load_truetype_table (void *abstract_font, unsigned long tag, diff --git a/src/cairo-base85-stream.c b/src/cairo-base85-stream.c index 97ef263..b7dc9b1 100644 --- a/src/cairo-base85-stream.c +++ b/src/cairo-base85-stream.c @@ -113,6 +113,9 @@ _cairo_base85_stream_create (cairo_output_stream_t *output) { cairo_base85_stream_t *stream; + if (output->status) + return _cairo_output_stream_create_in_error (output->status); + stream = malloc (sizeof (cairo_base85_stream_t)); if (stream == NULL) { _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); diff --git a/src/cairo-bentley-ottmann.c b/src/cairo-bentley-ottmann.c index b8a5f81..3ef7858 100644 --- a/src/cairo-bentley-ottmann.c +++ b/src/cairo-bentley-ottmann.c @@ -1421,7 +1421,7 @@ _cairo_bentley_ottmann_tessellate_polygon (cairo_traps_t *traps, { int intersections; cairo_status_t status; - cairo_bo_edge_t stack_edges[CAIRO_STACK_BUFFER_SIZE / sizeof (cairo_bo_edge_t)]; + cairo_bo_edge_t stack_edges[CAIRO_STACK_ARRAY_LENGTH (cairo_bo_edge_t)]; cairo_bo_edge_t *edges; cairo_fixed_t xmin = 0x7FFFFFFF; cairo_fixed_t ymin = 0x7FFFFFFF; diff --git a/src/cairo-clip.c b/src/cairo-clip.c index 0fed3f6..8d48b53 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -704,7 +704,7 @@ _cairo_clip_int_rect_to_user (cairo_gstate_t *gstate, return is_tight; } -cairo_private cairo_rectangle_list_t* +cairo_rectangle_list_t * _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate) { cairo_rectangle_list_t *list; diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h index da80b89..758cde5 100644 --- a/src/cairo-compiler-private.h +++ b/src/cairo-compiler-private.h @@ -70,12 +70,14 @@ CAIRO_BEGIN_DECLS #endif /* slim_internal.h */ +#define CAIRO_HAS_HIDDEN_SYMBOLS 1 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun) #define cairo_private_no_warn __attribute__((__visibility__("hidden"))) #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) #define cairo_private_no_warn __hidden #else /* not gcc >= 3.3 and not Sun Studio >= 8 */ #define cairo_private_no_warn +#undef CAIRO_HAS_HIDDEN_SYMBOLS #endif #ifndef WARN_UNUSED_RESULT diff --git a/src/cairo-deflate-stream.c b/src/cairo-deflate-stream.c index 707832d..8734b17 100644 --- a/src/cairo-deflate-stream.c +++ b/src/cairo-deflate-stream.c @@ -117,11 +117,8 @@ _cairo_deflate_stream_create (cairo_output_stream_t *output) { cairo_deflate_stream_t *stream; - if (output->status) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_output_stream_t *) &_cairo_output_stream_nil; - } - + if (output->status) + return _cairo_output_stream_create_in_error (output->status); stream = malloc (sizeof (cairo_deflate_stream_t)); if (stream == NULL) { diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c index e6f354f..2c57a97 100644 --- a/src/cairo-directfb-surface.c +++ b/src/cairo-directfb-surface.c @@ -34,13 +34,14 @@ * Michael Emmel <mike.emmel@gmail.com> * Claudio Ciccani <klan@users.sf.net> */ + #include "cairoint.h" - #include "cairo-directfb.h" -#include <directfb.h> +#include <stdlib.h> +#include <directfb.h> #include <direct/types.h> #include <direct/debug.h> #include <direct/memcpy.h> @@ -48,9 +49,11 @@ /* - * Rectangle causes problems (see bugs 361377, 359553, 359243 in Gnome BTS). + * Rectangle works fine. + * Bugs 361377, 359553, 359243 in Gnome BTS are caused + * by GDK/DirectFB, not by Cairo/DirectFB. */ -#define DFB_RECTANGLES 0 +#define DFB_RECTANGLES 1 /* * Composite works fine. @@ -68,7 +71,7 @@ #define DFB_SHOW_GLYPHS 1 -D_DEBUG_DOMAIN (Cairo_DirectFB, "Cairo/DirectFB", "Cairo DirectFB backend") +D_DEBUG_DOMAIN (Cairo_DirectFB, "Cairo/DirectFB", "Cairo DirectFB backend"); /*****************************************************************************/ @@ -76,17 +79,22 @@ D_DEBUG_DOMAIN (Cairo_DirectFB, "Cairo/DirectFB", "Cairo DirectFB backend") typedef struct _cairo_directfb_surface { cairo_surface_t base; cairo_format_t format; + cairo_content_t content; + IDirectFB *dfb; - int owner; IDirectFBSurface *dfbsurface; + IDirectFBSurface *tmpsurface; + /* color buffer */ cairo_surface_t *color; DFBRegion *clips; int n_clips; - DFBRegion *dirty_region; + int width; int height; + + cairo_bool_t local; } cairo_directfb_surface_t; @@ -108,6 +116,10 @@ static cairo_surface_backend_t cairo_directfb_surface_backend; /*****************************************************************************/ +static int _directfb_argb_font = 0; + +/*****************************************************************************/ + #define RUN_CLIPPED( surface, clip, func ) {\ if ((surface)->clips) {\ @@ -142,11 +154,18 @@ static cairo_surface_backend_t cairo_directfb_surface_backend; }\ } -#define TRANSFORM_POINT( m, x, y, ret_x, ret_y ) {\ +#define TRANSFORM_POINT2X( m, x, y, ret_x, ret_y ) {\ double _x = (x);\ double _y = (y);\ - (ret_x) = (_x * (m)->xx + _y * (m)->xy + (m)->x0);\ - (ret_y) = (_x * (m)->yx + _y * (m)->yy + (m)->y0);\ + (ret_x) = (_x * (m).xx + (m).x0);\ + (ret_y) = (_y * (m).yy + (m).y0);\ +} + +#define TRANSFORM_POINT3X( m, x, y, ret_x, ret_y ) {\ + double _x = (x);\ + double _y = (y);\ + (ret_x) = (_x * (m).xx + _y * (m).xy + (m).x0);\ + (ret_y) = (_x * (m).yx + _y * (m).yy + (m).y0);\ } /* XXX: A1 has a different bits ordering in cairo. @@ -154,24 +173,21 @@ static cairo_surface_backend_t cairo_directfb_surface_backend; */ static cairo_content_t -_directfb_format_to_content ( DFBSurfacePixelFormat format ) +_directfb_format_to_content (DFBSurfacePixelFormat format) { - switch (format) { - case DSPF_ARGB: + if (DFB_PIXELFORMAT_HAS_ALPHA(format)) { + if (DFB_COLOR_BITS_PER_PIXEL(format)) return CAIRO_CONTENT_COLOR_ALPHA; - case DSPF_A8: - return CAIRO_CONTENT_ALPHA; - case DSPF_RGB32: - case DSPF_A1: - default: - return CAIRO_CONTENT_COLOR; - break; + + return CAIRO_CONTENT_ALPHA; } + + return CAIRO_CONTENT_COLOR; } static inline DFBSurfacePixelFormat -cairo_to_directfb_format (cairo_format_t format) +_cairo_to_directfb_format (cairo_format_t format) { switch (format) { case CAIRO_FORMAT_RGB24: @@ -190,16 +206,16 @@ cairo_to_directfb_format (cairo_format_t format) } static inline cairo_format_t -directfb_to_cairo_format (DFBSurfacePixelFormat format) +_directfb_to_cairo_format (DFBSurfacePixelFormat format) { switch (format) { case DSPF_RGB32: return CAIRO_FORMAT_RGB24; case DSPF_ARGB: return CAIRO_FORMAT_ARGB32; - case DSPF_A8 : + case DSPF_A8: return CAIRO_FORMAT_A8; - case DSPF_A1 : + case DSPF_A1: return CAIRO_FORMAT_A1; default: break; @@ -211,13 +227,9 @@ directfb_to_cairo_format (DFBSurfacePixelFormat format) static cairo_status_t _directfb_get_operator (cairo_operator_t operator, - DFBSurfaceDrawingFlags *ret_drawing, - DFBSurfaceBlittingFlags *ret_blitting, DFBSurfaceBlendFunction *ret_srcblend, DFBSurfaceBlendFunction *ret_dstblend ) -{ - DFBSurfaceDrawingFlags drawing = DSDRAW_BLEND; - DFBSurfaceBlittingFlags blitting = DSBLIT_BLEND_ALPHACHANNEL; +{ DFBSurfaceBlendFunction srcblend = DSBF_ONE; DFBSurfaceBlendFunction dstblend = DSBF_ZERO; @@ -227,8 +239,8 @@ _directfb_get_operator (cairo_operator_t operator, dstblend = DSBF_ZERO; break; case CAIRO_OPERATOR_SOURCE: - drawing = DSDRAW_NOFX; - blitting = DSBLIT_NOFX; + srcblend = DSBF_ONE; + dstblend = DSBF_ZERO; break; case CAIRO_OPERATOR_OVER: srcblend = DSBF_ONE; @@ -281,11 +293,7 @@ _directfb_get_operator (cairo_operator_t operator, default: return CAIRO_INT_STATUS_UNSUPPORTED; } - - if (ret_drawing) - *ret_drawing = drawing; - if (ret_blitting) - *ret_blitting = blitting; + if (ret_srcblend) *ret_srcblend = srcblend; if (ret_dstblend) @@ -319,76 +327,106 @@ _directfb_buffer_surface_create (IDirectFB *dfb, } static cairo_status_t -_directfb_acquire_surface (cairo_directfb_surface_t *surface, - cairo_rectangle_int_t *intrest_rec, - cairo_image_surface_t **image_out, - cairo_rectangle_int_t *image_rect_out, - void **image_extra, - DFBSurfaceLockFlags lock_flags) +_directfb_acquire_surface (cairo_directfb_surface_t *surface, + cairo_rectangle_int_t *intrest_rec, + cairo_image_surface_t **image_out, + cairo_rectangle_int_t *image_rect_out, + void **image_extra, + DFBSurfaceLockFlags lock_flags) { - void *data; - int pitch; - IDirectFBSurface *buffer; + IDirectFBSurface *buffer = NULL; DFBRectangle source_rect; - cairo_format_t cairo_format; - cairo_format = surface->format; + cairo_format_t cairo_format; + void *data; + int pitch; if (surface->format == (cairo_format_t) -1) { - if( intrest_rec ) { + DFBSurfaceCapabilities caps; + + if (intrest_rec) { source_rect.x = intrest_rec->x; source_rect.y = intrest_rec->y; source_rect.w = intrest_rec->width; source_rect.h = intrest_rec->height; - }else { - source_rect.x=0; - source_rect.y=0; - surface->dfbsurface->GetSize (surface->dfbsurface,&source_rect.w, &source_rect.h); + } else { + source_rect.x = 0; + source_rect.y = 0; + surface->dfbsurface->GetSize (surface->dfbsurface, + &source_rect.w, &source_rect.h); } - D_DEBUG_AT (Cairo_DirectFB, "%s buffer for surface.\n", - surface->dfbsurface ? "Reallocating" : "Allocating"); - cairo_format = directfb_to_cairo_format(DSPF_ARGB); - buffer = _directfb_buffer_surface_create (surface->dfb,DSPF_ARGB,source_rect.w,source_rect.h); - if (!buffer) - goto ERROR; - *image_extra = buffer; - buffer->SetBlittingFlags (buffer,DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE); - buffer->Blit (buffer,surface->dfbsurface,&source_rect,0,0); - } else { + + if (surface->tmpsurface) { + int w, h; + surface->tmpsurface->GetSize (surface->tmpsurface, &w, &h); + if (w < source_rect.w || h < source_rect.h) { + surface->tmpsurface->Release (surface->tmpsurface); + surface->tmpsurface = NULL; + } + } + + cairo_format = _cairo_format_from_content (surface->content); + if (!surface->tmpsurface) { + D_DEBUG_AT (Cairo_DirectFB, "Allocating buffer for surface %p.\n", surface); + + surface->tmpsurface = + _directfb_buffer_surface_create (surface->dfb, + _cairo_to_directfb_format (cairo_format), + source_rect.w, source_rect.h); + if (!surface->tmpsurface) + goto ERROR; + } + buffer = surface->tmpsurface; + + surface->dfbsurface->GetCapabilities (surface->dfbsurface, &caps); + if (caps & DSCAPS_FLIPPING) { + DFBRegion region = { .x1 = source_rect.x, .y1 = source_rect.y, + .x2 = source_rect.x + source_rect.w - 1, + .y2 = source_rect.y + source_rect.h - 1 }; + surface->dfbsurface->Flip (surface->dfbsurface, ®ion, DSFLIP_BLIT); + } + buffer->Blit (buffer, surface->dfbsurface, &source_rect, 0, 0); + } + else { /*might be a subsurface get the offset*/ - surface->dfbsurface->GetVisibleRectangle (surface->dfbsurface,&source_rect); - buffer = surface->dfbsurface; - *image_extra = buffer; + surface->dfbsurface->GetVisibleRectangle (surface->dfbsurface, &source_rect); + cairo_format = surface->format; + buffer = surface->dfbsurface; } - - - if( buffer->Lock (buffer,lock_flags, &data, &pitch) ) + + *image_extra = buffer; + + if (buffer->Lock (buffer, lock_flags, &data, &pitch)) { + D_DEBUG_AT (Cairo_DirectFB, "Couldn't lock surface!\n"); goto ERROR; + } - *image_out = (cairo_image_surface_t *)cairo_image_surface_create_for_data (data, - cairo_format,source_rect.w,source_rect.h, pitch); - if (*image_out == NULL ) - goto ERROR; + *image_out = (cairo_image_surface_t *) + cairo_image_surface_create_for_data (data, cairo_format, + source_rect.w, source_rect.h, pitch); + if (*image_out == NULL) + goto ERROR; if (image_rect_out) { image_rect_out->x = source_rect.x; image_rect_out->y = source_rect.y; image_rect_out->width = source_rect.w; image_rect_out->height = source_rect.h; - }else { - /*lock for read*/ + } else { + /* lock for read */ cairo_surface_t *sur = &((*image_out)->base); - /*might be a subsurface*/ - if( buffer == surface->dfbsurface ) - cairo_surface_set_device_offset (sur,source_rect.x,source_rect.y); + /* might be a subsurface */ + if (buffer == surface->dfbsurface) + cairo_surface_set_device_offset (sur, source_rect.x, source_rect.y); } - return CAIRO_STATUS_SUCCESS; + + return CAIRO_STATUS_SUCCESS; - ERROR: +ERROR: *image_extra = NULL; - if( buffer ) { - buffer->Unlock (buffer); - if( buffer != surface->dfbsurface) - buffer->Release(buffer); + if (buffer) { + buffer->Unlock (buffer); + if (buffer != surface->dfbsurface) + buffer->Release (buffer); } return _cairo_error (CAIRO_STATUS_NO_MEMORY); } @@ -415,26 +453,42 @@ _cairo_directfb_surface_create_similar (void *abstract_src, format = _cairo_format_from_content (content); surface = calloc (1, sizeof(cairo_directfb_surface_t)); if (!surface) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return NULL; } - surface->dfbsurface = _directfb_buffer_surface_create (source->dfb, - cairo_to_directfb_format (format), - width, height); - assert(surface->dfbsurface); - - surface->owner = TRUE; + surface->dfb = source->dfb; + + if (width < 8 || height < 8) { + IDirectFBSurface *tmp; + /* Some cards (e.g. Matrox) don't support surfaces smaller than 8x8 */ + tmp = _directfb_buffer_surface_create (surface->dfb, + _cairo_to_directfb_format (format), + MAX (width, 8), MAX (height, 8)); + if (tmp) { + DFBRectangle rect = { .x=0, .y=0, .w=width, .h=height }; + tmp->GetSubSurface (tmp, &rect, &surface->dfbsurface); + tmp->Release (tmp); + } + } + else { + surface->dfbsurface = _directfb_buffer_surface_create (surface->dfb, + _cairo_to_directfb_format (format), width, height); + } + if (!surface->dfbsurface) { - assert(0); + D_ASSERT (surface->dfbsurface != NULL); free (surface); return NULL; } - _cairo_surface_init (&surface->base, &cairo_directfb_surface_backend,content); - surface->dfb = source->dfb; - surface->format = format; - surface->width = width; - surface->height = height; + + _cairo_surface_init (&surface->base, &cairo_directfb_surface_backend, content); + surface->format = format; + surface->content = content; + surface->width = width; + surface->height = height; + surface->local = true; + return &surface->base; } @@ -456,16 +510,19 @@ _cairo_directfb_surface_finish (void *data) cairo_surface_destroy (surface->color); surface->color = NULL; } + + if (surface->tmpsurface) { + surface->tmpsurface->Release (surface->tmpsurface); + surface->tmpsurface = NULL; + } if (surface->dfbsurface) { - if( surface->owner ) surface->dfbsurface->Release (surface->dfbsurface); - surface->dfbsurface = NULL; + surface->dfbsurface = NULL; } - if (surface->dfb) { - surface->dfb = NULL; - } + if (surface->dfb) + surface->dfb = NULL; return CAIRO_STATUS_SUCCESS; } @@ -476,9 +533,12 @@ _cairo_directfb_surface_acquire_source_image (void *abstract_s void **image_extra) { cairo_directfb_surface_t *surface = abstract_surface; + D_DEBUG_AT (Cairo_DirectFB, "%s( surface=%p ).\n", __FUNCTION__, surface); - return _directfb_acquire_surface (surface,NULL,image_out,NULL,image_extra,DSLF_READ); + + return _directfb_acquire_surface (surface, NULL, image_out, + NULL, image_extra, DSLF_READ); } static void @@ -493,33 +553,36 @@ _cairo_directfb_surface_release_source_image (void *abstract_su "%s( surface=%p ).\n", __FUNCTION__, surface); buffer->Unlock (buffer); - if (surface->dfbsurface != buffer) { - buffer->Release (buffer); - } + cairo_surface_destroy (&image->base); } static cairo_status_t -_cairo_directfb_surface_acquire_dest_image (void *abstract_surface, - cairo_rectangle_int_t *interest_rect, - cairo_image_surface_t **image_out, - cairo_rectangle_int_t *image_rect_out, - void **image_extra) +_cairo_directfb_surface_acquire_dest_image (void *abstract_surface, + cairo_rectangle_int_t *interest_rect, + cairo_image_surface_t **image_out, + cairo_rectangle_int_t *image_rect_out, + void **image_extra) { cairo_directfb_surface_t *surface = abstract_surface; D_DEBUG_AT (Cairo_DirectFB, - "%s( surface=%p ).\n", __FUNCTION__, surface); + "%s( surface=%p, interest_rect={ %d %d %d %d } ).\n", + __FUNCTION__, surface, + interest_rect ? interest_rect->x : 0, + interest_rect ? interest_rect->y : 0, + interest_rect ? interest_rect->width : surface->width, + interest_rect ? interest_rect->height : surface->height); - return _directfb_acquire_surface (surface,interest_rect,image_out,image_rect_out,image_extra, - DSLF_READ | DSLF_WRITE); + return _directfb_acquire_surface (surface, interest_rect, image_out, + image_rect_out, image_extra, DSLF_READ | DSLF_WRITE); } static void _cairo_directfb_surface_release_dest_image (void *abstract_surface, - cairo_rectangle_int_t *interest_rect, + cairo_rectangle_int_t *interest_rect, cairo_image_surface_t *image, - cairo_rectangle_int_t *image_rect, + cairo_rectangle_int_t *image_rect, void *image_extra) { cairo_directfb_surface_t *surface = abstract_surface; @@ -527,29 +590,29 @@ _cairo_directfb_surface_release_dest_image (void *abstract_surf D_DEBUG_AT (Cairo_DirectFB, "%s( surface=%p ).\n", __FUNCTION__, surface); + buffer->Unlock (buffer); if (surface->dfbsurface != buffer) { DFBRegion region = { .x1 = interest_rect->x, .y1 = interest_rect->y, - .x2 = interest_rect->x+interest_rect->width-1, - .y2 = interest_rect->y+interest_rect->height-1 }; + .x2 = interest_rect->x+interest_rect->width-1, + .y2 = interest_rect->y+interest_rect->height-1 }; surface->dfbsurface->SetClip (surface->dfbsurface, ®ion); - /* surface->dfbsurface->SetBlittingFlags (surface->dfbsurface, - DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE); */ - surface->dfbsurface->Blit (surface->dfbsurface,buffer,NULL, - image_rect->x,image_rect->y); - buffer->Release (buffer); + surface->dfbsurface->SetBlittingFlags (surface->dfbsurface, DSBLIT_NOFX); + surface->dfbsurface->Blit (surface->dfbsurface, buffer, + NULL, image_rect->x, image_rect->y); } + cairo_surface_destroy (&image->base); } static cairo_status_t _cairo_directfb_surface_clone_similar (void *abstract_surface, cairo_surface_t *src, - int src_x, - int src_y, - int width, - int height, + int src_x, + int src_y, + int width, + int height, cairo_surface_t **clone_out) { cairo_directfb_surface_t *surface = abstract_surface; @@ -586,8 +649,8 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, return _cairo_error (CAIRO_STATUS_NO_MEMORY); } - dst += pitch * src_y; - src += image_src->stride * src_y; + dst += pitch * src_y; + src += image_src->stride * src_y; if (image_src->format == CAIRO_FORMAT_A1) { /* A1 -> A8 */ @@ -599,9 +662,20 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, } } else { - /* A8 -> A8 */ + int len; + + if (image_src->format == CAIRO_FORMAT_A8) { + dst += src_x; + src += src_x; + len = width; + } else { + dst += src_x * 4; + src += src_x * 4; + len = width * 4; + } + for (i = 0; i < height; i++) { - direct_memcpy( dst+src_x, src+src_x, sizeof(*dst)*width ); + direct_memcpy (dst+src_x, src+src_x, len); dst += pitch; src += image_src->stride; } @@ -619,7 +693,7 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, #if DFB_COMPOSITE || DFB_COMPOSITE_TRAPEZOIDS static cairo_int_status_t -_directfb_prepare_composite (cairo_directfb_surface_t *dst, +_directfb_prepare_composite (cairo_directfb_surface_t *dst, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, cairo_operator_t op, @@ -631,14 +705,14 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, cairo_surface_attributes_t *ret_src_attr) { cairo_directfb_surface_t *src; - cairo_surface_attributes_t src_attr; + cairo_surface_attributes_t src_attr; cairo_status_t ret; DFBSurfaceBlittingFlags flags; DFBSurfaceBlendFunction sblend; DFBSurfaceBlendFunction dblend; DFBColor color; - if (_directfb_get_operator (op, NULL, &flags, &sblend, &dblend)) + if (_directfb_get_operator (op, &sblend, &dblend)) return CAIRO_INT_STATUS_UNSUPPORTED; if (mask_pattern) { @@ -663,10 +737,9 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, mask_pattern = tmp; *mask_x = tmp_x; *mask_y = tmp_y; - if (sblend == DSBF_ONE) { - flags |= DSBLIT_BLEND_ALPHACHANNEL; + if (sblend == DSBF_ONE) { sblend = DSBF_SRCALPHA; - /* dblend = DSBF_INVSRCALPHA; */ + /*dblend = DSBF_INVSRCALPHA;*/ } } @@ -691,14 +764,12 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, } src = (cairo_directfb_surface_t *)dst->color; - src->dfbsurface->SetColor (src->dfbsurface, - pattern->color.red_short >> 8, - pattern->color.green_short >> 8, - pattern->color.blue_short >> 8, - pattern->color.alpha_short >> 8); - src->dfbsurface->FillRectangle (src->dfbsurface, 0, 0, 1, 1); - - cairo_matrix_init_identity (&src_attr.matrix); + src->dfbsurface->Clear (src->dfbsurface, + pattern->color.red_short >> 8, + pattern->color.green_short >> 8, + pattern->color.blue_short >> 8, + pattern->color.alpha_short >> 8); + src_attr.matrix = src_pattern->matrix; src_attr.extend = CAIRO_EXTEND_NONE; src_attr.filter = CAIRO_FILTER_NEAREST; @@ -712,7 +783,32 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, if (ret) return ret; } - + + if (src->content == CAIRO_CONTENT_COLOR) { + if (sblend == DSBF_SRCALPHA) + sblend = DSBF_ONE; + else if (sblend == DSBF_INVSRCALPHA) + sblend = DSBF_ZERO; + + if (dblend == DSBF_SRCALPHA) + dblend = DSBF_ONE; + else if (dblend == DSBF_INVSRCALPHA) + dblend = DSBF_ZERO; + } + if (dst->content == CAIRO_CONTENT_COLOR) { + if (sblend == DSBF_DESTALPHA) + sblend = DSBF_ONE; + else if (sblend == DSBF_INVDESTALPHA) + sblend = DSBF_ZERO; + + if (dblend == DSBF_DESTALPHA) + dblend = DSBF_ONE; + else if (dblend == DSBF_INVDESTALPHA) + dblend = DSBF_ZERO; + } + + flags = (sblend == DSBF_ONE && dblend == DSBF_ZERO) + ? DSBLIT_NOFX : DSBLIT_BLEND_ALPHACHANNEL; if (color.a != 0xff) flags |= DSBLIT_BLEND_COLORALPHA; if (color.r != 0xff || color.g != 0xff || color.b != 0xff) @@ -720,7 +816,7 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, dst->dfbsurface->SetBlittingFlags (dst->dfbsurface, flags); - if (flags & (DSBLIT_BLEND_COLORALPHA | DSBLIT_BLEND_ALPHACHANNEL)) { + if (flags & (DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_BLEND_COLORALPHA)) { dst->dfbsurface->SetSrcBlendFunction (dst->dfbsurface, sblend); dst->dfbsurface->SetDstBlendFunction (dst->dfbsurface, dblend); } @@ -746,6 +842,30 @@ _directfb_finish_composite (cairo_directfb_surface_t *dst, #endif /* DFB_COMPOSITE || DFB_COMPOSITE_TRAPEZOIDS */ #if DFB_COMPOSITE +static DFBAccelerationMask +_directfb_categorize_operation (cairo_surface_attributes_t *src_attr) +{ + cairo_matrix_t *m = &src_attr->matrix; + + if (m->xy != 0 || m->yx != 0 || m->xx < 0 || m->yy < 0) { + if (src_attr->extend != CAIRO_EXTEND_NONE) + return DFXL_NONE; + return DFXL_TEXTRIANGLES; + } + + if (m->xx != 1 || m->yy != 1) { + if (src_attr->extend != CAIRO_EXTEND_NONE) + return DFXL_NONE; + return DFXL_STRETCHBLIT; + } + + if (src_attr->extend != CAIRO_EXTEND_NONE && + src_attr->extend != CAIRO_EXTEND_REPEAT) + return DFXL_NONE; + + return DFXL_BLIT; +} + static cairo_int_status_t _cairo_directfb_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, @@ -758,10 +878,10 @@ _cairo_directfb_surface_composite (cairo_operator_t op, unsigned int height) { cairo_directfb_surface_t *dst = abstract_dst; - cairo_directfb_surface_t *src = NULL; /* hide compiler warning */ + cairo_directfb_surface_t *src; cairo_surface_attributes_t src_attr; - cairo_matrix_t *m; - cairo_status_t ret; + DFBAccelerationMask accel, mask; + cairo_int_status_t ret; D_DEBUG_AT (Cairo_DirectFB, "%s( op=%d, src_pattern=%p, mask_pattern=%p, dst=%p," @@ -775,133 +895,142 @@ _cairo_directfb_surface_composite (cairo_operator_t op, width, height, &src, &src_attr); if (ret) return ret; + + accel = _directfb_categorize_operation (&src_attr); - ret = CAIRO_INT_STATUS_UNSUPPORTED; + dst->dfbsurface->GetAccelerationMask (dst->dfbsurface, src->dfbsurface, &mask); + if (!(mask & accel)) { + D_DEBUG_AT (Cairo_DirectFB, "No acceleration (%08x)!\n", accel); + if (accel != DFXL_BLIT) { + _directfb_finish_composite (dst, src_pattern, &src->base, &src_attr); + return CAIRO_INT_STATUS_UNSUPPORTED; + } + } + + src_x += src_attr.x_offset; + src_y += src_attr.y_offset; - m = &src_attr.matrix; - if (_cairo_matrix_is_integer_translation (m, NULL, NULL)) { - DFBRectangle sr; + switch (accel) { + case DFXL_BLIT: { + DFBRectangle sr; - sr.x = src_x + src_attr.x_offset; - sr.y = src_y + src_attr.y_offset; - sr.w = src->width - sr.x; - sr.h = src->height - sr.y; + sr.x = src_x + _cairo_lround (src_attr.matrix.x0); + sr.y = src_y + _cairo_lround (src_attr.matrix.y0); + sr.w = width; + sr.h = height; - if (src_attr.extend == CAIRO_EXTEND_NONE) { - D_DEBUG_AT (Cairo_DirectFB, "Running Blit().\n"); + if (src_attr.extend == CAIRO_EXTEND_NONE) { + D_DEBUG_AT (Cairo_DirectFB, "Running Blit().\n"); - RUN_CLIPPED( dst, NULL, - dst->dfbsurface->Blit (dst->dfbsurface, + RUN_CLIPPED( dst, NULL, + dst->dfbsurface->Blit (dst->dfbsurface, src->dfbsurface, &sr, dst_x, dst_y)); - ret = CAIRO_STATUS_SUCCESS; - } - else if (src_attr.extend == CAIRO_EXTEND_REPEAT) { - DFBRegion clip; + } + else if (src_attr.extend == CAIRO_EXTEND_REPEAT) { + DFBRegion clip; - clip.x1 = dst_x; - clip.y1 = dst_y; - clip.x2 = dst_x + width - 1; - clip.y2 = dst_y + height - 1; + clip.x1 = dst_x; + clip.y1 = dst_y; + clip.x2 = dst_x + width - 1; + clip.y2 = dst_y + height - 1; - D_DEBUG_AT (Cairo_DirectFB, "Running TileBlit().\n"); + D_DEBUG_AT (Cairo_DirectFB, "Running TileBlit().\n"); - RUN_CLIPPED( dst, &clip, - dst->dfbsurface->TileBlit (dst->dfbsurface, - src->dfbsurface, &sr, dst_x, dst_y)); - ret = CAIRO_STATUS_SUCCESS; - } - } - else if (src_attr.extend == CAIRO_EXTEND_NONE && - cairo_matrix_invert (m) == CAIRO_STATUS_SUCCESS) - { - DFBAccelerationMask accel; - - /* Yet I don't fully understand what these src_x/src_y mean. - * It seems they are X11 specific, so I ignore them for now. - */ - src_x = src_y = 0; - - dst->dfbsurface->GetAccelerationMask (dst->dfbsurface, src->dfbsurface, &accel); + RUN_CLIPPED( dst, &clip, + dst->dfbsurface->TileBlit (dst->dfbsurface, + src->dfbsurface, &sr, dst_x, dst_y)); + } + } break; - if (m->xy != 0.0 || m->yx != 0.0) { - if (accel & DFXL_TEXTRIANGLES) { - DFBVertex v[4]; - float w, h; - float x1, y1, x2, y2; - int i; + case DFXL_STRETCHBLIT: { + DFBRectangle sr, dr; + double x1, y1, x2, y2; - w = MAX (src->width, 8); - h = MAX (src->height, 8); + TRANSFORM_POINT2X (src_attr.matrix, + src_x, src_y, x1, y1); + TRANSFORM_POINT2X (src_attr.matrix, + src_x+width, src_y+height, x2, y2); + + sr.x = _cairo_lround (x1); + sr.y = _cairo_lround (y1); + sr.w = _cairo_lround (x2-x1); + sr.h = _cairo_lround (y2-y1); - x1 = src_x + src_attr.x_offset; - y1 = src_y + src_attr.y_offset; - x2 = src->width - x1; - y2 = src->height - y1; - - v[0].x = x1; - v[0].y = y1; - v[0].s = x1/w; - v[0].t = y1/h; + dr.x = dst_x; + dr.y = dst_y; + dr.w = width; + dr.h = height; + + D_DEBUG_AT (Cairo_DirectFB, "Running StretchBlit().\n"); + + RUN_CLIPPED (dst, NULL, + dst->dfbsurface->StretchBlit (dst->dfbsurface, + src->dfbsurface, &sr, &dr)); + } break; - v[1].x = x2; - v[1].y = y1; - v[1].s = x2/w; - v[1].t = y1/h; + case DFXL_TEXTRIANGLES: { + DFBRegion clip; + DFBVertex v[4]; + float x1, y1, x2, y2; + int w, h; + + if (cairo_matrix_invert (&src_attr.matrix) != CAIRO_STATUS_SUCCESS) { + ret = CAIRO_INT_STATUS_UNSUPPORTED; + break; + } + + x1 = src_attr.x_offset; + y1 = src_attr.y_offset; + x2 = src->width - x1; + y2 = src->height - y1; + + src->dfbsurface->GetSize (src->dfbsurface, &w, &h); + + TRANSFORM_POINT3X (src_attr.matrix, + x1, y1, v[0].x, v[0].y); + v[0].z = 0; + v[0].w = 1; + v[0].s = x1 / w; + v[0].t = y1 / h; - v[2].x = x2; - v[2].y = y2; - v[2].s = x2/w; - v[2].t = y2/h; + TRANSFORM_POINT3X (src_attr.matrix, + x2, y1, v[1].x, v[1].y); + v[1].z = 0; + v[1].w = 1; + v[1].s = x2 / w; + v[1].t = y1 / h; - v[3].x = x1; - v[3].y = y2; - v[3].s = x1/w; - v[3].t = y2/h; + TRANSFORM_POINT3X (src_attr.matrix, + x2, y2, v[2].x, v[2].y); + v[2].z = 0; + v[2].w = 1; + v[2].s = x2 / w; + v[2].t = y2 / h; - for (i = 0; i < 4; i++) { - TRANSFORM_POINT (m, v[i].x, v[i].y, v[i].x, v[i].y); - v[i].z = 0; - v[i].w = 1; - } + TRANSFORM_POINT3X (src_attr.matrix, + x1, y2, v[3].x, v[3].y); + v[3].z = 0; + v[3].w = 1; + v[3].s = x1 / w; + v[3].t = y2 / h; + + clip.x1 = dst_x; + clip.y1 = dst_y; + clip.x2 = dst_x + width - 1; + clip.y2 = dst_y + height - 1; - D_DEBUG_AT (Cairo_DirectFB, "Running TextureTriangles().\n"); + D_DEBUG_AT (Cairo_DirectFB, "Running TextureTriangles().\n"); - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->TextureTriangles (dst->dfbsurface, + RUN_CLIPPED (dst, &clip, + dst->dfbsurface->TextureTriangles (dst->dfbsurface, src->dfbsurface, v, NULL, 4, DTTF_FAN)); - ret = CAIRO_STATUS_SUCCESS; - } - } - else { - if (accel & DFXL_STRETCHBLIT || - src_attr.filter == CAIRO_FILTER_NEAREST) - { - DFBRectangle sr, dr; - double x1, y1, x2, y2; - - sr.x = src_x + src_attr.x_offset; - sr.y = src_y + src_attr.y_offset; - sr.w = src->width - sr.x; - sr.h = src->height - sr.y; - - TRANSFORM_POINT (m, sr.x, sr.y, x1, y1); - TRANSFORM_POINT (m, sr.x+sr.w, sr.y+sr.h, x2, y2); - - dr.x = _cairo_lround (x1); - dr.y = _cairo_lround (y1); - dr.w = _cairo_lround (x2-x1); - dr.h = _cairo_lround (y2-y1); + } break; - D_DEBUG_AT (Cairo_DirectFB, "Running StretchBlit().\n"); + default: + D_BUG ("Unexpected operation"); + break; + } - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->StretchBlit (dst->dfbsurface, - src->dfbsurface, &sr, &dr)); - ret = CAIRO_STATUS_SUCCESS; - } - } - } - _directfb_finish_composite (dst, src_pattern, &src->base, &src_attr); return ret; @@ -910,13 +1039,13 @@ _cairo_directfb_surface_composite (cairo_operator_t op, #if DFB_RECTANGLES static cairo_int_status_t -_cairo_directfb_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t op, - const cairo_color_t *color, - cairo_rectangle_int_t *rects, - int n_rects) +_cairo_directfb_surface_fill_rectangles (void *abstract_surface, + cairo_operator_t op, + const cairo_color_t *color, + cairo_rectangle_int_t *rects, + int n_rects) { - cairo_directfb_surface_t *dst = abstract_surface; + cairo_directfb_surface_t *dst = abstract_surface; DFBSurfaceDrawingFlags flags; DFBSurfaceBlendFunction sblend; DFBSurfaceBlendFunction dblend; @@ -927,19 +1056,44 @@ _cairo_directfb_surface_fill_rectangles (void *abstract_surface, "%s( dst=%p, op=%d, color=%p, rects=%p, n_rects=%d ).\n", __FUNCTION__, dst, op, color, rects, n_rects); - if (_directfb_get_operator (op, &flags, NULL, &sblend, &dblend)) + if (_directfb_get_operator (op, &sblend, &dblend)) return CAIRO_INT_STATUS_UNSUPPORTED; + + if (color->alpha_short >= 0xff00) { + if (sblend == DSBF_SRCALPHA) + sblend = DSBF_ONE; + else if (sblend == DSBF_INVSRCALPHA) + sblend = DSBF_ZERO; + + if (dblend == DSBF_SRCALPHA) + dblend = DSBF_ONE; + else if (dblend == DSBF_INVSRCALPHA) + dblend = DSBF_ZERO; + } + if (dst->content == CAIRO_CONTENT_COLOR) { + if (sblend == DSBF_DESTALPHA) + sblend = DSBF_ONE; + else if (sblend == DSBF_INVDESTALPHA) + sblend = DSBF_ZERO; + + if (dblend == DSBF_DESTALPHA) + dblend = DSBF_ONE; + else if (dblend == DSBF_INVDESTALPHA) + dblend = DSBF_ZERO; + } + flags = (sblend == DSBF_ONE && dblend == DSBF_ZERO) ? DSDRAW_NOFX : DSDRAW_BLEND; dst->dfbsurface->SetDrawingFlags (dst->dfbsurface, flags); if (flags & DSDRAW_BLEND) { dst->dfbsurface->SetSrcBlendFunction (dst->dfbsurface, sblend); dst->dfbsurface->SetDstBlendFunction (dst->dfbsurface, dblend); } - dst->dfbsurface->SetColor (dst->dfbsurface, color->red_short >> 8, - color->green_short >> 8, - color->blue_short >> 8, - color->alpha_short >> 8 ); + dst->dfbsurface->SetColor (dst->dfbsurface, + color->red_short >> 8, + color->green_short >> 8, + color->blue_short >> 8, + color->alpha_short >> 8 ); for (i = 0; i < n_rects; i++) { r[i].x = rects[i].x; @@ -1108,22 +1262,23 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface, if (region) { cairo_box_int_t *boxes; - int n_boxes, i; - cairo_status_t status; + int n_boxes; + cairo_status_t status; + int i; status = _cairo_region_get_boxes (region, &n_boxes, &boxes); - if (status) - return status; - + if (status) + return status; + if (surface->n_clips != n_boxes) { - if( surface->clips ) + if (surface->clips) free (surface->clips); surface->clips = _cairo_malloc_ab (n_boxes, sizeof(DFBRegion)); if (!surface->clips) { - _cairo_region_boxes_fini (region, boxes); surface->n_clips = 0; - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + _cairo_region_boxes_fini (region, boxes); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); } surface->n_clips = n_boxes; @@ -1150,7 +1305,7 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface, } static cairo_int_status_t -_cairo_directfb_abstract_surface_get_extents (void *abstract_surface, +_cairo_directfb_abstract_surface_get_extents (void *abstract_surface, cairo_rectangle_int_t *rectangle) { cairo_directfb_surface_t *surface = abstract_surface; @@ -1159,55 +1314,20 @@ _cairo_directfb_abstract_surface_get_extents (void *abstract_surfac "%s( surface=%p, rectangle=%p ).\n", __FUNCTION__, surface, rectangle); - if (rectangle) { + if (rectangle) { + if (!surface->local) { + surface->dfbsurface->GetSize (surface->dfbsurface, + &surface->width, &surface->height); + } rectangle->x = 0; rectangle->y = 0; - rectangle->width = surface->width; + rectangle->width = surface->width; rectangle->height = surface->height; } return CAIRO_STATUS_SUCCESS; } -static cairo_status_t -_cairo_directfb_surface_mark_dirty_rectangle (void *abstract_surface, - int x, - int y, - int width, - int height) -{ -#if 0 - cairo_directfb_surface_t *surface = abstract_surface; - - D_DEBUG_AT (Cairo_DirectFB, - "%s( surface=%p, x=%d, y=%d, width=%d, height=%d ).\n", - __FUNCTION__, surface, x, y, width, height); - if( !surface->dirty_region ) - surface->dirty_region = malloc(sizeof(DFBRegion)); - if (!dirty_region) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -#endif - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_cairo_directfb_surface_flush (void *abstract_surface) -{ -#if 0 - cairo_directfb_surface_t *surface = abstract_surface; - - D_DEBUG_AT (Cairo_DirectFB, - "%s( surface=%p ).\n", __FUNCTION__, surface); - - if (surface->surface != surface->buffer) { - surface->surface->SetClip (surface->surface, NULL); - surface->surface->SetBlittingFlags (surface->surface, DSBLIT_NOFX); - surface->surface->Blit (surface->surface, surface->buffer, NULL, 0, 0); - } -#endif - return CAIRO_STATUS_SUCCESS; -} - #if DFB_SHOW_GLYPHS static cairo_directfb_font_cache_t* _directfb_allocate_font_cache (IDirectFB *dfb, int width, int height) @@ -1215,21 +1335,16 @@ _directfb_allocate_font_cache (IDirectFB *dfb, int width, int height) cairo_directfb_font_cache_t *cache; cache = calloc (1, sizeof(cairo_directfb_font_cache_t)); - if (!cache) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NULL; - } + if (!cache) + return NULL; - cache->dfbsurface = _directfb_buffer_surface_create( dfb, DSPF_A8, width, height); + cache->dfb = dfb; + cache->dfbsurface = _directfb_buffer_surface_create (dfb, + _directfb_argb_font ? DSPF_ARGB : DSPF_A8, width, height); if (!cache->dfbsurface) { free (cache); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); return NULL; } - - /* dfb->AddRef (dfb); */ - cache->dfb = dfb; - cache->width = width; cache->height = height; @@ -1284,6 +1399,7 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, switch (img->format) { case CAIRO_FORMAT_A1: case CAIRO_FORMAT_A8: + case CAIRO_FORMAT_ARGB32: break; default: D_DEBUG_AT (Cairo_DirectFB, @@ -1306,7 +1422,7 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, if (x+img->width > 2048) { x = 0; y = h; - h = 8; + h = 0; } rects[n].x = x; @@ -1321,7 +1437,7 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, /* Remember glyph location */ rect = malloc (sizeof(DFBRectangle)); if (!rect) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); *rect = rects[n]; scaled_glyph->surface_private = rect; @@ -1346,6 +1462,8 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, return CAIRO_INT_STATUS_NOTHING_TO_DO; h += y; + w = MAX (w, 8); + h = MAX (h, 8); if (cache) { if (cache->width < w || cache->height < h) { @@ -1359,10 +1477,10 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, new_cache = _directfb_allocate_font_cache (surface->dfb, w, h); if (!new_cache) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); new_cache->dfbsurface->Blit (new_cache->dfbsurface, - cache->dfbsurface, NULL, 0, 0); + cache->dfbsurface, NULL, 0, 0); _directfb_destroy_font_cache (cache); scaled_font->surface_private = cache = new_cache; @@ -1373,8 +1491,8 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, "Allocating font cache (%dx%d).\n", w, h); cache = _directfb_allocate_font_cache (surface->dfb, w, h); - if (!cache) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + if (!cache) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); scaled_font->surface_backend = &cairo_directfb_surface_backend; scaled_font->surface_private = cache; @@ -1385,27 +1503,57 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, int pitch; if (cache->dfbsurface->Lock (cache->dfbsurface, - DSLF_WRITE, (void *)&data, &pitch)) + DSLF_WRITE, (void *)&data, &pitch)) return _cairo_error (CAIRO_STATUS_NO_MEMORY); - + for (i = 0; i < num_chars; i++) { cairo_image_surface_t *img = chars[i]->surface; DFBRectangle *rect = chars[i]->surface_private; - unsigned char *dst = data + rect->y*pitch + rect->x; + unsigned char *dst = data; unsigned char *src = img->data; + int j; + dst += rect->y * pitch + (_directfb_argb_font ? (rect->x<<2) : rect->x); + if (img->format == CAIRO_FORMAT_A1) { - int j; for (h = rect->h; h; h--) { - for (j = 0; j < rect->w; j++) - dst[j] = (src[j>>3] & (1 << (j&7))) ? 0xff : 0x00; + if (_directfb_argb_font) { + for (j = 0; j < rect->w; j++) + ((uint32_t *)dst)[j] = (src[j>>3] & (1 << (j&7))) ? 0xffffffff : 0; + } + else { + for (j = 0; j < rect->w; j++) + dst[j] = (src[j>>3] & (1 << (j&7))) ? 0xff : 0; + } + dst += pitch; src += img->stride; } } - else { + else if (img->format == CAIRO_FORMAT_A8) { for (h = rect->h; h; h--) { - direct_memcpy (dst, src, rect->w); + if (_directfb_argb_font) { + for (j = 0; j < rect->w; j++) + ((uint32_t *)dst)[j] = src[j] * 0x01010101; + } + else { + direct_memcpy (dst, src, rect->w); + } + + dst += pitch; + src += img->stride; + } + } + else { /* ARGB32 */ + for (h = rect->h; h; h--) { + if (_directfb_argb_font) { + direct_memcpy (dst, src, rect->w<<2); + } + else { + for (j = 0; j < rect->w; j++) + dst[j] = ((uint32_t *)src)[j] >> 24; + } + dst += pitch; src += img->stride; } @@ -1452,15 +1600,13 @@ _cairo_directfb_surface_scaled_glyph_fini (cairo_scaled_glyph_t *scaled_glyph, } } - - static cairo_int_status_t -_cairo_directfb_surface_show_glyphs ( void *abstract_dst, - cairo_operator_t op, - cairo_pattern_t *pattern, - cairo_glyph_t *glyphs, - int num_glyphs, - cairo_scaled_font_t *scaled_font) +_cairo_directfb_surface_show_glyphs (void *abstract_dst, + cairo_operator_t op, + cairo_pattern_t *pattern, + cairo_glyph_t *glyphs, + int num_glyphs, + cairo_scaled_font_t *scaled_font) { cairo_directfb_surface_t *dst = abstract_dst; cairo_directfb_font_cache_t *cache; @@ -1480,7 +1626,7 @@ _cairo_directfb_surface_show_glyphs ( void *abstract_dst, if (pattern->type != CAIRO_PATTERN_TYPE_SOLID) return CAIRO_INT_STATUS_UNSUPPORTED; - if (_directfb_get_operator (op, NULL, &flags, &sblend, &dblend) || + if (_directfb_get_operator (op, &sblend, &dblend) || sblend == DSBF_DESTALPHA || sblend == DSBF_INVDESTALPHA) return CAIRO_INT_STATUS_UNSUPPORTED; @@ -1493,18 +1639,20 @@ _cairo_directfb_surface_show_glyphs ( void *abstract_dst, } color.a = ((cairo_solid_pattern_t *)pattern)->color.alpha_short >> 8; - color.r = ((cairo_solid_pattern_t *)pattern)->color.red_short >> 8; + color.r = ((cairo_solid_pattern_t *)pattern)->color.red_short >> 8; color.g = ((cairo_solid_pattern_t *)pattern)->color.green_short >> 8; - color.b = ((cairo_solid_pattern_t *)pattern)->color.blue_short >> 8; + color.b = ((cairo_solid_pattern_t *)pattern)->color.blue_short >> 8; - flags |= DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE; + flags = DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE; if (color.a != 0xff) flags |= DSBLIT_BLEND_COLORALPHA; - if (sblend == DSBF_ONE) { - sblend = DSBF_SRCALPHA; - if (dblend == DSBF_ZERO) - dblend = DSBF_INVSRCALPHA; + if (!_directfb_argb_font) { + if (sblend == DSBF_ONE) { + sblend = DSBF_SRCALPHA; + if (dblend == DSBF_ZERO) + dblend = DSBF_INVSRCALPHA; + } } dst->dfbsurface->SetBlittingFlags (dst->dfbsurface, flags); @@ -1524,9 +1672,7 @@ _cairo_directfb_surface_show_glyphs ( void *abstract_dst, static cairo_bool_t -_cairo_directfb_surface_is_similar (void *surface_a, - void *surface_b, - cairo_content_t content) +_cairo_directfb_surface_is_similar (void *surface_a, void *surface_b, cairo_content_t content) { cairo_directfb_surface_t *a = (cairo_directfb_surface_t *) surface_a; cairo_directfb_surface_t *b = (cairo_directfb_surface_t *) surface_b; @@ -1560,16 +1706,16 @@ static cairo_surface_backend_t cairo_directfb_surface_backend = { #endif NULL, /* copy_page */ NULL, /* show_page */ - _cairo_directfb_surface_set_clip_region,/*set_clip_region*/ + _cairo_directfb_surface_set_clip_region,/* set_clip_region */ NULL, /* intersect_clip_path */ - _cairo_directfb_abstract_surface_get_extents,/*get_extents*/ + _cairo_directfb_abstract_surface_get_extents,/* get_extents */ NULL, /* old_show_glyphs */ NULL, /* get_font_options */ - _cairo_directfb_surface_flush,/*flush*/ - _cairo_directfb_surface_mark_dirty_rectangle,/*mark_dirty_rectangle*/ + NULL, /* flush */ + NULL, /* mark_dirty_rectangle */ #if DFB_SHOW_GLYPHS - _cairo_directfb_surface_scaled_font_fini,/*scaled_font_fini*/ - _cairo_directfb_surface_scaled_glyph_fini,/*scaled_glyph_fini*/ + _cairo_directfb_surface_scaled_font_fini,/* scaled_font_fini */ + _cairo_directfb_surface_scaled_glyph_fini,/* scaled_glyph_fini */ #else NULL, NULL, @@ -1579,47 +1725,61 @@ static cairo_surface_backend_t cairo_directfb_surface_backend = { NULL, /* stroke */ NULL, /* fill */ #if DFB_SHOW_GLYPHS - _cairo_directfb_surface_show_glyphs,/*show_glyphs*/ + _cairo_directfb_surface_show_glyphs,/* show_glyphs */ #else NULL, /* show_glyphs */ #endif NULL, /* snapshot */ - _cairo_directfb_surface_is_similar, - NULL /* reset */ + _cairo_directfb_surface_is_similar, + NULL /* reset */ }; static void cairo_directfb_surface_backend_init (IDirectFB *dfb) { - DFBGraphicsDeviceDescription dsc; - static int done = 0; + static int done = 0; if (done) return; - dfb->GetDeviceDescription (dfb, &dsc); - + if (getenv ("CAIRO_DIRECTFB_NO_ACCEL")) { +#if DFB_RECTANGLES + cairo_directfb_surface_backend.fill_rectangles = NULL; +#endif #if DFB_COMPOSITE - if (!(dsc.acceleration_mask & DFXL_BLIT)) cairo_directfb_surface_backend.composite = NULL; #endif - #if DFB_COMPOSITE_TRAPEZOIDS - if (!(dsc.acceleration_mask & DFXL_TEXTRIANGLES)) cairo_directfb_surface_backend.composite_trapezoids = NULL; #endif - #if DFB_SHOW_GLYPHS - if (!(dsc.acceleration_mask & DFXL_BLIT) || - !(dsc.blitting_flags & DSBLIT_COLORIZE) || - !(dsc.blitting_flags & DSBLIT_BLEND_ALPHACHANNEL)) - { cairo_directfb_surface_backend.scaled_font_fini = NULL; cairo_directfb_surface_backend.scaled_glyph_fini = NULL; cairo_directfb_surface_backend.show_glyphs = NULL; +#endif + D_DEBUG_AT (Cairo_DirectFB, "Acceleration disabled.\n"); } + else { + DFBGraphicsDeviceDescription dsc; + + dfb->GetDeviceDescription (dfb, &dsc); + +#if DFB_COMPOSITE + if (!(dsc.acceleration_mask & DFXL_BLIT)) + cairo_directfb_surface_backend.composite = NULL; +#endif + +#if DFB_COMPOSITE_TRAPEZOIDS + if (!(dsc.acceleration_mask & DFXL_TEXTRIANGLES)) + cairo_directfb_surface_backend.composite_trapezoids = NULL; #endif + } + + if (getenv ("CAIRO_DIRECTFB_ARGB_FONT")) { + _directfb_argb_font = 1; + D_DEBUG_AT (Cairo_DirectFB, "Using ARGB fonts.\n"); + } done = 1; } @@ -1628,27 +1788,29 @@ cairo_directfb_surface_backend_init (IDirectFB *dfb) cairo_surface_t * cairo_directfb_surface_create (IDirectFB *dfb, IDirectFBSurface *dfbsurface) { - DFBSurfacePixelFormat format; cairo_directfb_surface_t *surface; + DFBSurfacePixelFormat format; - assert(dfb); - assert(dfb); + D_ASSERT (dfb != NULL); + D_ASSERT (dfbsurface != NULL); + cairo_directfb_surface_backend_init (dfb); surface = calloc (1, sizeof(cairo_directfb_surface_t)); - if (!surface) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NULL; - } - + if (!surface) + return NULL; + + dfbsurface->AddRef (dfbsurface); dfbsurface->GetPixelFormat (dfbsurface, &format); - _cairo_surface_init (&surface->base, &cairo_directfb_surface_backend, - _directfb_format_to_content(format)); - surface->owner = FALSE; + dfbsurface->GetSize (dfbsurface, &surface->width, &surface->height); surface->dfb = dfb; - surface->dfbsurface = dfbsurface; - dfbsurface->GetSize (dfbsurface,&surface->width, &surface->height); - surface->format = directfb_to_cairo_format(format); + surface->dfbsurface = dfbsurface; + surface->format = _directfb_to_cairo_format (format); + surface->content = _directfb_format_to_content (format); + + _cairo_surface_init (&surface->base, + &cairo_directfb_surface_backend, surface->content); + return &surface->base; } diff --git a/src/cairo-directfb.h b/src/cairo-directfb.h index 5b35a44..59653d3 100644 --- a/src/cairo-directfb.h +++ b/src/cairo-directfb.h @@ -34,6 +34,16 @@ * Carl D. Worth <cworth@isi.edu> */ +/* + * Environment variables affecting the backend: + * + * CAIRO_DIRECTFB_NO_ACCEL (boolean) + * if found, disables acceleration at all + * + * CAIRO_DIRECTFB_ARGB_FONT (boolean) + * if found, enables using ARGB fonts instead of A8 + */ + #ifndef CAIRO_DIRECTFB_H #define CAIRO_DIRECTFB_H @@ -46,7 +56,7 @@ CAIRO_BEGIN_DECLS cairo_public cairo_surface_t * -cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *surface); +cairo_directfb_surface_create (IDirectFB *dfb, IDirectFBSurface *surface); CAIRO_END_DECLS diff --git a/src/cairo-freelist-private.h b/src/cairo-freelist-private.h index 7e2036c..0d02127 100644 --- a/src/cairo-freelist-private.h +++ b/src/cairo-freelist-private.h @@ -22,8 +22,7 @@ #ifndef CAIRO_FREELIST_H #define CAIRO_FREELIST_H -#include "cairoint.h" -#include <stddef.h> +#include "cairo-types-private.h" /* Opaque implementation types. */ typedef struct _cairo_freelist cairo_freelist_t; diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 4a8f9a4..0db38ae 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -1495,6 +1495,7 @@ _cairo_ft_scaled_font_create (cairo_ft_unscaled_font_t *unscaled, font_matrix, ctm, options, &cairo_ft_scaled_font_backend); if (status) { + _cairo_unscaled_font_destroy (&unscaled->base); free (scaled_font); goto FAIL; } @@ -1502,34 +1503,11 @@ _cairo_ft_scaled_font_create (cairo_ft_unscaled_font_t *unscaled, status = _cairo_ft_unscaled_font_set_scale (unscaled, &scaled_font->base.scale); if (status) { + _cairo_unscaled_font_destroy (&unscaled->base); free (scaled_font); goto FAIL; } - /* - * Force non-AA drawing when using a bitmap strike that - * won't be resampled due to non-scaling transform - */ - if (!unscaled->have_shape && - (scaled_font->ft_options.load_flags & FT_LOAD_NO_BITMAP) == 0 && - scaled_font->ft_options.base.antialias != CAIRO_ANTIALIAS_NONE && - (face->face_flags & FT_FACE_FLAG_FIXED_SIZES)) - { - int i; - FT_Size_Metrics *size_metrics = &face->size->metrics; - - for (i = 0; i < face->num_fixed_sizes; i++) - { - FT_Bitmap_Size *bitmap_size = &face->available_sizes[i]; - - if (bitmap_size->x_ppem == size_metrics->x_ppem * 64 && - bitmap_size->y_ppem == size_metrics->y_ppem * 64) - { - scaled_font->ft_options.base.antialias = CAIRO_ANTIALIAS_NONE; - break; - } - } - } metrics = &face->size->metrics; @@ -2157,7 +2135,7 @@ _cairo_ft_load_truetype_table (void *abstract_font, return status; } -static void +static cairo_int_status_t _cairo_ft_map_glyphs_to_unicode (void *abstract_font, cairo_scaled_font_subset_t *font_subset) { @@ -2171,7 +2149,7 @@ _cairo_ft_map_glyphs_to_unicode (void *abstract_font, face = _cairo_ft_unscaled_font_lock_face (unscaled); if (!face) - return; + return _cairo_error (CAIRO_STATUS_NO_MEMORY); count = font_subset->num_glyphs; charcode = FT_Get_First_Char( face, &glyph); @@ -2184,9 +2162,11 @@ _cairo_ft_map_glyphs_to_unicode (void *abstract_font, break; } } - charcode = FT_Get_Next_Char(face, charcode, &glyph); + charcode = FT_Get_Next_Char (face, charcode, &glyph); } _cairo_ft_unscaled_font_unlock_face (unscaled); + + return CAIRO_STATUS_SUCCESS; } const cairo_scaled_font_backend_t cairo_ft_scaled_font_backend = { diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c index eb68b43..04084e1 100644 --- a/src/cairo-glitz-surface.c +++ b/src/cairo-glitz-surface.c @@ -88,20 +88,16 @@ _cairo_glitz_surface_create_similar (void *abstract_src, gformat = glitz_find_standard_format (drawable, _glitz_format_from_content (content)); - if (!gformat) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (!gformat) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); surface = glitz_surface_create (drawable, gformat, width <= 0 ? 1 : width, height <= 0 ? 1 : height, 0, NULL); - if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); crsurface = cairo_glitz_surface_create (surface); @@ -1305,9 +1301,10 @@ _cairo_glitz_surface_composite_trapezoids (cairo_operator_t op, { if (data_size < size) { + void *p; data_size = size; - data = realloc (data, data_size); - if (!data) + p = realloc (data, data_size); + if (!p) { _cairo_glitz_pattern_release_surface (src_pattern, src, &attributes); @@ -1315,6 +1312,7 @@ _cairo_glitz_surface_composite_trapezoids (cairo_operator_t op, _cairo_pattern_fini (&tmp_src_pattern.base); return _cairo_error (CAIRO_STATUS_NO_MEMORY); } + data = p; if (buffer) glitz_buffer_destroy (buffer); @@ -2454,13 +2452,11 @@ cairo_glitz_surface_create (glitz_surface_t *surface) glitz_format_t *format; if (surface == NULL) - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NULL_POINTER)); crsurface = malloc (sizeof (cairo_glitz_surface_t)); - if (crsurface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (crsurface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); format = glitz_surface_get_format (surface); _cairo_surface_init (&crsurface->base, &cairo_glitz_surface_backend, diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index c2ab8a2..099f7ed 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -35,11 +35,19 @@ * Carl D. Worth <cworth@cworth.org> */ +#define _GNU_SOURCE + #include "cairoint.h" #include "cairo-clip-private.h" #include "cairo-gstate-private.h" +#if _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE +#define ISFINITE(x) isfinite (x) +#else +#define ISFINITE(x) ((x) * (x) >= 0.) /* check for NaNs */ +#endif + static cairo_status_t _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other); @@ -623,7 +631,7 @@ _cairo_gstate_translate (cairo_gstate_t *gstate, double tx, double ty) { cairo_matrix_t tmp; - if (! (tx * tx >= 0.) || ! (ty * ty >= 0.)) /* check for NaNs */ + if (! ISFINITE (tx) || ! ISFINITE (ty)) return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); _cairo_gstate_unset_scaled_font (gstate); @@ -631,6 +639,10 @@ _cairo_gstate_translate (cairo_gstate_t *gstate, double tx, double ty) cairo_matrix_init_translate (&tmp, tx, ty); cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm); + /* paranoid check against gradual numerical instability */ + if (! _cairo_matrix_is_invertible (&gstate->ctm)) + return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); + cairo_matrix_init_translate (&tmp, -tx, -ty); cairo_matrix_multiply (&gstate->ctm_inverse, &gstate->ctm_inverse, &tmp); @@ -644,7 +656,7 @@ _cairo_gstate_scale (cairo_gstate_t *gstate, double sx, double sy) if (sx * sy == 0.) /* either sx or sy is 0, or det == 0 due to underflow */ return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); - if (! (sx * sx > 0.) || ! (sy * sy > 0.)) /* check for NaNs */ + if (! ISFINITE (sx) || ! ISFINITE (sy)) return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); _cairo_gstate_unset_scaled_font (gstate); @@ -652,6 +664,10 @@ _cairo_gstate_scale (cairo_gstate_t *gstate, double sx, double sy) cairo_matrix_init_scale (&tmp, sx, sy); cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm); + /* paranoid check against gradual numerical instability */ + if (! _cairo_matrix_is_invertible (&gstate->ctm)) + return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); + cairo_matrix_init_scale (&tmp, 1/sx, 1/sy); cairo_matrix_multiply (&gstate->ctm_inverse, &gstate->ctm_inverse, &tmp); @@ -666,7 +682,7 @@ _cairo_gstate_rotate (cairo_gstate_t *gstate, double angle) if (angle == 0.) return CAIRO_STATUS_SUCCESS; - if (! (angle * angle >= 0.)) /* check for NaNs */ + if (! ISFINITE (angle)) return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); _cairo_gstate_unset_scaled_font (gstate); @@ -674,6 +690,10 @@ _cairo_gstate_rotate (cairo_gstate_t *gstate, double angle) cairo_matrix_init_rotate (&tmp, angle); cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm); + /* paranoid check against gradual numerical instability */ + if (! _cairo_matrix_is_invertible (&gstate->ctm)) + return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); + cairo_matrix_init_rotate (&tmp, -angle); cairo_matrix_multiply (&gstate->ctm_inverse, &gstate->ctm_inverse, &tmp); @@ -687,16 +707,20 @@ _cairo_gstate_transform (cairo_gstate_t *gstate, cairo_matrix_t tmp; cairo_status_t status; - _cairo_gstate_unset_scaled_font (gstate); - tmp = *matrix; - cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm); - status = cairo_matrix_invert (&tmp); if (status) return status; + + _cairo_gstate_unset_scaled_font (gstate); + + cairo_matrix_multiply (&gstate->ctm, matrix, &gstate->ctm); cairo_matrix_multiply (&gstate->ctm_inverse, &gstate->ctm_inverse, &tmp); + /* paranoid check against gradual numerical instability */ + if (! _cairo_matrix_is_invertible (&gstate->ctm)) + return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); + return CAIRO_STATUS_SUCCESS; } @@ -706,14 +730,15 @@ _cairo_gstate_set_matrix (cairo_gstate_t *gstate, { cairo_status_t status; + if (! _cairo_matrix_is_invertible (matrix)) + return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); + _cairo_gstate_unset_scaled_font (gstate); gstate->ctm = *matrix; - gstate->ctm_inverse = *matrix; status = cairo_matrix_invert (&gstate->ctm_inverse); - if (status) - return status; + assert (status == CAIRO_STATUS_SUCCESS); return CAIRO_STATUS_SUCCESS; } @@ -1132,9 +1157,7 @@ _cairo_gstate_traps_extents_to_user_rectangle (cairo_gstate_t *gstate, { cairo_box_t extents; - _cairo_traps_extents (traps, &extents); - - if (extents.p1.x >= extents.p2.x || extents.p1.y >= extents.p2.y) { + if (traps->num_traps == 0) { /* no traps, so we actually won't draw anything */ if (x1) *x1 = 0.0; @@ -1145,6 +1168,8 @@ _cairo_gstate_traps_extents_to_user_rectangle (cairo_gstate_t *gstate, if (y2) *y2 = 0.0; } else { + _cairo_traps_extents (traps, &extents); + if (x1) *x1 = _cairo_fixed_to_double (extents.p1.x); if (y1) @@ -1575,7 +1600,6 @@ _cairo_gstate_glyph_extents (cairo_gstate_t *gstate, return cairo_scaled_font_status (gstate->scaled_font); } -#define STACK_GLYPHS_LEN ((int) (CAIRO_STACK_BUFFER_SIZE / sizeof (cairo_glyph_t))) cairo_status_t _cairo_gstate_show_glyphs (cairo_gstate_t *gstate, const cairo_glyph_t *glyphs, @@ -1584,7 +1608,7 @@ _cairo_gstate_show_glyphs (cairo_gstate_t *gstate, cairo_status_t status; cairo_pattern_union_t source_pattern; cairo_glyph_t *transformed_glyphs; - cairo_glyph_t stack_transformed_glyphs[STACK_GLYPHS_LEN]; + cairo_glyph_t stack_transformed_glyphs[CAIRO_STACK_ARRAY_LENGTH (cairo_glyph_t)]; if (gstate->source->status) return gstate->source->status; @@ -1597,7 +1621,7 @@ _cairo_gstate_show_glyphs (cairo_gstate_t *gstate, if (status) return status; - if (num_glyphs <= STACK_GLYPHS_LEN) { + if (num_glyphs <= ARRAY_LENGTH (stack_transformed_glyphs)) { transformed_glyphs = stack_transformed_glyphs; } else { transformed_glyphs = _cairo_malloc_ab (num_glyphs, sizeof(cairo_glyph_t)); @@ -1636,13 +1660,13 @@ _cairo_gstate_glyph_path (cairo_gstate_t *gstate, { cairo_status_t status; cairo_glyph_t *transformed_glyphs; - cairo_glyph_t stack_transformed_glyphs[STACK_GLYPHS_LEN]; + cairo_glyph_t stack_transformed_glyphs[CAIRO_STACK_ARRAY_LENGTH (cairo_glyph_t)]; status = _cairo_gstate_ensure_scaled_font (gstate); if (status) return status; - if (num_glyphs < STACK_GLYPHS_LEN) + if (num_glyphs < ARRAY_LENGTH (stack_transformed_glyphs)) transformed_glyphs = stack_transformed_glyphs; else transformed_glyphs = _cairo_malloc_ab (num_glyphs, sizeof(cairo_glyph_t)); @@ -1663,7 +1687,6 @@ _cairo_gstate_glyph_path (cairo_gstate_t *gstate, return status; } -#undef STACK_GLYPHS_LEN cairo_status_t _cairo_gstate_set_antialias (cairo_gstate_t *gstate, diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index ec3477b..8787185 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -37,101 +37,6 @@ #include "cairoint.h" -static const cairo_image_surface_t _cairo_image_surface_nil_invalid_format = { - { - &cairo_image_surface_backend, /* backend */ - CAIRO_SURFACE_TYPE_IMAGE, - CAIRO_CONTENT_COLOR, - CAIRO_REFERENCE_COUNT_INVALID, /* ref_count */ - CAIRO_STATUS_INVALID_FORMAT, /* status */ - FALSE, /* finished */ - { 0, /* size */ - 0, /* num_elements */ - 0, /* element_size */ - NULL, /* elements */ - }, /* user_data */ - { 1.0, 0.0, - 0.0, 1.0, - 0.0, 0.0 - }, /* device_transform */ - { 1.0, 0.0, - 0.0, 1.0, - 0.0, 0.0 - }, /* device_transform_inverse */ - 0.0, /* x_resolution */ - 0.0, /* y_resolution */ - 0.0, /* x_fallback_resolution */ - 0.0, /* y_fallback_resolution */ - NULL, /* clip */ - 0, /* next_clip_serial */ - 0, /* current_clip_serial */ - FALSE, /* is_snapshot */ - FALSE, /* has_font_options */ - { CAIRO_ANTIALIAS_DEFAULT, - CAIRO_SUBPIXEL_ORDER_DEFAULT, - CAIRO_HINT_STYLE_DEFAULT, - CAIRO_HINT_METRICS_DEFAULT - } /* font_options */ - }, /* base */ - PIXMAN_a8r8g8b8, /* pixman_format */ - CAIRO_FORMAT_ARGB32, /* format */ - NULL, /* data */ - FALSE, /* owns_data */ - FALSE, /* has_clip */ - 0, /* width */ - 0, /* height */ - 0, /* stride */ - 0, /* depth */ - NULL /* pixman_image */ -}; -static const cairo_image_surface_t _cairo_image_surface_nil_invalid_content = { - { - &cairo_image_surface_backend, /* backend */ - CAIRO_SURFACE_TYPE_IMAGE, - CAIRO_CONTENT_COLOR, - CAIRO_REFERENCE_COUNT_INVALID, /* ref_count */ - CAIRO_STATUS_INVALID_CONTENT, /* status */ - FALSE, /* finished */ - { 0, /* size */ - 0, /* num_elements */ - 0, /* element_size */ - NULL, /* elements */ - }, /* user_data */ - { 1.0, 0.0, - 0.0, 1.0, - 0.0, 0.0 - }, /* device_transform */ - { 1.0, 0.0, - 0.0, 1.0, - 0.0, 0.0 - }, /* device_transform_inverse */ - 0.0, /* x_resolution */ - 0.0, /* y_resolution */ - 0.0, /* x_fallback_resolution */ - 0.0, /* y_fallback_resolution */ - NULL, /* clip */ - 0, /* next_clip_serial */ - 0, /* current_clip_serial */ - FALSE, /* is_snapshot */ - FALSE, /* has_font_options */ - { CAIRO_ANTIALIAS_DEFAULT, - CAIRO_SUBPIXEL_ORDER_DEFAULT, - CAIRO_HINT_STYLE_DEFAULT, - CAIRO_HINT_METRICS_DEFAULT - } /* font_options */ - }, /* base */ - PIXMAN_a8r8g8b8, /* pixman_format */ - CAIRO_FORMAT_ARGB32, /* format */ - NULL, /* data */ - FALSE, /* owns_data */ - FALSE, /* has_clip */ - 0, /* width */ - 0, /* height */ - 0, /* stride */ - 0, /* depth */ - NULL /* pixman_image */ -}; - static cairo_format_t _cairo_format_from_pixman_format (pixman_format_code_t pixman_format) { @@ -213,10 +118,8 @@ _cairo_image_surface_create_for_pixman_image (pixman_image_t *pixman_image, cairo_image_surface_t *surface; surface = malloc (sizeof (cairo_image_surface_t)); - if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); _cairo_surface_init (&surface->base, &cairo_image_surface_backend, _cairo_content_from_pixman_format (pixman_format)); @@ -432,16 +335,13 @@ _cairo_image_surface_create_with_pixman_format (unsigned char *data, pixman_image = pixman_image_create_bits (pixman_format, width, height, (uint32_t *) data, stride); - if (pixman_image == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (pixman_image == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); surface = _cairo_image_surface_create_for_pixman_image (pixman_image, pixman_format); - if (cairo_surface_status (surface)) { + if (cairo_surface_status (surface)) pixman_image_unref (pixman_image); - } return surface; } @@ -473,10 +373,8 @@ cairo_image_surface_create (cairo_format_t format, { pixman_format_code_t pixman_format; - if (! CAIRO_FORMAT_VALID (format)) { - _cairo_error_throw (CAIRO_STATUS_INVALID_FORMAT); - return (cairo_surface_t*) &_cairo_image_surface_nil_invalid_format; - } + if (! CAIRO_FORMAT_VALID (format)) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); pixman_format = _cairo_format_to_pixman_format_code (format); @@ -490,10 +388,8 @@ _cairo_image_surface_create_with_content (cairo_content_t content, int width, int height) { - if (! CAIRO_CONTENT_VALID (content)) { - _cairo_error_throw (CAIRO_STATUS_INVALID_CONTENT); - return (cairo_surface_t*) &_cairo_image_surface_nil_invalid_content; - } + if (! CAIRO_CONTENT_VALID (content)) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_CONTENT)); return cairo_image_surface_create (_cairo_format_from_content (content), width, height); @@ -541,10 +437,8 @@ cairo_image_surface_create_for_data (unsigned char *data, /* XXX pixman does not support images with arbitrary strides and * attempting to create such surfaces will failure but we will interpret * such failure as CAIRO_STATUS_NO_MEMORY. */ - if (! CAIRO_FORMAT_VALID (format) || stride % sizeof (uint32_t) != 0) { - _cairo_error_throw (CAIRO_STATUS_INVALID_FORMAT); - return (cairo_surface_t*) &_cairo_image_surface_nil_invalid_format; - } + if (! CAIRO_FORMAT_VALID (format) || stride % sizeof (uint32_t) != 0) + return _cairo_surface_create_in_error (_cairo_error(CAIRO_STATUS_INVALID_FORMAT)); pixman_format = _cairo_format_to_pixman_format_code (format); @@ -560,10 +454,8 @@ _cairo_image_surface_create_for_data_with_content (unsigned char *data, int height, int stride) { - if (! CAIRO_CONTENT_VALID (content)) { - _cairo_error_throw (CAIRO_STATUS_INVALID_CONTENT); - return (cairo_surface_t*) &_cairo_image_surface_nil_invalid_content; - } + if (! CAIRO_CONTENT_VALID (content)) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_CONTENT)); return cairo_image_surface_create_for_data (data, _cairo_format_from_content (content), @@ -724,6 +616,24 @@ _cairo_content_from_format (cairo_format_t format) return CAIRO_CONTENT_COLOR_ALPHA; } +cairo_private cairo_format_t +_cairo_format_width (cairo_format_t format) +{ + switch (format) { + case CAIRO_FORMAT_ARGB32: + return 32; + case CAIRO_FORMAT_RGB24: + return 24; + case CAIRO_FORMAT_A8: + return 8; + case CAIRO_FORMAT_A1: + return 1; + default: + ASSERT_NOT_REACHED; + return 0; + } +} + static cairo_surface_t * _cairo_image_surface_create_similar (void *abstract_src, cairo_content_t content, @@ -1034,8 +944,6 @@ _cairo_image_surface_composite (cairo_operator_t op, return status; } -#define STACK_RECTS_LEN (CAIRO_STACK_BUFFER_SIZE / sizeof(pixman_rectangle16_t)) - static cairo_int_status_t _cairo_image_surface_fill_rectangles (void *abstract_surface, cairo_operator_t op, @@ -1046,7 +954,7 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface, cairo_image_surface_t *surface = abstract_surface; pixman_color_t pixman_color; - pixman_rectangle16_t stack_rects[STACK_RECTS_LEN]; + pixman_rectangle16_t stack_rects[CAIRO_STACK_ARRAY_LENGTH (pixman_rectangle16_t)]; pixman_rectangle16_t *pixman_rects = stack_rects; int i; @@ -1085,10 +993,6 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface, return status; } -#undef STACK_RECTS_LEN - -#define STACK_TRAPS_LEN ((int) (CAIRO_STACK_BUFFER_SIZE / sizeof(pixman_trapezoid_t))) - static cairo_int_status_t _cairo_image_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, @@ -1110,7 +1014,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op, pixman_image_t *mask; pixman_format_code_t format; uint32_t *mask_data; - pixman_trapezoid_t stack_traps[STACK_TRAPS_LEN]; + pixman_trapezoid_t stack_traps[CAIRO_STACK_ARRAY_LENGTH (pixman_trapezoid_t)]; pixman_trapezoid_t *pixman_traps = stack_traps; int mask_stride; int mask_bpp; @@ -1244,8 +1148,6 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op, return status; } -#undef STACK_TRAPS_LEN - cairo_int_status_t _cairo_image_surface_set_clip_region (void *abstract_surface, cairo_region_t *region) @@ -1372,7 +1274,7 @@ _cairo_image_surface_clone (cairo_image_surface_t *surface, if (status) { cairo_surface_destroy (&clone->base); - return (cairo_image_surface_t *) &_cairo_surface_nil; + return (cairo_image_surface_t *) _cairo_surface_create_in_error (status); } return clone; diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c index 00c2d48..d534826 100644 --- a/src/cairo-matrix.c +++ b/src/cairo-matrix.c @@ -38,6 +38,12 @@ #include "cairoint.h" +#if _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE +#define ISFINITE(x) isfinite (x) +#else +#define ISFINITE(x) ((x) * (x) >= 0.) /* check for NaNs */ +#endif + static void _cairo_matrix_scalar_multiply (cairo_matrix_t *matrix, double scalar); @@ -475,8 +481,7 @@ cairo_matrix_invert (cairo_matrix_t *matrix) if (det == 0) return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); - /* this weird construct is for detecting NaNs */ - if (! (det * det > 0.)) + if (! ISFINITE (det)) return _cairo_error (CAIRO_STATUS_INVALID_MATRIX); _cairo_matrix_compute_adjoint (matrix); @@ -493,7 +498,7 @@ _cairo_matrix_is_invertible (const cairo_matrix_t *matrix) _cairo_matrix_compute_determinant (matrix, &det); - return det != 0. && det * det > 0.; + return det != 0. && ISFINITE (det); } void @@ -517,6 +522,8 @@ _cairo_matrix_compute_scale_factors (const cairo_matrix_t *matrix, _cairo_matrix_compute_determinant (matrix, &det); + assert (ISFINITE (det)); + if (det == 0) { *sx = *sy = 0; diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c index 0b03cc7..51ed382 100644 --- a/src/cairo-meta-surface.c +++ b/src/cairo-meta-surface.c @@ -61,8 +61,7 @@ typedef enum { CAIRO_META_REPLAY, - CAIRO_META_CREATE_REGIONS, - CAIRO_META_ANALYZE_META_PATTERN + CAIRO_META_CREATE_REGIONS } cairo_meta_replay_type_t; static const cairo_surface_backend_t cairo_meta_surface_backend; @@ -84,10 +83,8 @@ _cairo_meta_surface_create (cairo_content_t content, cairo_meta_surface_t *meta; meta = malloc (sizeof (cairo_meta_surface_t)); - if (meta == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (meta == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); _cairo_surface_init (&meta->base, &cairo_meta_surface_backend, content); @@ -476,7 +473,7 @@ _cairo_meta_surface_show_glyphs (void *abstract_surface, _cairo_pattern_fini (&command->source.base); CLEANUP_COMMAND: free (command); - return _cairo_error (status); + return status; } /** @@ -499,10 +496,8 @@ _cairo_meta_surface_snapshot (void *abstract_other) cairo_meta_surface_t *meta; meta = malloc (sizeof (cairo_meta_surface_t)); - if (meta == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (meta == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); _cairo_surface_init (&meta->base, &cairo_meta_surface_backend, other->base.content); @@ -853,11 +848,6 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface, } } - if (type == CAIRO_META_ANALYZE_META_PATTERN) { - if (status == CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY) - status = CAIRO_STATUS_SUCCESS; - } - if (status) break; } @@ -877,16 +867,6 @@ _cairo_meta_surface_replay (cairo_surface_t *surface, CAIRO_META_REGION_ALL); } -cairo_status_t -_cairo_meta_surface_replay_analyze_meta_pattern (cairo_surface_t *surface, - cairo_surface_t *target) -{ - return _cairo_meta_surface_replay_internal (surface, - target, - CAIRO_META_ANALYZE_META_PATTERN, - CAIRO_META_REGION_ALL); -} - /* Replay meta to surface. When the return status of each operation is * one of CAIRO_STATUS_SUCCESS, CAIRO_INT_STATUS_UNSUPPORTED, or * CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY the status of each operation diff --git a/src/cairo-os2-surface.c b/src/cairo-os2-surface.c index 0d888ed..f382484 100644 --- a/src/cairo-os2-surface.c +++ b/src/cairo-os2-surface.c @@ -135,6 +135,74 @@ cairo_os2_fini (void) * as much as possible. */ _heapshrink (); +#else + /* GCC has a heapmin function that approximately corresponds to + * what the Watcom function does + */ + _heapmin (); +#endif +} + +/* + * This function calls the allocation function depending on which + * method was compiled into the library: it can be native allocation + * (DosAllocMem/DosFreeMem) or C-Library based allocation (malloc/free). + * Actually, for pixel buffers that we use this function for, cairo + * uses _cairo_malloc_abc, so we use that here, too. And use the + * change to check the size argument + */ +void *_buffer_alloc (size_t a, size_t b, const unsigned int size) +{ + /* check length like in the _cairo_malloc_abc macro, but we can leave + * away the unsigned casts as our arguments are unsigned already + */ + size_t nbytes = b && + a >= INT32_MAX / b ? 0 : size && + a*b >= INT32_MAX / size ? 0 : a * b * size; + void *buffer = NULL; +#ifdef OS2_USE_PLATFORM_ALLOC + APIRET rc = NO_ERROR; + + rc = DosAllocMem ((PPVOID)&buffer, + nbytes, +#ifdef OS2_HIGH_MEMORY /* only if compiled with high-memory support, */ + OBJ_ANY | /* we can allocate anywhere! */ +#endif + PAG_READ | PAG_WRITE | PAG_COMMIT); + if (rc != NO_ERROR) { + /* should there for some reason be another error, let's return + * a null surface and free the buffer again, because that's + * how a malloc failure would look like + */ + if (rc != ERROR_NOT_ENOUGH_MEMORY && buffer) { + DosFreeMem (buffer); + } + return NULL; + } +#else + buffer = malloc (nbytes); +#endif + + /* This does not seem to be needed, malloc'd space is usually + * already zero'd out! + */ + /* + * memset (buffer, 0x00, nbytes); + */ + + return buffer; +} + +/* + * This function selects the free function depending on which + * allocation method was compiled into the library + */ +void _buffer_free (void *buffer) +{ +#ifdef OS2_USE_PLATFORM_ALLOC + DosFreeMem (buffer); +#else + free (buffer); #endif } @@ -296,9 +364,9 @@ _cairo_os2_surface_blit_pixels (cairo_os2_surface_t *surface, ULONG ulPixels; /* allocate temporary pixel buffer */ - pchPixBuf = (unsigned char *) _cairo_malloc_abc (surface->bitmap_info.cy, - surface->bitmap_info.cx, - 3); + pchPixBuf = (unsigned char *) _buffer_alloc (surface->bitmap_info.cy, + surface->bitmap_info.cx, + 3); pchPixSource = surface->pixels; /* start at beginning of pixel buffer */ pBufStart = pchPixBuf; /* remember beginning of the new pixel buffer */ @@ -330,7 +398,7 @@ _cairo_os2_surface_blit_pixels (cairo_os2_surface_t *surface, ROP_SRCCOPY, BBO_IGNORE); - free (pchPixBuf); + _buffer_free (pchPixBuf); } /* Restore Y inversion */ @@ -654,6 +722,7 @@ cairo_os2_surface_create (HPS hps_client_window, int height) { cairo_os2_surface_t *local_os2_surface; + cairo_status_t status; int rc; /* Check the size of the window */ @@ -661,15 +730,13 @@ cairo_os2_surface_create (HPS hps_client_window, (height <= 0)) { /* Invalid window size! */ - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } local_os2_surface = (cairo_os2_surface_t *) malloc (sizeof (cairo_os2_surface_t)); if (!local_os2_surface) { /* Not enough memory! */ - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } /* Initialize the OS/2 specific parts of the surface! */ @@ -681,8 +748,7 @@ cairo_os2_surface_create (HPS hps_client_window, FALSE); if (rc != NO_ERROR) { /* Could not create mutex semaphore! */ - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } /* Save PS handle */ @@ -701,8 +767,7 @@ cairo_os2_surface_create (HPS hps_client_window, /* Could not create event semaphore! */ DosCloseMutexSem (local_os2_surface->hmtx_use_private_fields); free (local_os2_surface); - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } /* Prepare BITMAPINFO2 structure for our buffer */ @@ -714,23 +779,15 @@ cairo_os2_surface_create (HPS hps_client_window, local_os2_surface->bitmap_info.cBitCount = 32; /* Allocate memory for pixels */ - local_os2_surface->pixels = (unsigned char *) _cairo_malloc_abc (height, width, 4); + local_os2_surface->pixels = (unsigned char *) _buffer_alloc (height, width, 4); if (!(local_os2_surface->pixels)) { /* Not enough memory for the pixels! */ DosCloseEventSem (local_os2_surface->hev_pixel_array_came_back); DosCloseMutexSem (local_os2_surface->hmtx_use_private_fields); free (local_os2_surface); - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } - /* This is possibly not needed, malloc'd space is - * usually zero'd out! - */ - /* - memset (local_os2_surface->pixels, 0x00, swpTemp.cx * swpTemp.cy * 4); - */ - /* Create image surface from pixel array */ local_os2_surface->image_surface = (cairo_image_surface_t *) cairo_image_surface_create_for_data (local_os2_surface->pixels, @@ -739,14 +796,14 @@ cairo_os2_surface_create (HPS hps_client_window, height, /* Height */ width * 4); /* Rowstride */ - if (local_os2_surface->image_surface->base.status) { + status = local_os2_surface->image_surface->base.status; + if (status) { /* Could not create image surface! */ - free (local_os2_surface->pixels); + _buffer_free (local_os2_surface->pixels); DosCloseEventSem (local_os2_surface->hev_pixel_array_came_back); DosCloseMutexSem (local_os2_surface->hmtx_use_private_fields); free (local_os2_surface); - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); } /* Initialize base surface */ @@ -784,7 +841,7 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, } /* Allocate memory for new stuffs */ - pchNewPixels = (unsigned char *) _cairo_malloc_abc (new_height, new_width, 4); + pchNewPixels = (unsigned char *) _buffer_alloc (new_height, new_width, 4); if (!pchNewPixels) { /* Not enough memory for the pixels! * Everything remains the same! @@ -792,13 +849,6 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, return _cairo_error (CAIRO_STATUS_NO_MEMORY); } - /* This is possibly not needed, malloc'd space is usually - * already zero'd out! - */ - /* - memset (pchNewPixels, 0x00, new_width * new_height * 4); - */ - /* Create image surface from new pixel array */ pNewImageSurface = (cairo_image_surface_t *) cairo_image_surface_create_for_data (pchNewPixels, @@ -811,7 +861,7 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, /* Could not create image surface! * Everything remains the same! */ - free (pchNewPixels); + _buffer_free (pchNewPixels); return _cairo_error (CAIRO_STATUS_NO_MEMORY); } @@ -823,7 +873,7 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, * Everything remains the same! */ cairo_surface_destroy ((cairo_surface_t *) pNewImageSurface); - free (pchNewPixels); + _buffer_free (pchNewPixels); return _cairo_error (CAIRO_STATUS_NO_MEMORY); } @@ -839,7 +889,7 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, if (rc != NO_ERROR) { /* Either timeout or something wrong... Exit. */ cairo_surface_destroy ((cairo_surface_t *) pNewImageSurface); - free (pchNewPixels); + _buffer_free (pchNewPixels); return _cairo_error (CAIRO_STATUS_NO_MEMORY); } /* Okay, grab mutex and check counter again! */ @@ -850,7 +900,7 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, * Everything remains the same! */ cairo_surface_destroy ((cairo_surface_t *) pNewImageSurface); - free (pchNewPixels); + _buffer_free (pchNewPixels); return _cairo_error (CAIRO_STATUS_NO_MEMORY); } } @@ -858,7 +908,7 @@ cairo_os2_surface_set_size (cairo_surface_t *surface, /* Destroy old image surface */ cairo_surface_destroy ((cairo_surface_t *) (local_os2_surface->image_surface)); /* Destroy old pixel buffer */ - free (local_os2_surface->pixels); + _buffer_free (local_os2_surface->pixels); /* Set new image surface */ local_os2_surface->image_surface = pNewImageSurface; /* Set new pixel buffer */ @@ -957,7 +1007,7 @@ _cairo_os2_surface_finish (void *abstract_surface) /* Destroy old image surface */ cairo_surface_destroy ((cairo_surface_t *) (local_os2_surface->image_surface)); /* Destroy old pixel buffer */ - free (local_os2_surface->pixels); + _buffer_free (local_os2_surface->pixels); DosCloseMutexSem (local_os2_surface->hmtx_use_private_fields); DosCloseEventSem (local_os2_surface->hev_pixel_array_came_back); diff --git a/src/cairo-output-stream-private.h b/src/cairo-output-stream-private.h index 0e7d4db..8377eca 100644 --- a/src/cairo-output-stream-private.h +++ b/src/cairo-output-stream-private.h @@ -87,6 +87,9 @@ _cairo_output_stream_create (cairo_write_func_t write_func, cairo_close_func_t close_func, void *closure); +cairo_private cairo_output_stream_t * +_cairo_output_stream_create_in_error (cairo_status_t status); + /* Returns the final status value associated with this object, just * before its last gasp. This final status value will capture any * status failure returned by the stream's close_func as well. */ diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c index b8fb706..2cb9e03 100644 --- a/src/cairo-output-stream.c +++ b/src/cairo-output-stream.c @@ -38,8 +38,10 @@ #include "cairo-output-stream-private.h" +#include <stdio.h> #include <locale.h> #include <ctype.h> +#include <errno.h> #ifdef _MSC_VER #define snprintf _snprintf @@ -132,6 +134,29 @@ _cairo_output_stream_create (cairo_write_func_t write_func, return &stream->base; } +cairo_output_stream_t * +_cairo_output_stream_create_in_error (cairo_status_t status) +{ + cairo_output_stream_t *stream; + + /* check for the common ones */ + if (status == CAIRO_STATUS_NO_MEMORY) + return (cairo_output_stream_t *) &_cairo_output_stream_nil; + if (status == CAIRO_STATUS_WRITE_ERROR) + return (cairo_output_stream_t *) &_cairo_output_stream_nil_write_error; + + stream = malloc (sizeof (cairo_output_stream_t)); + if (stream == NULL) { + _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + return (cairo_output_stream_t *) &_cairo_output_stream_nil; + } + + _cairo_output_stream_init (stream, NULL, NULL); + stream->status = status; + + return stream; +} + cairo_status_t _cairo_output_stream_close (cairo_output_stream_t *stream) { @@ -163,8 +188,7 @@ _cairo_output_stream_destroy (cairo_output_stream_t *stream) { cairo_status_t status; - if (stream == NULL) - return _cairo_error (CAIRO_STATUS_NULL_POINTER); + assert (stream != NULL); if (stream == &_cairo_output_stream_nil || stream == &_cairo_output_stream_nil_write_error) @@ -538,8 +562,14 @@ _cairo_output_stream_create_for_filename (const char *filename) file = fopen (filename, "wb"); if (file == NULL) { - _cairo_error_throw (CAIRO_STATUS_WRITE_ERROR); - return (cairo_output_stream_t *) &_cairo_output_stream_nil_write_error; + switch (errno) { + case ENOMEM: + _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + return (cairo_output_stream_t *) &_cairo_output_stream_nil; + default: + _cairo_error_throw (CAIRO_STATUS_WRITE_ERROR); + return (cairo_output_stream_t *) &_cairo_output_stream_nil_write_error; + } } stream = malloc (sizeof *stream); diff --git a/src/cairo-paginated-private.h b/src/cairo-paginated-private.h index 1ecb014..7b41191 100644 --- a/src/cairo-paginated-private.h +++ b/src/cairo-paginated-private.h @@ -110,18 +110,22 @@ struct _cairo_paginated_surface_backend { * * 6. Replays a subset of the meta-surface operations to the target surface * - * 7. Replays the remaining operations to an image surface, sets an + * 7. Calls set_paginated_mode with an argument of CAIRO_PAGINATED_MODE_FALLBACK + * + * 8. Replays the remaining operations to an image surface, sets an * appropriate clip on the target, then paints the resulting image * surface to the target. * - * So, the target will see drawing operations during two separate - * stages, (ANALYZE and RENDER). During the ANALYZE phase the target - * should not actually perform any rendering, (for example, if - * performing output to a file, no output should be generated during - * this stage). Instead the drawing functions simply need to return - * CAIRO_STATUS_SUCCESS or CAIRO_INT_STATUS_UNSUPPORTED to indicate - * whether rendering would be supported. And it should do this as - * quickly as possible. + * So, the target will see drawing operations during three separate + * stages, (ANALYZE, RENDER and FALLBACK). During the ANALYZE phase + * the target should not actually perform any rendering, (for example, + * if performing output to a file, no output should be generated + * during this stage). Instead the drawing functions simply need to + * return CAIRO_STATUS_SUCCESS or CAIRO_INT_STATUS_UNSUPPORTED to + * indicate whether rendering would be supported. And it should do + * this as quickly as possible. The FALLBACK phase allows the surface + * to distinguish fallback images from native rendering in case they + * need to be handled as a special case. * * NOTE: The paginated surface layer assumes that the target surface * is "blank" by default at the beginning of each page, without any diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c index d3c6a45..98ec061 100644 --- a/src/cairo-paginated-surface.c +++ b/src/cairo-paginated-surface.c @@ -49,7 +49,7 @@ #include "cairo-meta-surface-private.h" #include "cairo-analysis-surface-private.h" -static const cairo_private cairo_surface_backend_t cairo_paginated_surface_backend; +static const cairo_surface_backend_t cairo_paginated_surface_backend; static cairo_int_status_t _cairo_paginated_surface_show_page (void *abstract_surface); @@ -74,10 +74,11 @@ _cairo_paginated_surface_create (cairo_surface_t *target, const cairo_paginated_surface_backend_t *backend) { cairo_paginated_surface_t *surface; + cairo_status_t status; surface = malloc (sizeof (cairo_paginated_surface_t)); if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto FAIL; } @@ -97,7 +98,8 @@ _cairo_paginated_surface_create (cairo_surface_t *target, surface->backend = backend; surface->meta = _cairo_meta_surface_create (content, width, height); - if (cairo_surface_status (surface->meta)) + status = cairo_surface_status (surface->meta); + if (status) goto FAIL_CLEANUP_SURFACE; surface->page_num = 1; @@ -108,7 +110,7 @@ _cairo_paginated_surface_create (cairo_surface_t *target, FAIL_CLEANUP_SURFACE: free (surface); FAIL: - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); } cairo_bool_t @@ -149,7 +151,7 @@ _cairo_paginated_surface_set_size (cairo_surface_t *surface, width, height); status = cairo_surface_status (paginated_surface->meta); if (status) - return status; + return _cairo_surface_set_error (surface, status); return CAIRO_STATUS_SUCCESS; } @@ -161,7 +163,7 @@ _cairo_paginated_surface_finish (void *abstract_surface) cairo_status_t status = CAIRO_STATUS_SUCCESS; if (surface->page_is_blank == FALSE || surface->page_num == 1) - status = _cairo_paginated_surface_show_page (abstract_surface); + status = cairo_surface_show_page (abstract_surface); if (status == CAIRO_STATUS_SUCCESS) { cairo_surface_finish (surface->target); @@ -293,7 +295,8 @@ _paint_page (cairo_paginated_surface_t *surface) analysis = _cairo_analysis_surface_create (surface->target, surface->width, surface->height); if (analysis == NULL) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + return _cairo_surface_set_error (surface->target, + CAIRO_STATUS_NO_MEMORY); surface->backend->set_paginated_mode (surface->target, CAIRO_PAGINATED_MODE_ANALYZE); status = _cairo_meta_surface_replay_and_create_regions (surface->meta, analysis); @@ -341,6 +344,7 @@ _paint_page (cairo_paginated_surface_t *surface) status = _cairo_meta_surface_replay_region (surface->meta, surface->target, CAIRO_META_REGION_NATIVE); + assert (status != CAIRO_INT_STATUS_UNSUPPORTED); if (status) goto FAIL; } @@ -364,7 +368,9 @@ _paint_page (cairo_paginated_surface_t *surface) cairo_box_int_t *boxes; int num_boxes, i; - /* Reset clip region before drawing the fall back images */ + surface->backend->set_paginated_mode (surface->target, CAIRO_PAGINATED_MODE_FALLBACK); + + /* Reset clip region before drawing the fall back images */ status = _cairo_surface_intersect_clip_path (surface->target, NULL, CAIRO_FILL_RULE_WINDING, @@ -614,43 +620,9 @@ _cairo_paginated_surface_show_glyphs (void *abstract_surface, static cairo_surface_t * _cairo_paginated_surface_snapshot (void *abstract_other) { - cairo_status_t status; cairo_paginated_surface_t *other = abstract_other; - /* XXX: Just making a snapshot of other->meta is what we really - * want. But this currently triggers a bug somewhere (the "mask" - * test from the test suite segfaults). - * - * For now, we'll create a new image surface and replay onto - * that. It would be tempting to replay into other->image and then - * return a snapshot of that, but that will cause the self-copy - * test to fail, (since our replay will be affected by a clip that - * should not have any effect on the use of the resulting snapshot - * as a source). - */ - -#if 0 return _cairo_surface_snapshot (other->meta); -#else - cairo_rectangle_int_t extents; - cairo_surface_t *surface; - - status = _cairo_surface_get_extents (other->target, &extents); - if (status) - return (cairo_surface_t*) &_cairo_surface_nil; - - surface = _cairo_paginated_surface_create_image_surface (other, - extents.width, - extents.height); - - status = _cairo_meta_surface_replay (other->meta, surface); - if (status) { - cairo_surface_destroy (surface); - surface = (cairo_surface_t*) &_cairo_surface_nil; - } - - return surface; -#endif } static const cairo_surface_backend_t cairo_paginated_surface_backend = { diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c index 5b60cf1..55a64e5 100644 --- a/src/cairo-path-bounds.c +++ b/src/cairo-path-bounds.c @@ -148,7 +148,7 @@ _cairo_path_bounder_close_path (void *closure) } /* XXX: Perhaps this should compute a PixRegion rather than 4 doubles */ -cairo_status_t +void _cairo_path_fixed_bounds (cairo_path_fixed_t *path, double *x1, double *y1, double *x2, double *y2) @@ -165,18 +165,16 @@ _cairo_path_fixed_bounds (cairo_path_fixed_t *path, _cairo_path_bounder_curve_to, _cairo_path_bounder_close_path, &bounder); - if (status) { - *x1 = *y1 = *x2 = *y2 = 0.0; - _cairo_path_bounder_fini (&bounder); - return status; - } + assert (status == CAIRO_STATUS_SUCCESS); - *x1 = _cairo_fixed_to_double (bounder.min_x); - *y1 = _cairo_fixed_to_double (bounder.min_y); - *x2 = _cairo_fixed_to_double (bounder.max_x); - *y2 = _cairo_fixed_to_double (bounder.max_y); + if (! bounder.has_point) { + *x1 = *y1 = *x2 = *y2 = 0.; + } else { + *x1 = _cairo_fixed_to_double (bounder.min_x); + *y1 = _cairo_fixed_to_double (bounder.min_y); + *x2 = _cairo_fixed_to_double (bounder.max_x); + *y2 = _cairo_fixed_to_double (bounder.max_y); + } _cairo_path_bounder_fini (&bounder); - - return CAIRO_STATUS_SUCCESS; } diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c index ad73845..e18ecc3 100644 --- a/src/cairo-path-fixed.c +++ b/src/cairo-path-fixed.c @@ -91,6 +91,7 @@ _cairo_path_fixed_init_copy (cairo_path_fixed_t *path, cairo_path_fixed_t *other) { cairo_path_buf_t *buf, *other_buf; + unsigned int num_points, num_ops, buf_size; _cairo_path_fixed_init (path); @@ -106,21 +107,37 @@ _cairo_path_fixed_init_copy (cairo_path_fixed_t *path, other->buf_head.base.num_ops * sizeof (other->buf_head.op[0])); memcpy (path->buf_head.points, other->buf_head.points, other->buf_head.base.num_points * sizeof (other->buf_head.points[0])); + + num_points = num_ops = 0; for (other_buf = other->buf_head.base.next; - other_buf; + other_buf != NULL; other_buf = other_buf->next) { - buf = _cairo_path_buf_create (other_buf->buf_size); + num_ops += other_buf->num_ops; + num_points += other_buf->num_points; + } + + buf_size = MAX (num_ops, (num_points + 1) / 2); + if (buf_size) { + buf = _cairo_path_buf_create (buf_size); if (buf == NULL) { _cairo_path_fixed_fini (path); return _cairo_error (CAIRO_STATUS_NO_MEMORY); } - buf->num_ops = other_buf->num_ops; - buf->num_points = other_buf->num_points; - memcpy (buf->op, other_buf->op, - buf->num_ops * sizeof (buf->op[0])); - memcpy (buf->points, other_buf->points, - buf->num_points * sizeof (buf->points[0])); + + for (other_buf = other->buf_head.base.next; + other_buf != NULL; + other_buf = other_buf->next) + { + memcpy (buf->op + buf->num_ops, other_buf->op, + other_buf->num_ops * sizeof (buf->op[0])); + buf->num_ops += other_buf->num_ops; + + memcpy (buf->points + buf->num_points, other_buf->points, + other_buf->num_points * sizeof (buf->points[0])); + buf->num_points += other_buf->num_points; + } + _cairo_path_fixed_add_buf (path, buf); } @@ -404,6 +421,9 @@ _cairo_path_buf_create (int buf_size) { cairo_path_buf_t *buf; + /* adjust buf_size to ensure that buf->points is naturally aligned */ + buf_size += sizeof (double) + - ((buf_size + sizeof (cairo_path_buf_t)) & (sizeof (double)-1)); buf = _cairo_malloc_ab_plus_c (buf_size, sizeof (cairo_path_op_t) + 2 * sizeof (cairo_point_t), diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c index fb12f15..773e9fd 100644 --- a/src/cairo-path-stroke.c +++ b/src/cairo-path-stroke.c @@ -205,6 +205,22 @@ _cairo_stroker_face_clockwise (cairo_stroke_face_t *in, cairo_stroke_face_t *out return _cairo_slope_clockwise (&in_slope, &out_slope); } +/** + * _cairo_slope_compare_sgn + * + * Return -1, 0 or 1 depending on the relative slopes of + * two lines. + */ +static int +_cairo_slope_compare_sgn (double dx1, double dy1, double dx2, double dy2) +{ + double c = (dx1 * dy2 - dx2 * dy1); + + if (c > 0) return 1; + if (c < 0) return -1; + return 0; +} + static cairo_status_t _cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out) { @@ -272,9 +288,6 @@ _cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_st double in_dot_out = ((-in->usr_vector.x * out->usr_vector.x)+ (-in->usr_vector.y * out->usr_vector.y)); double ml = stroker->style->miter_limit; - double tolerance_squared = stroker->tolerance * stroker->tolerance; - double line_width_squared = (stroker->style->line_width * - stroker->style->line_width); /* Check the miter limit -- lines meeting at an acute angle * can generate long miters, the limit converts them to bevel @@ -332,84 +345,17 @@ _cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_st * * 2 <= ml² (1 - in · out) * - * - * That gives us the condition to avoid generating miters that - * are too large from angles that are too large. But we also - * need to avoid generating miters when the angle is very small. - * - * The miter formed from a tiny angle is also tiny, so the - * miter limit is not a concern. But with a tiny angle we will - * be computing the intersection of two lines that are very - * near parallel. Also, the limits of the fixed-point grid on - * the input face coordinates mean that the resulting - * intersection could be wildly wrong. (See the - * get-path-extents test case for a call to cairo_arc that - * results in two problematic faces.) - * - * Fortunately we can also derive an expression for when using - * a bevel join instead of a miter will introduce an error no - * larger than the tolerance. Consider the same join from - * before but with the miter now chopped off and replaced with - * a bevel join. The drawing is zoomed in a bit again, the - * point marked as '*' is the center of the stroke---the point - * where the two line segments of interest intersect: - * - * ----- . - * ^ .. - * | . . - * | . . - * 1/2 . . - * miter . . | - * length . . | - * | .______. ___v___ - * | | . \ 1/2 bevel - * v | . \ width - * ---- * \ ------- - * | \ ^ - * - * - * The length of interest here is the vertical length of the - * miter that is eliminated. It's length can be obtained by - * starting with 1/2 the miter length and the subtracting off - * the vertical length that is included by the bevel join, - * (here termed 1/2 bevel width). To determine this new bevel - * width, we have a small right triangle shown, the hypotenuse - * of which has a length of 1/2 the line width, and the small - * angle at the upper right of the figure is psi/2. - * - * So we have: - * - * sin (psi/2) = (bevel_width / 2) / (line_width / 2) - * - * And we can determine when the miter is required by - * calculating when the eliminated portion of the miter is - * greater than the tolerance: - * - * (miter_length / 2) - (bevel_width / 2) > tolerance - * - * Substituting in the above expressions for miter_length and - * bevel_width: - * - * (line_width/2) / sin (psi/2) - (line_width/2) * sin (psi/2) > tolerance - * 1 / sin(psi/2) - sin (psi/2) > 2 * tolerance / line_width - * 1 / sin²(psi/2) -2 + sin²(psi/2) > 4 * (tolerance/line_width)² - * - * Use identity: sin²(psi/2) = (1-cos(psi))/2 - - * 2/(1 - cos(psi)) - 2 + (1-cos(psi))/2 > 4 * (tolerance/line_width)² - * 4/(1 - cos(psi)) - 4 + (1-cos(psi)) > 8 * (tolerance/line_width)² - * 4/(1 - cos(psi)) + (1-cos(psi)) > 8 * ((tolerance/line_width)² + 0.5) */ - if ((2 <= ml * ml * (1 - in_dot_out)) && - ((8 * (tolerance_squared / line_width_squared + 0.5)) < - 4 / (1 - in_dot_out) + (1 - in_dot_out)) - ) + if (2 <= ml * ml * (1 - in_dot_out)) { double x1, y1, x2, y2; double mx, my; double dx1, dx2, dy1, dy2; cairo_point_t outer; cairo_point_t quad[4]; + double ix, iy; + double fdx1, fdy1, fdx2, fdy2; + double mdx, mdy; /* * we've got the points already transformed to device @@ -447,17 +393,46 @@ _cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_st mx = (my - y2) * dx2 / dy2 + x2; /* - * Draw the quadrilateral + * When the two outer edges are nearly parallel, slight + * perturbations in the position of the outer points of the lines + * caused by representing them in fixed point form can cause the + * intersection point of the miter to move a large amount. If + * that moves the miter intersection from between the two faces, + * then draw a bevel instead. */ - outer.x = _cairo_fixed_from_double (mx); - outer.y = _cairo_fixed_from_double (my); - quad[0] = in->point; - quad[1] = *inpt; - quad[2] = outer; - quad[3] = *outpt; + ix = _cairo_fixed_to_double (in->point.x); + iy = _cairo_fixed_to_double (in->point.y); - return _cairo_traps_tessellate_convex_quad (stroker->traps, quad); + /* slope of one face */ + fdx1 = x1 - ix; fdy1 = y1 - iy; + + /* slope of the other face */ + fdx2 = x2 - ix; fdy2 = y2 - iy; + + /* slope from the intersection to the miter point */ + mdx = mx - ix; mdy = my - iy; + + /* + * Make sure the miter point line lies between the two + * faces by comparing the slopes + */ + if (_cairo_slope_compare_sgn (fdx1, fdy1, mdx, mdy) != + _cairo_slope_compare_sgn (fdx2, fdy2, mdx, mdy)) + { + /* + * Draw the quadrilateral + */ + outer.x = _cairo_fixed_from_double (mx); + outer.y = _cairo_fixed_from_double (my); + + quad[0] = in->point; + quad[1] = *inpt; + quad[2] = outer; + quad[3] = *outpt; + + return _cairo_traps_tessellate_convex_quad (stroker->traps, quad); + } } /* fall through ... */ } diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index 488177b..ccd7622 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -91,8 +91,6 @@ _cairo_pattern_set_error (cairo_pattern_t *pattern, static void _cairo_pattern_init (cairo_pattern_t *pattern, cairo_pattern_type_t type) { - CAIRO_MUTEX_INITIALIZE (); - pattern->type = type; CAIRO_REFERENCE_COUNT_INIT (&pattern->ref_count, 1); pattern->status = CAIRO_STATUS_SUCCESS; @@ -213,6 +211,42 @@ _cairo_pattern_fini (cairo_pattern_t *pattern) } } +cairo_status_t +_cairo_pattern_create_copy (cairo_pattern_t **pattern, + const cairo_pattern_t *other) +{ + cairo_status_t status; + + if (other->status) + return other->status; + + switch (other->type) { + case CAIRO_PATTERN_TYPE_SOLID: + *pattern = malloc (sizeof (cairo_solid_pattern_t)); + break; + case CAIRO_PATTERN_TYPE_SURFACE: + *pattern = malloc (sizeof (cairo_surface_pattern_t)); + break; + case CAIRO_PATTERN_TYPE_LINEAR: + *pattern = malloc (sizeof (cairo_linear_pattern_t)); + break; + case CAIRO_PATTERN_TYPE_RADIAL: + *pattern = malloc (sizeof (cairo_radial_pattern_t)); + break; + } + if (*pattern == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + + status = _cairo_pattern_init_copy (*pattern, other); + if (status) { + free (*pattern); + return status; + } + + return CAIRO_STATUS_SUCCESS; +} + + void _cairo_pattern_init_solid (cairo_solid_pattern_t *pattern, const cairo_color_t *color, @@ -339,6 +373,8 @@ _cairo_pattern_create_in_error (cairo_status_t status) if (status == CAIRO_STATUS_NO_MEMORY) return (cairo_pattern_t *)&_cairo_pattern_nil.base; + CAIRO_MUTEX_INITIALIZE (); + pattern = _cairo_pattern_create_solid (_cairo_stock_color (CAIRO_STOCK_BLACK), CAIRO_CONTENT_COLOR); if (pattern->status == CAIRO_STATUS_SUCCESS) @@ -379,6 +415,8 @@ cairo_pattern_create_rgb (double red, double green, double blue) _cairo_color_init_rgb (&color, red, green, blue); + CAIRO_MUTEX_INITIALIZE (); + pattern = _cairo_pattern_create_solid (&color, CAIRO_CONTENT_COLOR); if (pattern->status) @@ -423,6 +461,8 @@ cairo_pattern_create_rgba (double red, double green, double blue, _cairo_color_init_rgba (&color, red, green, blue, alpha); + CAIRO_MUTEX_INITIALIZE (); + pattern = _cairo_pattern_create_solid (&color, CAIRO_CONTENT_COLOR_ALPHA); if (pattern->status) @@ -464,6 +504,8 @@ cairo_pattern_create_for_surface (cairo_surface_t *surface) return (cairo_pattern_t *)&_cairo_pattern_nil.base; } + CAIRO_MUTEX_INITIALIZE (); + _cairo_pattern_init_for_surface (pattern, surface); return &pattern->base; @@ -507,6 +549,8 @@ cairo_pattern_create_linear (double x0, double y0, double x1, double y1) return (cairo_pattern_t *) &_cairo_pattern_nil.base; } + CAIRO_MUTEX_INITIALIZE (); + _cairo_pattern_init_linear (pattern, x0, y0, x1, y1); return &pattern->base.base; @@ -552,6 +596,8 @@ cairo_pattern_create_radial (double cx0, double cy0, double radius0, return (cairo_pattern_t *) &_cairo_pattern_nil.base; } + CAIRO_MUTEX_INITIALIZE (); + _cairo_pattern_init_radial (pattern, cx0, cy0, radius0, cx1, cy1, radius1); return &pattern->base.base; @@ -1782,7 +1828,8 @@ _cairo_pattern_acquire_surface (cairo_pattern_t *pattern, attributes); } break; default: - status = CAIRO_INT_STATUS_UNSUPPORTED; + ASSERT_NOT_REACHED; + status = _cairo_error (CAIRO_STATUS_PATTERN_TYPE_MISMATCH); } return status; diff --git a/src/cairo-pdf-operators-private.h b/src/cairo-pdf-operators-private.h new file mode 100644 index 0000000..83ef73c --- /dev/null +++ b/src/cairo-pdf-operators-private.h @@ -0,0 +1,107 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2004 Red Hat, Inc + * Copyright © 2006 Red Hat, Inc + * Copyright © 2007 Adrian Johnson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + * Contributor(s): + * Kristian Høgsberg <krh@redhat.com> + * Carl Worth <cworth@cworth.org> + * Adrian Johnson <ajohnson@redneon.com> + */ + +#ifndef CAIRO_PDF_OPERATORS_H +#define CAIRO_PDF_OPERATORS_H + +#include "cairo-compiler-private.h" +#include "cairo-types-private.h" + +typedef cairo_status_t +(*cairo_pdf_operators_use_font_subset_t) (unsigned int font_id, + unsigned int subset_id, + void *closure); + +typedef struct _cairo_pdf_operators { + cairo_output_stream_t *stream; + cairo_matrix_t cairo_to_pdf; + cairo_scaled_font_subsets_t *font_subsets; + cairo_pdf_operators_use_font_subset_t use_font_subset; + void *use_font_subset_closure; +} cairo_pdf_operators_t; + +cairo_private void +_cairo_pdf_operators_init (cairo_pdf_operators_t *pdf_operators, + cairo_output_stream_t *stream, + cairo_matrix_t cairo_to_pdf, + cairo_scaled_font_subsets_t *font_subsets); + +cairo_private void +_cairo_pdf_operators_fini (cairo_pdf_operators_t *pdf_operators); + +cairo_private void +_cairo_pdf_operators_set_font_subsets_callback (cairo_pdf_operators_t *pdf_operators, + cairo_pdf_operators_use_font_subset_t use_font_subset, + void *closure); + +cairo_private void +_cairo_pdf_operators_set_stream (cairo_pdf_operators_t *pdf_operators, + cairo_output_stream_t *stream); + + +cairo_private void +_cairo_pdf_operators_set_cairo_to_pdf_matrix (cairo_pdf_operators_t *pdf_operators, + cairo_matrix_t cairo_to_pdf); + +cairo_private cairo_int_status_t +_cairo_pdf_operators_clip (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + cairo_fill_rule_t fill_rule); + +cairo_private cairo_int_status_t +_cairo_pdf_operator_stroke (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + cairo_stroke_style_t *style, + cairo_matrix_t *ctm, + cairo_matrix_t *ctm_inverse); + +cairo_private cairo_int_status_t +_cairo_pdf_operators_fill (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + cairo_fill_rule_t fill_rule); + +cairo_private cairo_int_status_t +_cairo_pdf_operators_show_glyphs (cairo_pdf_operators_t *pdf_operators, + cairo_glyph_t *glyphs, + int num_glyphs, + cairo_scaled_font_t *scaled_font); + +#endif /* CAIRO_PDF_OPERATORS_H */ diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c new file mode 100644 index 0000000..a049d44 --- /dev/null +++ b/src/cairo-pdf-operators.c @@ -0,0 +1,532 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2004 Red Hat, Inc + * Copyright © 2006 Red Hat, Inc + * Copyright © 2007 Adrian Johnson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is University of Southern + * California. + * + * Contributor(s): + * Kristian Høgsberg <krh@redhat.com> + * Carl Worth <cworth@cworth.org> + * Adrian Johnson <ajohnson@redneon.com> + */ + +#include "cairoint.h" +#include "cairo-pdf-operators-private.h" +#include "cairo-path-fixed-private.h" +#include "cairo-output-stream-private.h" +#include "cairo-scaled-font-subsets-private.h" + +void +_cairo_pdf_operators_init (cairo_pdf_operators_t *pdf_operators, + cairo_output_stream_t *stream, + cairo_matrix_t cairo_to_pdf, + cairo_scaled_font_subsets_t *font_subsets) +{ + pdf_operators->stream = stream; + pdf_operators->cairo_to_pdf = cairo_to_pdf; + pdf_operators->font_subsets = font_subsets; + pdf_operators->use_font_subset = NULL; + pdf_operators->use_font_subset_closure = NULL; +} + +void +_cairo_pdf_operators_fini (cairo_pdf_operators_t *pdf_operators) +{ +} + +void +_cairo_pdf_operators_set_font_subsets_callback (cairo_pdf_operators_t *pdf_operators, + cairo_pdf_operators_use_font_subset_t use_font_subset, + void *closure) +{ + pdf_operators->use_font_subset = use_font_subset; + pdf_operators->use_font_subset_closure = closure; +} + +void +_cairo_pdf_operators_set_stream (cairo_pdf_operators_t *pdf_operators, + cairo_output_stream_t *stream) +{ + pdf_operators->stream = stream; +} + +void +_cairo_pdf_operators_set_cairo_to_pdf_matrix (cairo_pdf_operators_t *pdf_operators, + cairo_matrix_t cairo_to_pdf) +{ + pdf_operators->cairo_to_pdf = cairo_to_pdf; +} + +typedef struct _pdf_path_info { + cairo_output_stream_t *output; + cairo_matrix_t *cairo_to_pdf; + cairo_matrix_t *ctm_inverse; +} pdf_path_info_t; + +static cairo_status_t +_cairo_pdf_path_move_to (void *closure, cairo_point_t *point) +{ + pdf_path_info_t *info = closure; + double x = _cairo_fixed_to_double (point->x); + double y = _cairo_fixed_to_double (point->y); + + if (info->cairo_to_pdf) + cairo_matrix_transform_point (info->cairo_to_pdf, &x, &y); + if (info->ctm_inverse) + cairo_matrix_transform_point (info->ctm_inverse, &x, &y); + + _cairo_output_stream_printf (info->output, + "%f %f m ", x, y); + + return _cairo_output_stream_get_status (info->output); +} + +static cairo_status_t +_cairo_pdf_path_line_to (void *closure, cairo_point_t *point) +{ + pdf_path_info_t *info = closure; + double x = _cairo_fixed_to_double (point->x); + double y = _cairo_fixed_to_double (point->y); + + if (info->cairo_to_pdf) + cairo_matrix_transform_point (info->cairo_to_pdf, &x, &y); + if (info->ctm_inverse) + cairo_matrix_transform_point (info->ctm_inverse, &x, &y); + + _cairo_output_stream_printf (info->output, + "%f %f l ", x, y); + + return _cairo_output_stream_get_status (info->output); +} + +static cairo_status_t +_cairo_pdf_path_curve_to (void *closure, + cairo_point_t *b, + cairo_point_t *c, + cairo_point_t *d) +{ + pdf_path_info_t *info = closure; + double bx = _cairo_fixed_to_double (b->x); + double by = _cairo_fixed_to_double (b->y); + double cx = _cairo_fixed_to_double (c->x); + double cy = _cairo_fixed_to_double (c->y); + double dx = _cairo_fixed_to_double (d->x); + double dy = _cairo_fixed_to_double (d->y); + + if (info->cairo_to_pdf) { + cairo_matrix_transform_point (info->cairo_to_pdf, &bx, &by); + cairo_matrix_transform_point (info->cairo_to_pdf, &cx, &cy); + cairo_matrix_transform_point (info->cairo_to_pdf, &dx, &dy); + } + if (info->ctm_inverse) { + cairo_matrix_transform_point (info->ctm_inverse, &bx, &by); + cairo_matrix_transform_point (info->ctm_inverse, &cx, &cy); + cairo_matrix_transform_point (info->ctm_inverse, &dx, &dy); + } + + _cairo_output_stream_printf (info->output, + "%f %f %f %f %f %f c ", + bx, by, cx, cy, dx, dy); + return _cairo_output_stream_get_status (info->output); +} + +static cairo_status_t +_cairo_pdf_path_close_path (void *closure) +{ + pdf_path_info_t *info = closure; + + _cairo_output_stream_printf (info->output, + "h\r\n"); + + return _cairo_output_stream_get_status (info->output); +} + +cairo_int_status_t +_cairo_pdf_operators_clip (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + cairo_fill_rule_t fill_rule) +{ + const char *pdf_operator; + + if (! path->has_current_point) { + /* construct an empty path */ + _cairo_output_stream_printf (pdf_operators->stream, "0 0 m "); + } else { + pdf_path_info_t info; + cairo_status_t status; + + info.output = pdf_operators->stream; + info.cairo_to_pdf = &pdf_operators->cairo_to_pdf; + info.ctm_inverse = NULL; + + status = _cairo_path_fixed_interpret (path, + CAIRO_DIRECTION_FORWARD, + _cairo_pdf_path_move_to, + _cairo_pdf_path_line_to, + _cairo_pdf_path_curve_to, + _cairo_pdf_path_close_path, + &info); + if (status) + return status; + } + + switch (fill_rule) { + case CAIRO_FILL_RULE_WINDING: + pdf_operator = "W"; + break; + case CAIRO_FILL_RULE_EVEN_ODD: + pdf_operator = "W*"; + break; + default: + ASSERT_NOT_REACHED; + } + + _cairo_output_stream_printf (pdf_operators->stream, + "%s n\r\n", + pdf_operator); + + return _cairo_output_stream_get_status (pdf_operators->stream); +} + +static int +_cairo_pdf_line_cap (cairo_line_cap_t cap) +{ + switch (cap) { + case CAIRO_LINE_CAP_BUTT: + return 0; + case CAIRO_LINE_CAP_ROUND: + return 1; + case CAIRO_LINE_CAP_SQUARE: + return 2; + default: + ASSERT_NOT_REACHED; + return 0; + } +} + +static int +_cairo_pdf_line_join (cairo_line_join_t join) +{ + switch (join) { + case CAIRO_LINE_JOIN_MITER: + return 0; + case CAIRO_LINE_JOIN_ROUND: + return 1; + case CAIRO_LINE_JOIN_BEVEL: + return 2; + default: + ASSERT_NOT_REACHED; + return 0; + } +} + +static cairo_int_status_t +_cairo_pdf_operators_emit_stroke_style (cairo_pdf_operators_t *pdf_operators, + cairo_stroke_style_t *style) +{ + _cairo_output_stream_printf (pdf_operators->stream, + "%f w\r\n", + style->line_width); + + _cairo_output_stream_printf (pdf_operators->stream, + "%d J\r\n", + _cairo_pdf_line_cap (style->line_cap)); + + _cairo_output_stream_printf (pdf_operators->stream, + "%d j\r\n", + _cairo_pdf_line_join (style->line_join)); + + if (style->num_dashes) { + unsigned int d; + _cairo_output_stream_printf (pdf_operators->stream, "["); + for (d = 0; d < style->num_dashes; d++) + _cairo_output_stream_printf (pdf_operators->stream, " %f", style->dash[d]); + _cairo_output_stream_printf (pdf_operators->stream, "] %f d\r\n", + style->dash_offset); + } else { + _cairo_output_stream_printf (pdf_operators->stream, "[] 0.0 d\r\n"); + } + + _cairo_output_stream_printf (pdf_operators->stream, + "%f M ", + style->miter_limit); + + return _cairo_output_stream_get_status (pdf_operators->stream); +} + + +cairo_int_status_t +_cairo_pdf_operator_stroke (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + cairo_stroke_style_t *style, + cairo_matrix_t *ctm, + cairo_matrix_t *ctm_inverse) +{ + pdf_path_info_t info; + cairo_status_t status; + cairo_matrix_t m; + + status = _cairo_pdf_operators_emit_stroke_style (pdf_operators, style); + if (status) + return status; + + info.output = pdf_operators->stream; + info.cairo_to_pdf = NULL; + info.ctm_inverse = ctm_inverse; + + cairo_matrix_multiply (&m, ctm, &pdf_operators->cairo_to_pdf); + _cairo_output_stream_printf (pdf_operators->stream, + "q %f %f %f %f %f %f cm\r\n", + m.xx, m.yx, m.xy, m.yy, + m.x0, m.y0); + + status = _cairo_path_fixed_interpret (path, + CAIRO_DIRECTION_FORWARD, + _cairo_pdf_path_move_to, + _cairo_pdf_path_line_to, + _cairo_pdf_path_curve_to, + _cairo_pdf_path_close_path, + &info); + if (status) + return status; + + _cairo_output_stream_printf (pdf_operators->stream, "S Q\r\n"); + + return _cairo_output_stream_get_status (pdf_operators->stream); +} + +cairo_int_status_t +_cairo_pdf_operators_fill (cairo_pdf_operators_t *pdf_operators, + cairo_path_fixed_t *path, + cairo_fill_rule_t fill_rule) +{ + const char *pdf_operator; + cairo_status_t status; + pdf_path_info_t info; + + info.output = pdf_operators->stream; + info.cairo_to_pdf = &pdf_operators->cairo_to_pdf; + info.ctm_inverse = NULL; + status = _cairo_path_fixed_interpret (path, + CAIRO_DIRECTION_FORWARD, + _cairo_pdf_path_move_to, + _cairo_pdf_path_line_to, + _cairo_pdf_path_curve_to, + _cairo_pdf_path_close_path, + &info); + if (status) + return status; + + switch (fill_rule) { + case CAIRO_FILL_RULE_WINDING: + pdf_operator = "f"; + break; + case CAIRO_FILL_RULE_EVEN_ODD: + pdf_operator = "f*"; + break; + default: + ASSERT_NOT_REACHED; + } + + _cairo_output_stream_printf (pdf_operators->stream, + "%s\r\n", + pdf_operator); + + return _cairo_output_stream_get_status (pdf_operators->stream); +} + +#define GLYPH_POSITION_TOLERANCE 0.001 + +cairo_int_status_t +_cairo_pdf_operators_show_glyphs (cairo_pdf_operators_t *pdf_operators, + cairo_glyph_t *glyphs, + int num_glyphs, + cairo_scaled_font_t *scaled_font) +{ + unsigned int current_subset_id = (unsigned int)-1; + cairo_scaled_font_subsets_glyph_t subset_glyph; + cairo_bool_t diagonal, in_TJ; + cairo_status_t status; + double Tlm_x = 0, Tlm_y = 0; + double Tm_x = 0, y; + int i, hex_width; + + for (i = 0; i < num_glyphs; i++) + cairo_matrix_transform_point (&pdf_operators->cairo_to_pdf, &glyphs[i].x, &glyphs[i].y); + + _cairo_output_stream_printf (pdf_operators->stream, + "BT\r\n"); + + if (scaled_font->scale.xy == 0.0 && + scaled_font->scale.yx == 0.0) + diagonal = TRUE; + else + diagonal = FALSE; + + in_TJ = FALSE; + for (i = 0; i < num_glyphs; i++) { + status = _cairo_scaled_font_subsets_map_glyph (pdf_operators->font_subsets, + scaled_font, glyphs[i].index, + &subset_glyph); + if (status) + return status; + + if (subset_glyph.is_composite) + hex_width = 4; + else + hex_width = 2; + + if (subset_glyph.is_scaled == FALSE) { + y = 0.0; + cairo_matrix_transform_distance (&scaled_font->scale, + &subset_glyph.x_advance, + &y); + } + + if (subset_glyph.subset_id != current_subset_id) { + if (in_TJ) { + _cairo_output_stream_printf (pdf_operators->stream, ">] TJ\r\n"); + in_TJ = FALSE; + } + _cairo_output_stream_printf (pdf_operators->stream, + "/f-%d-%d 1 Tf\r\n", + subset_glyph.font_id, + subset_glyph.subset_id); + if (pdf_operators->use_font_subset) { + status = pdf_operators->use_font_subset (subset_glyph.font_id, + subset_glyph.subset_id, + pdf_operators->use_font_subset_closure); + if (status) + return status; + } + } + + if (subset_glyph.subset_id != current_subset_id || !diagonal) { + _cairo_output_stream_printf (pdf_operators->stream, + "%f %f %f %f %f %f Tm\r\n", + scaled_font->scale.xx, + -scaled_font->scale.yx, + -scaled_font->scale.xy, + scaled_font->scale.yy, + glyphs[i].x, + glyphs[i].y); + current_subset_id = subset_glyph.subset_id; + Tlm_x = glyphs[i].x; + Tlm_y = glyphs[i].y; + Tm_x = Tlm_x; + } + + if (diagonal) { + if (i < num_glyphs - 1 && + fabs((glyphs[i].y - glyphs[i+1].y)/scaled_font->scale.yy) < GLYPH_POSITION_TOLERANCE && + fabs((glyphs[i].x - glyphs[i+1].x)/scaled_font->scale.xx) < 10) + { + if (!in_TJ) { + if (i != 0) { + _cairo_output_stream_printf (pdf_operators->stream, + "%f %f Td\r\n", + (glyphs[i].x - Tlm_x)/scaled_font->scale.xx, + (glyphs[i].y - Tlm_y)/scaled_font->scale.yy); + + Tlm_x = glyphs[i].x; + Tlm_y = glyphs[i].y; + Tm_x = Tlm_x; + } + _cairo_output_stream_printf (pdf_operators->stream, + "[<%0*x", + hex_width, + subset_glyph.subset_glyph_index); + Tm_x += subset_glyph.x_advance; + in_TJ = TRUE; + } else { + if (fabs((glyphs[i].x - Tm_x)/scaled_font->scale.xx) > GLYPH_POSITION_TOLERANCE) { + double delta = glyphs[i].x - Tm_x; + + _cairo_output_stream_printf (pdf_operators->stream, + "> %f <", + -1000.0*delta/scaled_font->scale.xx); + Tm_x += delta; + } + _cairo_output_stream_printf (pdf_operators->stream, + "%0*x", + hex_width, + subset_glyph.subset_glyph_index); + Tm_x += subset_glyph.x_advance; + } + } + else + { + if (in_TJ) { + if (fabs((glyphs[i].x - Tm_x)/scaled_font->scale.xx) > GLYPH_POSITION_TOLERANCE) { + double delta = glyphs[i].x - Tm_x; + + _cairo_output_stream_printf (pdf_operators->stream, + "> %f <", + -1000.0*delta/scaled_font->scale.xx); + Tm_x += delta; + } + _cairo_output_stream_printf (pdf_operators->stream, + "%0*x>] TJ\r\n", + hex_width, + subset_glyph.subset_glyph_index); + Tm_x += subset_glyph.x_advance; + in_TJ = FALSE; + } else { + if (i != 0) { + _cairo_output_stream_printf (pdf_operators->stream, + "%f %f Td ", + (glyphs[i].x - Tlm_x)/scaled_font->scale.xx, + (glyphs[i].y - Tlm_y)/-scaled_font->scale.yy); + Tlm_x = glyphs[i].x; + Tlm_y = glyphs[i].y; + Tm_x = Tlm_x; + } + _cairo_output_stream_printf (pdf_operators->stream, + "<%0*x> Tj ", + hex_width, + subset_glyph.subset_glyph_index); + Tm_x += subset_glyph.x_advance; + } + } + } else { + _cairo_output_stream_printf (pdf_operators->stream, + "<%0*x> Tj\r\n", + hex_width, + subset_glyph.subset_glyph_index); + } + } + + _cairo_output_stream_printf (pdf_operators->stream, + "ET\r\n"); + + return _cairo_output_stream_get_status (pdf_operators->stream); +} diff --git a/src/cairo-pdf-surface-private.h b/src/cairo-pdf-surface-private.h index 28b6fd1..233b01d 100644 --- a/src/cairo-pdf-surface-private.h +++ b/src/cairo-pdf-surface-private.h @@ -1,8 +1,9 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ /* cairo - a vector graphics library with display and print output * * Copyright © 2004 Red Hat, Inc * Copyright © 2006 Red Hat, Inc - * Copyright © 2007 Adrian Johnson + * Copyright © 2007, 2008 Adrian Johnson * * This library is free software; you can redistribute it and/or * modify it either under the terms of the GNU Lesser General Public @@ -44,6 +45,8 @@ #include "cairo-pdf.h" #include "cairo-surface-private.h" +#include "cairo-pdf-operators-private.h" +#include "cairo-path-fixed-private.h" typedef struct _cairo_pdf_resource { unsigned int id; @@ -57,6 +60,37 @@ typedef struct _cairo_pdf_group_resources { cairo_array_t fonts; } cairo_pdf_group_resources_t; +typedef struct _cairo_pdf_pattern { + cairo_pattern_t *pattern; + cairo_pdf_resource_t pattern_res; + cairo_pdf_resource_t gstate_res; +} cairo_pdf_pattern_t; + +typedef enum _cairo_pdf_operation { + PDF_PAINT, + PDF_MASK, + PDF_FILL, + PDF_STROKE, + PDF_SHOW_GLYPHS +} cairo_pdf_operation_t; + +typedef struct _cairo_pdf_smask_group +{ + cairo_pdf_resource_t group_res; + cairo_pdf_operation_t operation; + cairo_pattern_t *source; + cairo_pdf_resource_t source_res; + cairo_pattern_t *mask; + cairo_path_fixed_t path; + cairo_fill_rule_t fill_rule; + cairo_stroke_style_t *style; + cairo_matrix_t ctm; + cairo_matrix_t ctm_inverse; + cairo_glyph_t *glyphs; + int num_glyphs; + cairo_scaled_font_t *scaled_font; +} cairo_pdf_smask_group_t; + typedef struct _cairo_pdf_surface cairo_pdf_surface_t; struct _cairo_pdf_surface { @@ -74,8 +108,9 @@ struct _cairo_pdf_surface { cairo_array_t pages; cairo_array_t rgb_linear_functions; cairo_array_t alpha_linear_functions; + cairo_array_t patterns; + cairo_array_t smask_groups; cairo_array_t knockout_group; - cairo_array_t content_group; cairo_scaled_font_subsets_t *font_subsets; cairo_array_t fonts; @@ -85,6 +120,11 @@ struct _cairo_pdf_surface { cairo_bool_t compress_content; + cairo_pdf_resource_t content; + cairo_pdf_resource_t content_resources; + cairo_pdf_group_resources_t resources; + cairo_bool_t has_fallback_images; + struct { cairo_bool_t active; cairo_pdf_resource_t self; @@ -99,32 +139,11 @@ struct _cairo_pdf_surface { cairo_output_stream_t *stream; cairo_output_stream_t *mem_stream; cairo_output_stream_t *old_output; - cairo_pdf_group_resources_t resources; + cairo_pdf_resource_t resource; cairo_bool_t is_knockout; - cairo_pdf_resource_t first_object; } group_stream; - struct { - cairo_bool_t active; - cairo_output_stream_t *stream; - cairo_output_stream_t *mem_stream; - cairo_output_stream_t *old_output; - cairo_pdf_group_resources_t resources; - } content_stream; - - struct { - cairo_pattern_type_t type; - double red; - double green; - double blue; - double alpha; - cairo_pdf_resource_t smask; - cairo_pdf_resource_t pattern; - } emitted_pattern; - - cairo_array_t *current_group; - cairo_pdf_group_resources_t *current_resources; - + cairo_pdf_operators_t pdf_operators; cairo_paginated_mode_t paginated_mode; cairo_bool_t force_fallbacks; diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 695e6e9..238f4f9 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -1,8 +1,9 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ /* cairo - a vector graphics library with display and print output * * Copyright © 2004 Red Hat, Inc * Copyright © 2006 Red Hat, Inc - * Copyright © 2007 Adrian Johnson + * Copyright © 2007, 2008 Adrian Johnson * * This library is free software; you can redistribute it and/or * modify it either under the terms of the GNU Lesser General Public @@ -41,9 +42,9 @@ #include "cairoint.h" #include "cairo-pdf.h" #include "cairo-pdf-surface-private.h" +#include "cairo-pdf-operators-private.h" #include "cairo-scaled-font-subsets-private.h" #include "cairo-paginated-private.h" -#include "cairo-path-fixed-private.h" #include "cairo-output-stream-private.h" #include "cairo-meta-surface-private.h" @@ -87,37 +88,6 @@ * that fallback images do not composite with any content under the * fallback images. * - * The group containing the supported operations (content_group_list - * in the example below) does not do any drawing directly. Instead it - * paints groups containing the drawing operations and performs - * clipping. The reason for this is that clipping operations performed - * in a group do not affect the parent group. - * - * Example PDF Page Structure: - * - * Page Content - * ------------ - * /knockout_group Do - * - * knockout_group - * -------------- - * /content_group_list Do - * /fallback_image_1 Do - * /fallback_image_2 Do - * ... - * - * content_group_list - * ------------------ - * q - * /content_group_1 Do - * /content_group_2 Do - * 10 10 m 10 20 l 20 20 l 20 10 l h W # clip - * /content_group_3 Do - * Q q # reset clip - * /content_group_4 Do - * Q - * - * * Streams: * * This PDF surface has three types of streams: @@ -130,7 +100,7 @@ * * PDF Stream: * A PDF Stream may be opened and closed with the following functions: - * _cairo_pdf_surface_open_stream () + * _cairo_pdf_surface_open stream () * _cairo_pdf_surface_close_stream () * * PDF Streams are written directly to the PDF file. They are used for @@ -138,49 +108,23 @@ * * Content Stream: * The Content Stream is opened and closed with the following functions: - * _cairo_pdf_surface_start_content_stream () - * _cairo_pdf_surface_stop_content_stream () - * - * The Content Stream is written to content_group_n groups (as shown - * in the page structure example). The Content Stream may be paused - * and resumed with the following functions: - * _cairo_pdf_surface_pause_content_stream () - * _cairo_pdf_surface_resume_content_stream () - * - * When the Content Stream is paused, a PDF Stream or Group Stream - * may be opened. After closing the PDF Stream or Group Stream the - * Content Stream may be resumed. + * _cairo_pdf_surface_open_content_stream () + * _cairo_pdf_surface_close_content_stream () * - * The Content Stream contains the text and graphics operators. When - * a pattern is required the Content Stream is paused, a PDF Stream - * is opened, the pattern is written to a PDF Stream, the PDF Stream - * is closed, then the Content Stream is resumed. - * - * Each group comprising the Content Stream is stored in memory - * until the stream is closed or the maximum group size is - * exceeded. This is due to the need to list all resources used in - * the group in the group's stream dictionary. + * The Content Stream contains the text and graphics operators. * * Group Stream: * A Group Stream may be opened and closed with the following functions: * _cairo_pdf_surface_open_group () * _cairo_pdf_surface_close_group () * - * A Group Stream is written to a separate group in the PDF file - * that is not part of the Content Stream. Group Streams are also - * stored in memory until the stream is closed due to the need to - * list the resources used in the group in the group's stream - * dictionary. - * - * Group Streams are used for short sequences of graphics operations - * that need to be in a separate group from the Content Stream. + * A Group Stream is a Form XObject. It is used for short sequences + * of operators. As the content is very short the group is stored in + * memory until it is closed. This allows some optimization such as + * including the Resource dictionary and stream length inside the + * XObject instead of using an indirect object. */ -/* The group stream length is checked after each operation. When this - * limit is exceeded the group is written out to the pdf stream and a - * new group is created. */ -#define GROUP_STREAM_LIMIT 65536 - typedef struct _cairo_pdf_object { long offset; } cairo_pdf_object_t; @@ -203,36 +147,29 @@ typedef struct _cairo_pdf_alpha_linear_function { double alpha2; } cairo_pdf_alpha_linear_function_t; -typedef enum group_element_type { - ELEM_GROUP, - ELEM_CLIP -} group_element_type_t; - -typedef struct _cairo_pdf_group_element { - group_element_type_t type; - cairo_pdf_resource_t group; - cairo_path_fixed_t *clip_path; - cairo_fill_rule_t fill_rule; -} cairo_pdf_group_element_t; - - static cairo_pdf_resource_t _cairo_pdf_surface_new_object (cairo_pdf_surface_t *surface); static void -_cairo_pdf_group_element_array_finish (cairo_array_t *array); +_cairo_pdf_surface_clear (cairo_pdf_surface_t *surface); static void -_cairo_pdf_surface_clear (cairo_pdf_surface_t *surface); +_cairo_pdf_smask_group_destroy (cairo_pdf_smask_group_t *group); + +static cairo_status_t +_cairo_pdf_surface_add_font (unsigned int font_id, + unsigned int subset_id, + void *closure); static void _cairo_pdf_group_resources_init (cairo_pdf_group_resources_t *res); -static cairo_pdf_resource_t +static cairo_status_t _cairo_pdf_surface_open_stream (cairo_pdf_surface_t *surface, + cairo_pdf_resource_t *resource, cairo_bool_t compressed, const char *fmt, - ...) CAIRO_PRINTF_FORMAT(3, 4); + ...) CAIRO_PRINTF_FORMAT(4, 5); static cairo_status_t _cairo_pdf_surface_close_stream (cairo_pdf_surface_t *surface); @@ -252,11 +189,6 @@ static long _cairo_pdf_surface_write_xref (cairo_pdf_surface_t *surface); static cairo_status_t -_cairo_pdf_surface_emit_clip (cairo_pdf_surface_t *surface, - cairo_path_fixed_t *path, - cairo_fill_rule_t fill_rule); - -static cairo_status_t _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface); static cairo_status_t @@ -302,21 +234,19 @@ _cairo_pdf_surface_create_for_stream_internal (cairo_output_stream_t *output, double height) { cairo_pdf_surface_t *surface; - cairo_status_t status; + cairo_status_t status, status_ignored; surface = malloc (sizeof (cairo_pdf_surface_t)); if (surface == NULL) { /* destroy stream on behalf of caller */ status = _cairo_output_stream_destroy (output); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } _cairo_surface_init (&surface->base, &cairo_pdf_surface_backend, CAIRO_CONTENT_COLOR_ALPHA); surface->output = output; - surface->width = width; surface->height = height; cairo_matrix_init (&surface->cairo_to_pdf, 1, 0, 0, -1, 0, height); @@ -326,40 +256,44 @@ _cairo_pdf_surface_create_for_stream_internal (cairo_output_stream_t *output, _cairo_array_init (&surface->rgb_linear_functions, sizeof (cairo_pdf_rgb_linear_function_t)); _cairo_array_init (&surface->alpha_linear_functions, sizeof (cairo_pdf_alpha_linear_function_t)); _cairo_array_init (&surface->fonts, sizeof (cairo_pdf_font_t)); - _cairo_array_init (&surface->knockout_group, sizeof (cairo_pdf_group_element_t)); - _cairo_array_init (&surface->content_group, sizeof (cairo_pdf_group_element_t)); + _cairo_array_init (&surface->patterns, sizeof (cairo_pdf_pattern_t)); + _cairo_array_init (&surface->smask_groups, sizeof (cairo_pdf_smask_group_t *)); + _cairo_array_init (&surface->knockout_group, sizeof (cairo_pdf_resource_t)); - _cairo_pdf_group_resources_init (&surface->group_stream.resources); - _cairo_pdf_group_resources_init (&surface->content_stream.resources); + _cairo_pdf_group_resources_init (&surface->resources); surface->font_subsets = _cairo_scaled_font_subsets_create_composite (); if (! surface->font_subsets) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto BAIL0; } surface->next_available_resource.id = 1; surface->pages_resource = _cairo_pdf_surface_new_object (surface); - if (surface->pages_resource.id == 0) + if (surface->pages_resource.id == 0) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto BAIL1; + } surface->compress_content = TRUE; surface->pdf_stream.active = FALSE; surface->pdf_stream.old_output = NULL; - surface->content_stream.active = FALSE; - surface->content_stream.stream = NULL; - surface->content_stream.mem_stream = NULL; surface->group_stream.active = FALSE; surface->group_stream.stream = NULL; surface->group_stream.mem_stream = NULL; - surface->current_group = NULL; - surface->current_resources = NULL; - surface->paginated_mode = CAIRO_PAGINATED_MODE_ANALYZE; surface->force_fallbacks = FALSE; + _cairo_pdf_operators_init (&surface->pdf_operators, + surface->output, + surface->cairo_to_pdf, + surface->font_subsets); + _cairo_pdf_operators_set_font_subsets_callback (&surface->pdf_operators, + _cairo_pdf_surface_add_font, + surface); + /* Document header */ _cairo_output_stream_printf (surface->output, "%%PDF-1.4\r\n"); @@ -371,7 +305,8 @@ _cairo_pdf_surface_create_for_stream_internal (cairo_output_stream_t *output, CAIRO_CONTENT_COLOR_ALPHA, width, height, &cairo_pdf_surface_paginated_backend); - if (surface->paginated_surface->status == CAIRO_STATUS_SUCCESS) + status = surface->paginated_surface->status; + if (status == CAIRO_STATUS_SUCCESS) return surface->paginated_surface; BAIL1: @@ -381,9 +316,9 @@ BAIL0: free (surface); /* destroy stream on behalf of caller */ - status = _cairo_output_stream_destroy (output); + status_ignored = _cairo_output_stream_destroy (output); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); } /** @@ -412,13 +347,11 @@ cairo_pdf_surface_create_for_stream (cairo_write_func_t write_func, double width_in_points, double height_in_points) { - cairo_status_t status; cairo_output_stream_t *output; output = _cairo_output_stream_create (write_func, NULL, closure); - status = _cairo_output_stream_get_status (output); - if (status) - return (cairo_surface_t*) &_cairo_surface_nil; + if (_cairo_output_stream_get_status (output)) + return _cairo_surface_create_in_error (_cairo_output_stream_destroy (output)); return _cairo_pdf_surface_create_for_stream_internal (output, width_in_points, @@ -449,15 +382,11 @@ cairo_pdf_surface_create (const char *filename, double width_in_points, double height_in_points) { - cairo_status_t status; cairo_output_stream_t *output; output = _cairo_output_stream_create_for_filename (filename); - status = _cairo_output_stream_get_status (output); - if (status) - return (status == CAIRO_STATUS_WRITE_ERROR) ? - (cairo_surface_t*) &_cairo_surface_nil_write_error : - (cairo_surface_t*) &_cairo_surface_nil; + if (_cairo_output_stream_get_status (output)) + return _cairo_surface_create_in_error (_cairo_output_stream_destroy (output)); return _cairo_pdf_surface_create_for_stream_internal (output, width_in_points, @@ -527,6 +456,8 @@ cairo_pdf_surface_set_size (cairo_surface_t *surface, pdf_surface->width = width_in_points; pdf_surface->height = height_in_points; cairo_matrix_init (&pdf_surface->cairo_to_pdf, 1, 0, 0, -1, 0, height_in_points); + _cairo_pdf_operators_set_cairo_to_pdf_matrix (&pdf_surface->pdf_operators, + pdf_surface->cairo_to_pdf); status = _cairo_paginated_surface_set_size (pdf_surface->paginated_surface, width_in_points, height_in_points); @@ -537,9 +468,23 @@ cairo_pdf_surface_set_size (cairo_surface_t *surface, static void _cairo_pdf_surface_clear (cairo_pdf_surface_t *surface) { - _cairo_pdf_group_element_array_finish (&surface->content_group); - _cairo_pdf_group_element_array_finish (&surface->knockout_group); - _cairo_array_truncate (&surface->content_group, 0); + int i, size; + cairo_pdf_pattern_t *pattern; + cairo_pdf_smask_group_t *group; + + size = _cairo_array_num_elements (&surface->patterns); + for (i = 0; i < size; i++) { + pattern = (cairo_pdf_pattern_t *) _cairo_array_index (&surface->patterns, i); + cairo_pattern_destroy (pattern->pattern); + } + _cairo_array_truncate (&surface->patterns, 0); + + size = _cairo_array_num_elements (&surface->smask_groups); + for (i = 0; i < size; i++) { + _cairo_array_copy_element (&surface->smask_groups, i, &group); + _cairo_pdf_smask_group_destroy (group); + } + _cairo_array_truncate (&surface->smask_groups, 0); _cairo_array_truncate (&surface->knockout_group, 0); } @@ -581,7 +526,7 @@ _cairo_pdf_surface_add_alpha (cairo_pdf_surface_t *surface, int num_alphas, i; double other; cairo_status_t status; - cairo_pdf_group_resources_t *res = surface->current_resources; + cairo_pdf_group_resources_t *res = &surface->resources; num_alphas = _cairo_array_num_elements (&res->alphas); for (i = 0; i < num_alphas; i++) { @@ -605,32 +550,33 @@ static cairo_status_t _cairo_pdf_surface_add_smask (cairo_pdf_surface_t *surface, cairo_pdf_resource_t smask) { - return _cairo_array_append (&surface->current_resources->smasks, &smask); + return _cairo_array_append (&(surface->resources.smasks), &smask); } static cairo_status_t _cairo_pdf_surface_add_pattern (cairo_pdf_surface_t *surface, cairo_pdf_resource_t pattern) { - return _cairo_array_append (&surface->current_resources->patterns, &pattern); + return _cairo_array_append (&(surface->resources.patterns), &pattern); } static cairo_status_t _cairo_pdf_surface_add_xobject (cairo_pdf_surface_t *surface, cairo_pdf_resource_t xobject) { - return _cairo_array_append (&surface->current_resources->xobjects, &xobject); + return _cairo_array_append (&(surface->resources.xobjects), &xobject); } static cairo_status_t -_cairo_pdf_surface_add_font (cairo_pdf_surface_t *surface, - unsigned int font_id, - unsigned int subset_id) +_cairo_pdf_surface_add_font (unsigned int font_id, + unsigned int subset_id, + void *closure) { + cairo_pdf_surface_t *surface = closure; cairo_pdf_font_t font; int num_fonts, i; cairo_status_t status; - cairo_pdf_group_resources_t *res = surface->current_resources; + cairo_pdf_group_resources_t *res = &surface->resources; num_fonts = _cairo_array_num_elements (&res->fonts); for (i = 0; i < num_fonts; i++) { @@ -668,7 +614,6 @@ _cairo_pdf_surface_get_font_resource (cairo_pdf_surface_t *surface, { cairo_pdf_font_t font; int num_fonts, i; - cairo_pdf_resource_t resource; num_fonts = _cairo_array_num_elements (&surface->fonts); for (i = 0; i < num_fonts; i++) { @@ -676,9 +621,9 @@ _cairo_pdf_surface_get_font_resource (cairo_pdf_surface_t *surface, if (font.font_id == font_id && font.subset_id == subset_id) return font.subset_resource; } - resource.id = 0; - return resource; + font.subset_resource.id = 0; + return font.subset_resource; } static void @@ -690,36 +635,36 @@ _cairo_pdf_surface_emit_group_resources (cairo_pdf_surface_t *surface, cairo_pdf_resource_t *smask, *pattern, *xobject; cairo_pdf_font_t *font; - _cairo_output_stream_printf (surface->output, " /Resources <<\r\n"); + _cairo_output_stream_printf (surface->output, "<<\r\n"); num_alphas = _cairo_array_num_elements (&res->alphas); num_smasks = _cairo_array_num_elements (&res->smasks); if (num_alphas > 0 || num_smasks > 0) { _cairo_output_stream_printf (surface->output, - " /ExtGState <<\r\n"); + " /ExtGState <<\r\n"); for (i = 0; i < num_alphas; i++) { _cairo_array_copy_element (&res->alphas, i, &alpha); _cairo_output_stream_printf (surface->output, - " /a%d << /CA %f /ca %f >>\r\n", + " /a%d << /CA %f /ca %f >>\r\n", i, alpha, alpha); } for (i = 0; i < num_smasks; i++) { smask = _cairo_array_index (&res->smasks, i); _cairo_output_stream_printf (surface->output, - " /s%d %d 0 R\r\n", + " /s%d %d 0 R\r\n", smask->id, smask->id); } _cairo_output_stream_printf (surface->output, - " >>\r\n"); + " >>\r\n"); } num_resources = _cairo_array_num_elements (&res->patterns); if (num_resources > 0) { _cairo_output_stream_printf (surface->output, - " /Pattern <<"); + " /Pattern <<"); for (i = 0; i < num_resources; i++) { pattern = _cairo_array_index (&res->patterns, i); _cairo_output_stream_printf (surface->output, @@ -734,7 +679,7 @@ _cairo_pdf_surface_emit_group_resources (cairo_pdf_surface_t *surface, num_resources = _cairo_array_num_elements (&res->xobjects); if (num_resources > 0) { _cairo_output_stream_printf (surface->output, - " /XObject <<"); + " /XObject <<"); for (i = 0; i < num_resources; i++) { xobject = _cairo_array_index (&res->xobjects, i); @@ -749,24 +694,127 @@ _cairo_pdf_surface_emit_group_resources (cairo_pdf_surface_t *surface, num_resources = _cairo_array_num_elements (&res->fonts); if (num_resources > 0) { - _cairo_output_stream_printf (surface->output," /Font <<\r\n"); + _cairo_output_stream_printf (surface->output," /Font <<\r\n"); for (i = 0; i < num_resources; i++) { font = _cairo_array_index (&res->fonts, i); _cairo_output_stream_printf (surface->output, - " /f-%d-%d %d 0 R\r\n", + " /f-%d-%d %d 0 R\r\n", font->font_id, font->subset_id, font->subset_resource.id); } - _cairo_output_stream_printf (surface->output, " >>\r\n"); + _cairo_output_stream_printf (surface->output, " >>\r\n"); } _cairo_output_stream_printf (surface->output, - " >>\r\n"); + ">>\r\n"); } -static cairo_pdf_resource_t +static cairo_pdf_smask_group_t * +_cairo_pdf_surface_create_smask_group (cairo_pdf_surface_t *surface) +{ + cairo_pdf_smask_group_t *group; + + group = calloc (1, sizeof (cairo_pdf_smask_group_t)); + if (group == NULL) { + _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + return NULL; + } + + group->group_res = _cairo_pdf_surface_new_object (surface); + if (group->group_res.id == 0) { + _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + free (group); + return NULL; + } + + return group; +} + +static void +_cairo_pdf_smask_group_destroy (cairo_pdf_smask_group_t *group) +{ + if (group->operation == PDF_FILL || group->operation == PDF_STROKE) + _cairo_path_fixed_fini (&group->path); + if (group->source) + cairo_pattern_destroy (group->source); + if (group->mask) + cairo_pattern_destroy (group->mask); + if (group->scaled_font) + cairo_scaled_font_destroy (group->scaled_font); + free (group); +} + +static cairo_status_t +_cairo_pdf_surface_add_smask_group (cairo_pdf_surface_t *surface, + cairo_pdf_smask_group_t *group) +{ + return _cairo_array_append (&surface->smask_groups, &group); +} + +static cairo_status_t +_cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t *surface, + cairo_pattern_t *pattern, + cairo_pdf_resource_t *pattern_res, + cairo_pdf_resource_t *gstate_res) +{ + cairo_pdf_pattern_t pdf_pattern; + cairo_status_t status; + + /* Solid colors are emitted into the content stream */ + if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) { + pattern_res->id = 0; + gstate_res->id = 0; + return CAIRO_STATUS_SUCCESS; + } + + /* Gradients with zero stops do not produce any output */ + if (pattern->type == CAIRO_PATTERN_TYPE_LINEAR || + pattern->type == CAIRO_PATTERN_TYPE_RADIAL) + { + cairo_gradient_pattern_t *gradient; + + gradient = (cairo_gradient_pattern_t *) pattern; + if (gradient->n_stops == 0) + return CAIRO_INT_STATUS_NOTHING_TO_DO; + } + + pdf_pattern.pattern = cairo_pattern_reference (pattern); + pdf_pattern.pattern_res = _cairo_pdf_surface_new_object (surface); + if (pdf_pattern.pattern_res.id == 0) { + cairo_pattern_destroy (pattern); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + + pdf_pattern.gstate_res.id = 0; + + /* gradient patterns require an smask object to implement transparency */ + if (pattern->type == CAIRO_PATTERN_TYPE_LINEAR || + pattern->type == CAIRO_PATTERN_TYPE_RADIAL) { + if (_cairo_pattern_is_opaque (pattern) == FALSE) { + pdf_pattern.gstate_res = _cairo_pdf_surface_new_object (surface); + if (pdf_pattern.gstate_res.id == 0) { + cairo_pattern_destroy (pattern); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } + } + } + + *pattern_res = pdf_pattern.pattern_res; + *gstate_res = pdf_pattern.gstate_res; + + status = _cairo_array_append (&surface->patterns, &pdf_pattern); + if (status) { + cairo_pattern_destroy (pattern); + return status; + } + + return CAIRO_STATUS_SUCCESS; +} + +static cairo_status_t _cairo_pdf_surface_open_stream (cairo_pdf_surface_t *surface, + cairo_pdf_resource_t *resource, cairo_bool_t compressed, const char *fmt, ...) @@ -775,20 +823,23 @@ _cairo_pdf_surface_open_stream (cairo_pdf_surface_t *surface, cairo_pdf_resource_t self, length; cairo_output_stream_t *output = NULL; - self = _cairo_pdf_surface_new_object (surface); - if (self.id == 0) - return self; + if (resource) { + self = *resource; + _cairo_pdf_surface_update_object (surface, self); + } else { + self = _cairo_pdf_surface_new_object (surface); + if (self.id == 0) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } length = _cairo_pdf_surface_new_object (surface); if (length.id == 0) - return length; + return _cairo_error (CAIRO_STATUS_NO_MEMORY); if (compressed) { output = _cairo_deflate_stream_create (surface->output); - if (_cairo_output_stream_get_status (output)) { - self.id = 0; - return self; - } + if (_cairo_output_stream_get_status (output)) + return _cairo_output_stream_destroy (output); } surface->pdf_stream.active = TRUE; @@ -821,9 +872,10 @@ _cairo_pdf_surface_open_stream (cairo_pdf_surface_t *surface, assert (surface->pdf_stream.old_output == NULL); surface->pdf_stream.old_output = surface->output; surface->output = output; + _cairo_pdf_operators_set_stream (&surface->pdf_operators, surface->output); } - return surface->pdf_stream.self; + return _cairo_output_stream_get_status (surface->output); } static cairo_status_t @@ -838,6 +890,7 @@ _cairo_pdf_surface_close_stream (cairo_pdf_surface_t *surface) if (surface->pdf_stream.compressed) { status = _cairo_output_stream_destroy (surface->output); surface->output = surface->pdf_stream.old_output; + _cairo_pdf_operators_set_stream (&surface->pdf_operators, surface->output); surface->pdf_stream.old_output = NULL; _cairo_output_stream_printf (surface->output, "\r\n"); @@ -860,26 +913,26 @@ _cairo_pdf_surface_close_stream (cairo_pdf_surface_t *surface) surface->pdf_stream.active = FALSE; + if (status == CAIRO_STATUS_SUCCESS) + status = _cairo_output_stream_get_status (surface->output); + return status; } -static cairo_pdf_resource_t +static void _cairo_pdf_surface_write_memory_stream (cairo_pdf_surface_t *surface, cairo_output_stream_t *mem_stream, + cairo_pdf_resource_t resource, cairo_pdf_group_resources_t *resources, cairo_bool_t is_knockout_group) { - cairo_pdf_resource_t group; - - group = _cairo_pdf_surface_new_object (surface); - if (group.id == 0) - return group; + _cairo_pdf_surface_update_object (surface, resource); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" "<< /Type /XObject\r\n" " /Length %d\r\n", - group.id, + resource.id, _cairo_memory_stream_length (mem_stream)); if (surface->compress_content) { @@ -898,11 +951,12 @@ _cairo_pdf_surface_write_memory_stream (cairo_pdf_surface_t *surface, surface->height); if (is_knockout_group) - _cairo_output_stream_printf (surface->output, - " /K true\r\n"); + _cairo_output_stream_printf (surface->output, + " /K true\r\n"); _cairo_output_stream_printf (surface->output, - " >>\r\n"); + " >>\r\n" + " /Resources\r\n"); _cairo_pdf_surface_emit_group_resources (surface, resources); _cairo_output_stream_printf (surface->output, ">>\r\n" @@ -911,17 +965,15 @@ _cairo_pdf_surface_write_memory_stream (cairo_pdf_surface_t *surface, _cairo_output_stream_printf (surface->output, "endstream\r\n" "endobj\r\n"); - - return group; } static cairo_status_t -_cairo_pdf_surface_open_group (cairo_pdf_surface_t *surface) +_cairo_pdf_surface_open_group (cairo_pdf_surface_t *surface, + cairo_pdf_resource_t *resource) { cairo_status_t status; assert (surface->pdf_stream.active == FALSE); - assert (surface->content_stream.active == FALSE); assert (surface->group_stream.active == FALSE); surface->group_stream.active = TRUE; @@ -935,30 +987,34 @@ _cairo_pdf_surface_open_group (cairo_pdf_surface_t *surface) surface->group_stream.stream = surface->group_stream.mem_stream; } status = _cairo_output_stream_get_status (surface->group_stream.stream); - if (status) - return status; surface->group_stream.old_output = surface->output; surface->output = surface->group_stream.stream; - _cairo_pdf_group_resources_clear (&surface->group_stream.resources); - surface->current_resources = &surface->group_stream.resources; + _cairo_pdf_operators_set_stream (&surface->pdf_operators, surface->output); + _cairo_pdf_group_resources_clear (&surface->resources); + + if (resource) { + surface->group_stream.resource = *resource; + } else { + surface->group_stream.resource = _cairo_pdf_surface_new_object (surface); + if (surface->group_stream.resource.id == 0) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + } surface->group_stream.is_knockout = FALSE; - return CAIRO_STATUS_SUCCESS; + return status; } static cairo_status_t -_cairo_pdf_surface_open_knockout_group (cairo_pdf_surface_t *surface, - cairo_pdf_resource_t *first_object) +_cairo_pdf_surface_open_knockout_group (cairo_pdf_surface_t *surface) { cairo_status_t status; - status = _cairo_pdf_surface_open_group (surface); + status = _cairo_pdf_surface_open_group (surface, NULL); if (status) return status; surface->group_stream.is_knockout = TRUE; - surface->group_stream.first_object = *first_object; return CAIRO_STATUS_SUCCESS; } @@ -967,209 +1023,110 @@ static cairo_status_t _cairo_pdf_surface_close_group (cairo_pdf_surface_t *surface, cairo_pdf_resource_t *group) { - cairo_status_t status; + cairo_status_t status = CAIRO_STATUS_SUCCESS, status2; assert (surface->pdf_stream.active == FALSE); assert (surface->group_stream.active == TRUE); if (surface->compress_content) { status = _cairo_output_stream_destroy (surface->group_stream.stream); - if (status) - return status; + surface->group_stream.stream = NULL; _cairo_output_stream_printf (surface->group_stream.mem_stream, "\r\n"); } surface->output = surface->group_stream.old_output; + _cairo_pdf_operators_set_stream (&surface->pdf_operators, surface->output); surface->group_stream.active = FALSE; - *group = _cairo_pdf_surface_write_memory_stream (surface, - surface->group_stream.mem_stream, - &surface->group_stream.resources, - surface->group_stream.is_knockout); - if (group->id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - return _cairo_output_stream_close (surface->group_stream.mem_stream); -} - -static cairo_status_t -_cairo_pdf_surface_write_group_list (cairo_pdf_surface_t *surface, - cairo_array_t *group_list) -{ - int i, len; - cairo_pdf_group_element_t *elem; - cairo_status_t status; + _cairo_pdf_surface_write_memory_stream (surface, + surface->group_stream.mem_stream, + surface->group_stream.resource, + &surface->resources, + surface->group_stream.is_knockout); + if (group) + *group = surface->group_stream.resource; + + status2 = _cairo_output_stream_destroy (surface->group_stream.mem_stream); + if (status == CAIRO_STATUS_SUCCESS) + status = status2; - _cairo_output_stream_printf (surface->output, "q\r\n"); - if (surface->group_stream.is_knockout) { - _cairo_output_stream_printf (surface->output, - "/x%d Do\r\n", - surface->group_stream.first_object.id); - status = _cairo_pdf_surface_add_xobject (surface, surface->group_stream.first_object); - if (status) - return status; - } - len = _cairo_array_num_elements (group_list); - for (i = 0; i < len; i++) { - elem = _cairo_array_index (group_list, i); - if (elem->type == ELEM_GROUP) { - _cairo_output_stream_printf (surface->output, - "/x%d Do\r\n", - elem->group.id); - status = _cairo_pdf_surface_add_xobject (surface, elem->group); - if (status) - return status; - } else if (elem->type == ELEM_CLIP) { - status = _cairo_pdf_surface_emit_clip (surface, elem->clip_path, elem->fill_rule); - if (status) - return status; - } - } - _cairo_output_stream_printf (surface->output, "Q\r\n"); + surface->group_stream.mem_stream = NULL; + surface->group_stream.stream = NULL; - return CAIRO_STATUS_SUCCESS; + return status; } static cairo_status_t -_cairo_pdf_surface_start_content_stream (cairo_pdf_surface_t *surface) +_cairo_pdf_surface_open_content_stream (cairo_pdf_surface_t *surface, + cairo_bool_t is_form) { cairo_status_t status; - if (surface->content_stream.active) - return CAIRO_STATUS_SUCCESS; - assert (surface->pdf_stream.active == FALSE); - assert (surface->content_stream.active == FALSE); assert (surface->group_stream.active == FALSE); - surface->content_stream.active = TRUE; - surface->content_stream.mem_stream = _cairo_memory_stream_create (); - - if (surface->compress_content) { - surface->content_stream.stream = - _cairo_deflate_stream_create (surface->content_stream.mem_stream); - } else { - surface->content_stream.stream = surface->content_stream.mem_stream; - } - status = _cairo_output_stream_get_status (surface->content_stream.stream); - if (status) - return status; - - surface->content_stream.old_output = surface->output; - surface->output = surface->content_stream.stream; - _cairo_pdf_group_resources_clear (&surface->content_stream.resources); - surface->current_resources = &surface->content_stream.resources; - - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_cairo_pdf_surface_add_group_to_content_stream (cairo_pdf_surface_t *surface, - cairo_pdf_resource_t group) -{ - cairo_pdf_group_element_t elem; - - memset (&elem, 0, sizeof elem); - elem.type = ELEM_GROUP; - elem.group = group; - - return _cairo_array_append (surface->current_group, &elem); -} - -static void -_cairo_pdf_surface_pause_content_stream (cairo_pdf_surface_t *surface) -{ - assert (surface->pdf_stream.active == FALSE); - - if (surface->content_stream.active == FALSE) - return; - - surface->output = surface->content_stream.old_output; - surface->content_stream.active = FALSE; -} - -static void -_cairo_pdf_surface_resume_content_stream (cairo_pdf_surface_t *surface) -{ - assert (surface->pdf_stream.active == FALSE); - - if (surface->content_stream.active == TRUE) - return; - - surface->output = surface->content_stream.stream; - surface->current_resources = &surface->content_stream.resources; - surface->content_stream.active = TRUE; -} - -static cairo_status_t -_cairo_pdf_surface_stop_content_stream (cairo_pdf_surface_t *surface) -{ - cairo_pdf_resource_t group; - cairo_status_t status; - - assert (surface->pdf_stream.active == FALSE); - assert (surface->content_stream.active == TRUE); + surface->content_resources = _cairo_pdf_surface_new_object (surface); + if (surface->content_resources.id == 0) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - if (surface->compress_content) { - status = _cairo_output_stream_destroy (surface->content_stream.stream); + if (is_form) { + status = + _cairo_pdf_surface_open_stream (surface, + NULL, + surface->compress_content, + " /Type /XObject\r\n" + " /Subtype /Form\r\n" + " /BBox [ 0 0 %f %f ]\r\n" + " /Group <<\r\n" + " /Type /Group\r\n" + " /S /Transparency\r\n" + " /CS /DeviceRGB\r\n" + " >>\r\n" + " /Resources %d 0 R\r\n", + surface->width, + surface->height, + surface->content_resources.id); if (status) return status; - - _cairo_output_stream_printf (surface->content_stream.mem_stream, - "\r\n"); - } - surface->output = surface->content_stream.old_output; - surface->content_stream.active = FALSE; - if (_cairo_memory_stream_length (surface->content_stream.mem_stream) > 0) { - group = _cairo_pdf_surface_write_memory_stream (surface, - surface->content_stream.mem_stream, - &surface->content_stream.resources, - FALSE); - if (group.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - status = _cairo_pdf_surface_add_group_to_content_stream (surface, group); + } else { + status = + _cairo_pdf_surface_open_stream (surface, + NULL, + surface->compress_content, + NULL); if (status) return status; } - surface->content_stream.active = FALSE; - return _cairo_output_stream_close (surface->content_stream.mem_stream); + surface->content = surface->pdf_stream.self; + + _cairo_output_stream_printf (surface->output, "q\r\n"); + + return _cairo_output_stream_get_status (surface->output); } static cairo_status_t -_cairo_pdf_surface_check_content_stream_size (cairo_pdf_surface_t *surface) +_cairo_pdf_surface_close_content_stream (cairo_pdf_surface_t *surface) { cairo_status_t status; - if (surface->content_stream.active == FALSE) - return CAIRO_STATUS_SUCCESS; - - if (_cairo_memory_stream_length (surface->content_stream.mem_stream) > GROUP_STREAM_LIMIT) { - status = _cairo_pdf_surface_stop_content_stream (surface); - if (status) - return status; - - status = _cairo_pdf_surface_start_content_stream (surface); - if (status) - return status; - } + assert (surface->pdf_stream.active == TRUE); + assert (surface->group_stream.active == FALSE); - return CAIRO_STATUS_SUCCESS; -} + _cairo_output_stream_printf (surface->output, "Q\r\n"); + status = _cairo_pdf_surface_close_stream (surface); + if (status) + return status; -static void -_cairo_pdf_group_element_array_finish (cairo_array_t *array) -{ - int i, len; - cairo_pdf_group_element_t *elem; + _cairo_pdf_surface_update_object (surface, surface->content_resources); + _cairo_output_stream_printf (surface->output, + "%d 0 obj\r\n", + surface->content_resources.id); + _cairo_pdf_surface_emit_group_resources (surface, &surface->resources); + _cairo_output_stream_printf (surface->output, + "endobj\r\n"); - len = _cairo_array_num_elements (array); - for (i = 0; i < len; i++) { - elem = _cairo_array_index (array, i); - if (elem->type == ELEM_CLIP && elem->clip_path) - _cairo_path_fixed_destroy (elem->clip_path); - } + return _cairo_output_stream_get_status (surface->output); } static cairo_surface_t * @@ -1184,12 +1141,14 @@ _cairo_pdf_surface_create_similar (void *abstract_surface, static cairo_status_t _cairo_pdf_surface_finish (void *abstract_surface) { - cairo_status_t status, status2; cairo_pdf_surface_t *surface = abstract_surface; long offset; cairo_pdf_resource_t info, catalog; + cairo_status_t status, status2; - status = _cairo_pdf_surface_emit_font_subsets (surface); + status = surface->base.status; + if (status == CAIRO_STATUS_SUCCESS) + status = _cairo_pdf_surface_emit_font_subsets (surface); _cairo_pdf_surface_write_pages (surface); @@ -1219,25 +1178,45 @@ _cairo_pdf_surface_finish (void *abstract_surface) "%%%%EOF\r\n", offset); + _cairo_pdf_operators_fini (&surface->pdf_operators); + + /* close any active streams still open due to fatal errors */ + status2 = _cairo_pdf_surface_close_stream (surface); + if (status == CAIRO_STATUS_SUCCESS) + status = status2; + + if (surface->group_stream.stream != NULL) { + status2 = _cairo_output_stream_destroy (surface->group_stream.stream); + if (status == CAIRO_STATUS_SUCCESS) + status = status2; + } + if (surface->group_stream.mem_stream != NULL) { + status2 = _cairo_output_stream_destroy (surface->group_stream.mem_stream); + if (status == CAIRO_STATUS_SUCCESS) + status = status2; + } + if (surface->pdf_stream.active) + surface->output = surface->pdf_stream.old_output; + if (surface->group_stream.active) + surface->output = surface->group_stream.old_output; + + /* and finish the pdf surface */ status2 = _cairo_output_stream_destroy (surface->output); if (status == CAIRO_STATUS_SUCCESS) status = status2; + _cairo_pdf_surface_clear (surface); + _cairo_pdf_group_resources_fini (&surface->resources); + _cairo_array_fini (&surface->objects); _cairo_array_fini (&surface->pages); _cairo_array_fini (&surface->rgb_linear_functions); _cairo_array_fini (&surface->alpha_linear_functions); + _cairo_array_fini (&surface->patterns); + _cairo_array_fini (&surface->smask_groups); _cairo_array_fini (&surface->fonts); - - _cairo_pdf_group_resources_fini (&surface->group_stream.resources); - _cairo_pdf_group_resources_fini (&surface->content_stream.resources); - - _cairo_pdf_group_element_array_finish (&surface->knockout_group); _cairo_array_fini (&surface->knockout_group); - _cairo_pdf_group_element_array_finish (&surface->content_group); - _cairo_array_fini (&surface->content_group); - if (surface->font_subsets) { _cairo_scaled_font_subsets_destroy (surface->font_subsets); surface->font_subsets = NULL; @@ -1252,12 +1231,12 @@ _cairo_pdf_surface_start_page (void *abstract_surface) cairo_status_t status; cairo_pdf_surface_t *surface = abstract_surface; - surface->current_group = &surface->content_group; - status = _cairo_pdf_surface_start_content_stream (surface); + surface->has_fallback_images = FALSE; + _cairo_pdf_group_resources_clear (&surface->resources); + status = _cairo_pdf_surface_open_content_stream (surface, TRUE); if (status) return status; - return CAIRO_STATUS_SUCCESS; } @@ -1305,11 +1284,13 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, uint8_t a; int src_bit, dst_bit; - /* This is the only image format we support, which simplfies things. */ + /* This is the only image format we support, which simplifies things. */ assert (image->format == CAIRO_FORMAT_ARGB32 || image->format == CAIRO_FORMAT_A8 || image->format == CAIRO_FORMAT_A1 ); + stream_ret->id = 0; + if (image->format == CAIRO_FORMAT_A1) alpha_size = (image->height * image->width + 7)/8; else @@ -1366,10 +1347,8 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, } /* Bail out without emitting smask if it's all opaque. */ - if (opaque) { - stream_ret->id = 0; + if (opaque) goto CLEANUP_ALPHA; - } alpha_compressed = compress_dup (alpha, alpha_size, &alpha_compressed_size); if (alpha_compressed == NULL) { @@ -1377,21 +1356,22 @@ _cairo_pdf_surface_emit_smask (cairo_pdf_surface_t *surface, goto CLEANUP_ALPHA; } - *stream_ret = _cairo_pdf_surface_open_stream (surface, - FALSE, - " /Type /XObject\r\n" - " /Subtype /Image\r\n" - " /Width %d\r\n" - " /Height %d\r\n" - " /ColorSpace /DeviceGray\r\n" - " /BitsPerComponent %d\r\n" - " /Filter /FlateDecode\r\n", - image->width, image->height, - image->format == CAIRO_FORMAT_A1 ? 1 : 8); - if (stream_ret->id == 0) { - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + status = _cairo_pdf_surface_open_stream (surface, + NULL, + FALSE, + " /Type /XObject\r\n" + " /Subtype /Image\r\n" + " /Width %d\r\n" + " /Height %d\r\n" + " /ColorSpace /DeviceGray\r\n" + " /BitsPerComponent %d\r\n" + " /Filter /FlateDecode\r\n", + image->width, image->height, + image->format == CAIRO_FORMAT_A1 ? 1 : 8); + if (status) goto CLEANUP_ALPHA_COMPRESSED; - } + + *stream_ret = surface->pdf_stream.self; _cairo_output_stream_write (surface->output, alpha_compressed, alpha_compressed_size); _cairo_output_stream_printf (surface->output, "\r\n"); @@ -1503,24 +1483,26 @@ _cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface, " /Filter /FlateDecode\r\n" if (need_smask) - *image_ret = _cairo_pdf_surface_open_stream (surface, - FALSE, - IMAGE_DICTIONARY - " /SMask %d 0 R\r\n", - image->width, image->height, - smask.id); + status = _cairo_pdf_surface_open_stream (surface, + NULL, + FALSE, + IMAGE_DICTIONARY + " /SMask %d 0 R\r\n", + image->width, image->height, + smask.id); else - *image_ret = _cairo_pdf_surface_open_stream (surface, - FALSE, - IMAGE_DICTIONARY, - image->width, image->height); - if (image_ret->id == 0){ - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + status = _cairo_pdf_surface_open_stream (surface, + NULL, + FALSE, + IMAGE_DICTIONARY, + image->width, image->height); + if (status) goto CLEANUP_COMPRESSED; - } #undef IMAGE_DICTIONARY + *image_ret = surface->pdf_stream.self; + _cairo_output_stream_write (surface->output, compressed, compressed_size); _cairo_output_stream_printf (surface->output, "\r\n"); status = _cairo_pdf_surface_close_stream (surface); @@ -1544,10 +1526,10 @@ _cairo_pdf_surface_emit_image_surface (cairo_pdf_surface_t *surface, cairo_surface_attributes_t pat_attr; cairo_image_surface_t *image; void *image_extra; - cairo_status_t status = CAIRO_STATUS_SUCCESS; + cairo_status_t status; - status = _cairo_pattern_acquire_surface ((cairo_pattern_t *)pattern, - (cairo_surface_t *)surface, + status = _cairo_pattern_acquire_surface (&pattern->base, + &surface->base, 0, 0, -1, -1, &pat_surface, &pat_attr); if (status) @@ -1567,7 +1549,7 @@ _cairo_pdf_surface_emit_image_surface (cairo_pdf_surface_t *surface, BAIL: _cairo_surface_release_source_image (pat_surface, image, image_extra); BAIL2: - _cairo_pattern_release_surface ((cairo_pattern_t *)pattern, pat_surface, &pat_attr); + _cairo_pattern_release_surface (&pattern->base, pat_surface, &pat_attr); return status; } @@ -1577,10 +1559,9 @@ _cairo_pdf_surface_emit_meta_surface (cairo_pdf_surface_t *surface, cairo_surface_t *meta_surface, cairo_pdf_resource_t *resource) { - cairo_array_t group; - cairo_array_t *old_group; double old_width, old_height; cairo_matrix_t old_cairo_to_pdf; + cairo_paginated_mode_t old_paginated_mode; cairo_rectangle_int16_t meta_extents; cairo_status_t status; int alpha = 0; @@ -1589,25 +1570,27 @@ _cairo_pdf_surface_emit_meta_surface (cairo_pdf_surface_t *surface, if (status) return status; - _cairo_pdf_surface_resume_content_stream (surface); - status = _cairo_pdf_surface_stop_content_stream (surface); - if (status) - return status; - - _cairo_array_init (&group, sizeof (cairo_pdf_group_element_t)); - old_group = surface->current_group; old_width = surface->width; old_height = surface->height; old_cairo_to_pdf = surface->cairo_to_pdf; - surface->current_group = &group; + old_paginated_mode = surface->paginated_mode; surface->width = meta_extents.width; surface->height = meta_extents.height; + /* Patterns are emitted after fallback images. The paginated mode + * needs to be set to _RENDER while the meta surface is replayed + * back to this surface. + */ + surface->paginated_mode = CAIRO_PAGINATED_MODE_RENDER; cairo_matrix_init (&surface->cairo_to_pdf, 1, 0, 0, -1, 0, surface->height); + _cairo_pdf_operators_set_cairo_to_pdf_matrix (&surface->pdf_operators, + surface->cairo_to_pdf); - status = _cairo_pdf_surface_start_content_stream (surface); + _cairo_pdf_group_resources_clear (&surface->resources); + status = _cairo_pdf_surface_open_content_stream (surface, TRUE); if (status) - goto CLEANUP_GROUP; + return status; + *resource = surface->content; if (cairo_surface_get_content (meta_surface) == CAIRO_CONTENT_COLOR) { status = _cairo_pdf_surface_add_alpha (surface, 1.0, &alpha); if (status) @@ -1620,65 +1603,31 @@ _cairo_pdf_surface_emit_meta_surface (cairo_pdf_surface_t *surface, surface->height); } - status = _cairo_meta_surface_replay (meta_surface, &surface->base); + status = _cairo_meta_surface_replay_region (meta_surface, &surface->base, + CAIRO_META_REGION_NATIVE); + assert (status != CAIRO_INT_STATUS_UNSUPPORTED); if (status) goto CLEANUP_GROUP; - status = _cairo_pdf_surface_stop_content_stream (surface); - if (status) - goto CLEANUP_GROUP; - - status = _cairo_pdf_surface_open_group (surface); - if (status) - goto CLEANUP_GROUP; - - status = _cairo_pdf_surface_write_group_list (surface, &group); - if (status) - goto CLEANUP_GROUP; - - status = _cairo_pdf_surface_close_group (surface, resource); - if (status) - goto CLEANUP_GROUP; + status = _cairo_pdf_surface_close_content_stream (surface); CLEANUP_GROUP: - surface->current_group = old_group; surface->width = old_width; surface->height = old_height; + surface->paginated_mode = old_paginated_mode; surface->cairo_to_pdf = old_cairo_to_pdf; + _cairo_pdf_operators_set_cairo_to_pdf_matrix (&surface->pdf_operators, + surface->cairo_to_pdf); - _cairo_pdf_group_element_array_finish (&group); - _cairo_array_fini (&group); - if (status) - return status; - - status = _cairo_pdf_surface_start_content_stream (surface); - if (status) - return status; - - _cairo_pdf_surface_pause_content_stream (surface); - - return CAIRO_STATUS_SUCCESS; -} - -static void -_cairo_pdf_surface_emit_solid_pattern (cairo_pdf_surface_t *surface, - cairo_solid_pattern_t *pattern) -{ - surface->emitted_pattern.type = CAIRO_PATTERN_TYPE_SOLID; - surface->emitted_pattern.red = pattern->color.red; - surface->emitted_pattern.green = pattern->color.green; - surface->emitted_pattern.blue = pattern->color.blue; - surface->emitted_pattern.alpha = pattern->color.alpha; - surface->emitted_pattern.smask.id = 0; - surface->emitted_pattern.pattern.id = 0; + return status; } static cairo_status_t -_cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, - cairo_surface_pattern_t *pattern) +_cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, + cairo_pdf_pattern_t *pdf_pattern) { - cairo_pdf_resource_t stream; - cairo_status_t status = CAIRO_STATUS_SUCCESS; + cairo_surface_pattern_t *pattern = (cairo_surface_pattern_t *) pdf_pattern->pattern; + cairo_status_t status; cairo_pdf_resource_t pattern_resource = {0}; /* squelch bogus compiler warning */ cairo_matrix_t cairo_p2d, pdf_p2d; cairo_extend_t extend = cairo_pattern_get_extend (&pattern->base); @@ -1688,8 +1637,6 @@ _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, int pattern_height = 0; /* squelch bogus compiler warning */ int bbox_x, bbox_y; - _cairo_pdf_surface_pause_content_stream (surface); - if (_cairo_surface_is_meta (pattern->surface)) { cairo_surface_t *meta_surface = pattern->surface; cairo_rectangle_int16_t pattern_extents; @@ -1810,12 +1757,14 @@ _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, cairo_matrix_translate (&pdf_p2d, 0.0, pattern_height); cairo_matrix_scale (&pdf_p2d, 1.0, -1.0); - stream = _cairo_pdf_surface_open_stream (surface, + _cairo_pdf_surface_update_object (surface, pdf_pattern->pattern_res); + status = _cairo_pdf_surface_open_stream (surface, + &pdf_pattern->pattern_res, FALSE, + " /PatternType 1\r\n" " /BBox [0 0 %d %d]\r\n" " /XStep %f\r\n" " /YStep %f\r\n" - " /PatternType 1\r\n" " /TilingType 1\r\n" " /PaintType 1\r\n" " /Matrix [ %f %f %f %f %f %f ]\r\n" @@ -1827,8 +1776,8 @@ _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, pdf_p2d.x0, pdf_p2d.y0, pattern_resource.id, pattern_resource.id); - if (stream.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + if (status) + return status; if (_cairo_surface_is_meta (pattern->surface)) { if (extend == CAIRO_EXTEND_REFLECT) { @@ -1861,14 +1810,7 @@ _cairo_pdf_surface_emit_surface_pattern (cairo_pdf_surface_t *surface, if (status) return status; - _cairo_pdf_surface_resume_content_stream (surface); - - surface->emitted_pattern.type = CAIRO_PATTERN_TYPE_SURFACE; - surface->emitted_pattern.smask.id = 0; - surface->emitted_pattern.pattern = stream; - surface->emitted_pattern.alpha = 1.0; - - return CAIRO_STATUS_SUCCESS; + return _cairo_output_stream_get_status (surface->output); } typedef struct _cairo_pdf_color_stop { @@ -1981,7 +1923,7 @@ cairo_pdf_surface_emit_alpha_linear_function (cairo_pdf_surface_t *surface, static cairo_status_t _cairo_pdf_surface_emit_stitched_colorgradient (cairo_pdf_surface_t *surface, - unsigned int n_stops, + unsigned int n_stops, cairo_pdf_color_stop_t *stops, cairo_bool_t is_alpha, cairo_pdf_resource_t *function) @@ -2028,7 +1970,7 @@ _cairo_pdf_surface_emit_stitched_colorgradient (cairo_pdf_surface_t *surface, _cairo_output_stream_printf (surface->output, "%d 0 R ", stops[i].resource.id); _cairo_output_stream_printf (surface->output, - "]\r\n"); + "]\r\n"); _cairo_output_stream_printf (surface->output, " /Bounds [ "); @@ -2036,7 +1978,7 @@ _cairo_pdf_surface_emit_stitched_colorgradient (cairo_pdf_surface_t *surface, _cairo_output_stream_printf (surface->output, "%f ", stops[i].offset); _cairo_output_stream_printf (surface->output, - "]\r\n"); + "]\r\n"); _cairo_output_stream_printf (surface->output, " /Encode [ "); @@ -2044,15 +1986,15 @@ _cairo_pdf_surface_emit_stitched_colorgradient (cairo_pdf_surface_t *surface, _cairo_output_stream_printf (surface->output, "0 1 "); _cairo_output_stream_printf (surface->output, - "]\r\n"); + "]\r\n"); _cairo_output_stream_printf (surface->output, - ">>\r\n" + ">>\r\n" "endobj\r\n"); *function = res; - return CAIRO_STATUS_SUCCESS; + return _cairo_output_stream_get_status (surface->output); } @@ -2145,7 +2087,7 @@ _cairo_pdf_surface_emit_pattern_stops (cairo_pdf_surface_t *surface, goto BAIL; } } else { - /* multiple stops: stitch. XXX possible optimization: regulary spaced + /* multiple stops: stitch. XXX possible optimization: regularly spaced * stops do not require stitching. XXX */ status = _cairo_pdf_surface_emit_stitched_colorgradient (surface, n_stops, @@ -2229,39 +2171,42 @@ _cairo_pdf_surface_emit_repeating_function (cairo_pdf_surface_t *surface, *function = res; - return CAIRO_STATUS_SUCCESS; + return _cairo_output_stream_get_status (surface->output); } -static cairo_pdf_resource_t +static cairo_status_t cairo_pdf_surface_emit_transparency_group (cairo_pdf_surface_t *surface, - cairo_pdf_resource_t gradient_mask) + cairo_pdf_resource_t gstate_resource, + cairo_pdf_resource_t gradient_mask) { - cairo_pdf_resource_t xobj_resource, smask_resource, gstate_resource; - - xobj_resource = _cairo_pdf_surface_open_stream (surface, - surface->compress_content, - " /Type /XObject\r\n" - " /Subtype /Form\r\n" - " /FormType 1\r\n" - " /BBox [ 0 0 %f %f ]\r\n" - " /Resources\r\n" - " << /ExtGState\r\n" - " << /a0 << /ca 1 /CA 1 >>" - " >>\r\n" - " /Pattern\r\n" - " << /p%d %d 0 R >>\r\n" - " >>\r\n" - " /Group\r\n" - " << /Type /Group\r\n" - " /S /Transparency\r\n" - " /CS /DeviceGray\r\n" - " >>\r\n", - surface->width, - surface->height, - gradient_mask.id, - gradient_mask.id); - if (xobj_resource.id == 0) - return xobj_resource; + cairo_pdf_resource_t smask_resource; + cairo_status_t status; + + status = _cairo_pdf_surface_open_stream (surface, + NULL, + surface->compress_content, + " /Type /XObject\r\n" + " /Subtype /Form\r\n" + " /FormType 1\r\n" + " /BBox [ 0 0 %f %f ]\r\n" + " /Resources\r\n" + " << /ExtGState\r\n" + " << /a0 << /ca 1 /CA 1 >>" + " >>\r\n" + " /Pattern\r\n" + " << /p%d %d 0 R >>\r\n" + " >>\r\n" + " /Group\r\n" + " << /Type /Group\r\n" + " /S /Transparency\r\n" + " /CS /DeviceGray\r\n" + " >>\r\n", + surface->width, + surface->height, + gradient_mask.id, + gradient_mask.id); + if (status) + return status; _cairo_output_stream_printf (surface->output, "q\r\n" @@ -2274,14 +2219,13 @@ cairo_pdf_surface_emit_transparency_group (cairo_pdf_surface_t *surface, surface->width, surface->height); - if (_cairo_pdf_surface_close_stream (surface)) { - smask_resource.id = 0; - return smask_resource; - } + status = _cairo_pdf_surface_close_stream (surface); + if (status) + return status; smask_resource = _cairo_pdf_surface_new_object (surface); if (smask_resource.id == 0) - return smask_resource; + return _cairo_error (CAIRO_STATUS_NO_MEMORY); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" @@ -2291,12 +2235,10 @@ cairo_pdf_surface_emit_transparency_group (cairo_pdf_surface_t *surface, ">>\r\n" "endobj\r\n", smask_resource.id, - xobj_resource.id); + surface->pdf_stream.self.id); /* Create GState which uses the transparency group as an SMask. */ - gstate_resource = _cairo_pdf_surface_new_object (surface); - if (gstate_resource.id == 0) - return gstate_resource; + _cairo_pdf_surface_update_object (surface, gstate_resource); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" @@ -2310,14 +2252,14 @@ cairo_pdf_surface_emit_transparency_group (cairo_pdf_surface_t *surface, gstate_resource.id, smask_resource.id); - return gstate_resource; + return _cairo_output_stream_get_status (surface->output); } static cairo_status_t _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface, - cairo_linear_pattern_t *pattern) + cairo_pdf_pattern_t *pdf_pattern) { - cairo_pdf_resource_t pattern_resource, smask; + cairo_linear_pattern_t *pattern = (cairo_linear_pattern_t *) pdf_pattern->pattern; cairo_pdf_resource_t color_function, alpha_function; double x1, y1, x2, y2; double _x1, _y1, _x2, _y2; @@ -2328,8 +2270,9 @@ _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface, double first_stop, last_stop; int repeat_begin = 0, repeat_end = 1; - extend = cairo_pattern_get_extend (&pattern->base.base); - _cairo_pdf_surface_pause_content_stream (surface); + assert (pattern->base.n_stops != 0); + + extend = cairo_pattern_get_extend (pdf_pattern->pattern); pat_to_pdf = pattern->base.base.matrix; status = cairo_matrix_invert (&pat_to_pdf); @@ -2424,10 +2367,7 @@ _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface, } } - pattern_resource = _cairo_pdf_surface_new_object (surface); - if (pattern_resource.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - + _cairo_pdf_surface_update_object (surface, pdf_pattern->pattern_res); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" "<< /Type /Pattern\r\n" @@ -2439,7 +2379,7 @@ _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface, " /Coords [ %f %f %f %f ]\r\n" " /Domain [ %f %f ]\r\n" " /Function %d 0 R\r\n", - pattern_resource.id, + pdf_pattern->pattern_res.id, pat_to_pdf.xx, pat_to_pdf.yx, pat_to_pdf.xy, pat_to_pdf.yy, pat_to_pdf.x0, pat_to_pdf.y0, @@ -2460,10 +2400,10 @@ _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface, ">>\r\n" "endobj\r\n"); - if (alpha_function.id == 0) { - surface->emitted_pattern.smask.id = 0; - } else { - cairo_pdf_resource_t mask_resource; + if (alpha_function.id != 0) { + cairo_pdf_resource_t mask_resource; + + assert (pdf_pattern->gstate_res.id != 0); /* Create pattern for SMask. */ mask_resource = _cairo_pdf_surface_new_object (surface); @@ -2505,35 +2445,30 @@ _cairo_pdf_surface_emit_linear_pattern (cairo_pdf_surface_t *surface, if (status) return status; - smask = cairo_pdf_surface_emit_transparency_group (surface, mask_resource); - if (smask.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - surface->emitted_pattern.smask = smask; + status = cairo_pdf_surface_emit_transparency_group (surface, + pdf_pattern->gstate_res, + mask_resource); + if (status) + return status; } - surface->emitted_pattern.type = CAIRO_PATTERN_TYPE_LINEAR; - surface->emitted_pattern.pattern = pattern_resource; - surface->emitted_pattern.alpha = 1.0; - - _cairo_pdf_surface_resume_content_stream (surface); - - return status; + return _cairo_output_stream_get_status (surface->output); } static cairo_status_t _cairo_pdf_surface_emit_radial_pattern (cairo_pdf_surface_t *surface, - cairo_radial_pattern_t *pattern) + cairo_pdf_pattern_t *pdf_pattern) { - cairo_pdf_resource_t pattern_resource, smask; cairo_pdf_resource_t color_function, alpha_function; double x1, y1, x2, y2, r1, r2; cairo_matrix_t pat_to_pdf; cairo_extend_t extend; cairo_status_t status; + cairo_radial_pattern_t *pattern = (cairo_radial_pattern_t *) pdf_pattern->pattern; + + assert (pattern->base.n_stops != 0); - extend = cairo_pattern_get_extend (&pattern->base.base); - _cairo_pdf_surface_pause_content_stream (surface); + extend = cairo_pattern_get_extend (pdf_pattern->pattern); status = _cairo_pdf_surface_emit_pattern_stops (surface, &pattern->base, @@ -2555,9 +2490,7 @@ _cairo_pdf_surface_emit_radial_pattern (cairo_pdf_surface_t *surface, y2 = _cairo_fixed_to_double (pattern->c2.y); r2 = _cairo_fixed_to_double (pattern->r2); - pattern_resource = _cairo_pdf_surface_new_object (surface); - if (pattern_resource.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + _cairo_pdf_surface_update_object (surface, pdf_pattern->pattern_res); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" @@ -2569,7 +2502,7 @@ _cairo_pdf_surface_emit_radial_pattern (cairo_pdf_surface_t *surface, " /ColorSpace /DeviceRGB\r\n" " /Coords [ %f %f %f %f %f %f ]\r\n" " /Function %d 0 R\r\n", - pattern_resource.id, + pdf_pattern->pattern_res.id, pat_to_pdf.xx, pat_to_pdf.yx, pat_to_pdf.xy, pat_to_pdf.yy, pat_to_pdf.x0, pat_to_pdf.y0, @@ -2589,12 +2522,12 @@ _cairo_pdf_surface_emit_radial_pattern (cairo_pdf_surface_t *surface, ">>\r\n" "endobj\r\n"); - if (alpha_function.id == 0) { - surface->emitted_pattern.smask.id = 0; - } else { - cairo_pdf_resource_t mask_resource; + if (alpha_function.id != 0) { + cairo_pdf_resource_t mask_resource; - /* Create pattern for SMask. */ + assert (pdf_pattern->gstate_res.id != 0); + + /* Create pattern for SMask. */ mask_resource = _cairo_pdf_surface_new_object (surface); if (mask_resource.id == 0) return _cairo_error (CAIRO_STATUS_NO_MEMORY); @@ -2629,38 +2562,32 @@ _cairo_pdf_surface_emit_radial_pattern (cairo_pdf_surface_t *surface, ">>\r\n" "endobj\r\n"); - smask = cairo_pdf_surface_emit_transparency_group (surface, mask_resource); - if (smask.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - surface->emitted_pattern.smask = smask; + status = cairo_pdf_surface_emit_transparency_group (surface, + pdf_pattern->gstate_res, + mask_resource); + if (status) + return status; } - surface->emitted_pattern.type = CAIRO_PATTERN_TYPE_RADIAL; - surface->emitted_pattern.pattern = pattern_resource; - surface->emitted_pattern.alpha = 1.0; - - _cairo_pdf_surface_resume_content_stream (surface); - - return status; + return _cairo_output_stream_get_status (surface->output); } static cairo_status_t -_cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pattern_t *pattern) +_cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pdf_pattern_t *pdf_pattern) { - switch (pattern->type) { + switch (pdf_pattern->pattern->type) { case CAIRO_PATTERN_TYPE_SOLID: - _cairo_pdf_surface_emit_solid_pattern (surface, (cairo_solid_pattern_t *) pattern); - return CAIRO_STATUS_SUCCESS; + ASSERT_NOT_REACHED; + break; case CAIRO_PATTERN_TYPE_SURFACE: - return _cairo_pdf_surface_emit_surface_pattern (surface, (cairo_surface_pattern_t *) pattern); + return _cairo_pdf_surface_emit_surface_pattern (surface, pdf_pattern); case CAIRO_PATTERN_TYPE_LINEAR: - return _cairo_pdf_surface_emit_linear_pattern (surface, (cairo_linear_pattern_t *) pattern); + return _cairo_pdf_surface_emit_linear_pattern (surface, pdf_pattern); case CAIRO_PATTERN_TYPE_RADIAL: - return _cairo_pdf_surface_emit_radial_pattern (surface, (cairo_radial_pattern_t *) pattern); + return _cairo_pdf_surface_emit_radial_pattern (surface, pdf_pattern); } ASSERT_NOT_REACHED; @@ -2669,23 +2596,27 @@ _cairo_pdf_surface_emit_pattern (cairo_pdf_surface_t *surface, cairo_pattern_t * static cairo_status_t _cairo_pdf_surface_select_pattern (cairo_pdf_surface_t *surface, - cairo_bool_t is_stroke) + cairo_pattern_t *pattern, + cairo_pdf_resource_t pattern_res, + cairo_bool_t is_stroke) { cairo_status_t status; int alpha; - status = _cairo_pdf_surface_add_alpha (surface, surface->emitted_pattern.alpha, &alpha); - if (status) - return status; + if (pattern->type == CAIRO_PATTERN_TYPE_SOLID) { + cairo_solid_pattern_t *solid_pattern = (cairo_solid_pattern_t *) pattern; + + status = _cairo_pdf_surface_add_alpha (surface, solid_pattern->color.alpha, &alpha); + if (status) + return status; - if (surface->emitted_pattern.type == CAIRO_PATTERN_TYPE_SOLID) { _cairo_output_stream_printf (surface->output, - "%f %f %f ", - surface->emitted_pattern.red, - surface->emitted_pattern.green, - surface->emitted_pattern.blue); + "q %f %f %f ", + solid_pattern->color.red, + solid_pattern->color.green, + solid_pattern->color.blue); - if (is_stroke) + if (is_stroke) _cairo_output_stream_printf (surface->output, "RG "); else _cairo_output_stream_printf (surface->output, "rg "); @@ -2694,40 +2625,35 @@ _cairo_pdf_surface_select_pattern (cairo_pdf_surface_t *surface, "/a%d gs\r\n", alpha); } else { - if (is_stroke) { - _cairo_output_stream_printf (surface->output, - "/Pattern CS /p%d SCN ", - surface->emitted_pattern.pattern.id); - } else { - _cairo_output_stream_printf (surface->output, - "/Pattern cs /p%d scn ", - surface->emitted_pattern.pattern.id); - } - status = _cairo_pdf_surface_add_pattern (surface, surface->emitted_pattern.pattern); + status = _cairo_pdf_surface_add_alpha (surface, 1.0, &alpha); if (status) return status; - _cairo_output_stream_printf (surface->output, - "/a%d gs ", - alpha); + status = _cairo_pdf_surface_add_pattern (surface, pattern_res); + if (status) + return status; - _cairo_output_stream_printf (surface->output, "\r\n"); + if (is_stroke) { + _cairo_output_stream_printf (surface->output, + "q /Pattern CS /p%d SCN ", + pattern_res.id); + } else { + _cairo_output_stream_printf (surface->output, + "q /Pattern cs /p%d scn ", + pattern_res.id); + } + _cairo_output_stream_printf (surface->output, + "/a%d gs\r\n", + alpha); } return _cairo_output_stream_get_status (surface->output); } -static cairo_int_status_t -_cairo_pdf_surface_copy_page (void *abstract_surface) +static void +_cairo_pdf_surface_unselect_pattern (cairo_pdf_surface_t *surface) { - cairo_pdf_surface_t *surface = abstract_surface; - cairo_int_status_t status; - - status = _cairo_pdf_surface_stop_content_stream (surface); - if (status) - return status; - - return _cairo_pdf_surface_write_page (surface); + _cairo_output_stream_printf (surface->output, "Q\r\n"); } static cairo_int_status_t @@ -2736,7 +2662,7 @@ _cairo_pdf_surface_show_page (void *abstract_surface) cairo_pdf_surface_t *surface = abstract_surface; cairo_int_status_t status; - status = _cairo_pdf_surface_stop_content_stream (surface); + status = _cairo_pdf_surface_close_content_stream (surface); if (status) return status; @@ -2759,7 +2685,7 @@ _cairo_pdf_surface_get_extents (void *abstract_surface, rectangle->y = 0; /* XXX: The conversion to integers here is pretty bogus, (not to - * mention the aribitray limitation of width to a short(!). We + * mention the arbitrary limitation of width to a short(!). We * may need to come up with a better interface for get_size. */ rectangle->width = (int) ceil (surface->width); @@ -2768,136 +2694,6 @@ _cairo_pdf_surface_get_extents (void *abstract_surface, return CAIRO_STATUS_SUCCESS; } -typedef struct _pdf_path_info { - cairo_output_stream_t *output; - cairo_matrix_t *cairo_to_pdf; - cairo_matrix_t *ctm_inverse; -} pdf_path_info_t; - -static cairo_status_t -_cairo_pdf_path_move_to (void *closure, cairo_point_t *point) -{ - pdf_path_info_t *info = closure; - double x = _cairo_fixed_to_double (point->x); - double y = _cairo_fixed_to_double (point->y); - - if (info->cairo_to_pdf) - cairo_matrix_transform_point (info->cairo_to_pdf, &x, &y); - if (info->ctm_inverse) - cairo_matrix_transform_point (info->ctm_inverse, &x, &y); - - _cairo_output_stream_printf (info->output, - "%f %f m ", x, y); - - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_cairo_pdf_path_line_to (void *closure, cairo_point_t *point) -{ - pdf_path_info_t *info = closure; - double x = _cairo_fixed_to_double (point->x); - double y = _cairo_fixed_to_double (point->y); - - if (info->cairo_to_pdf) - cairo_matrix_transform_point (info->cairo_to_pdf, &x, &y); - if (info->ctm_inverse) - cairo_matrix_transform_point (info->ctm_inverse, &x, &y); - - _cairo_output_stream_printf (info->output, - "%f %f l ", x, y); - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_cairo_pdf_path_curve_to (void *closure, - cairo_point_t *b, - cairo_point_t *c, - cairo_point_t *d) -{ - pdf_path_info_t *info = closure; - double bx = _cairo_fixed_to_double (b->x); - double by = _cairo_fixed_to_double (b->y); - double cx = _cairo_fixed_to_double (c->x); - double cy = _cairo_fixed_to_double (c->y); - double dx = _cairo_fixed_to_double (d->x); - double dy = _cairo_fixed_to_double (d->y); - - if (info->cairo_to_pdf) { - cairo_matrix_transform_point (info->cairo_to_pdf, &bx, &by); - cairo_matrix_transform_point (info->cairo_to_pdf, &cx, &cy); - cairo_matrix_transform_point (info->cairo_to_pdf, &dx, &dy); - } - if (info->ctm_inverse) { - cairo_matrix_transform_point (info->ctm_inverse, &bx, &by); - cairo_matrix_transform_point (info->ctm_inverse, &cx, &cy); - cairo_matrix_transform_point (info->ctm_inverse, &dx, &dy); - } - - _cairo_output_stream_printf (info->output, - "%f %f %f %f %f %f c ", - bx, by, cx, cy, dx, dy); - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_cairo_pdf_path_close_path (void *closure) -{ - pdf_path_info_t *info = closure; - - _cairo_output_stream_printf (info->output, - "h\r\n"); - - return CAIRO_STATUS_SUCCESS; -} - -static cairo_status_t -_cairo_pdf_surface_add_clip (cairo_pdf_surface_t *surface, - cairo_path_fixed_t *path, - cairo_fill_rule_t fill_rule) -{ - cairo_pdf_group_element_t elem; - cairo_status_t status; - - memset (&elem, 0, sizeof elem); - elem.type = ELEM_CLIP; - - if (path == NULL) { - elem.clip_path = NULL; - } else { - elem.clip_path = _cairo_path_fixed_create (); - if (elem.clip_path == NULL) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - status = _cairo_path_fixed_init_copy (elem.clip_path, path); - if (status) { - _cairo_path_fixed_destroy (elem.clip_path); - return status; - } - } - elem.fill_rule = fill_rule; - - status = _cairo_pdf_surface_stop_content_stream (surface); - if (status) { - if (elem.clip_path != NULL) - _cairo_path_fixed_destroy (elem.clip_path); - return status; - } - - status = _cairo_array_append (surface->current_group, &elem); - if (status) { - if (elem.clip_path != NULL) - _cairo_path_fixed_destroy (elem.clip_path); - return status; - } - - status = _cairo_pdf_surface_start_content_stream (surface); - if (status) - return status; - - return CAIRO_STATUS_SUCCESS; -} - static cairo_int_status_t _cairo_pdf_surface_intersect_clip_path (void *abstract_surface, cairo_path_fixed_t *path, @@ -2907,7 +2703,12 @@ _cairo_pdf_surface_intersect_clip_path (void *abstract_surface, { cairo_pdf_surface_t *surface = abstract_surface; - return _cairo_pdf_surface_add_clip (surface, path, fill_rule); + if (path == NULL) { + _cairo_output_stream_printf (surface->output, "Q q\r\n"); + return CAIRO_STATUS_SUCCESS; + } + + return _cairo_pdf_operators_clip (&surface->pdf_operators, path, fill_rule); } static void @@ -2966,7 +2767,7 @@ _cairo_pdf_surface_write_pages (cairo_pdf_surface_t *surface) _cairo_output_stream_printf (surface->output, " /Count %d\r\n", num_pages); - /* TODO: Figure out wich other defaults to be inherited by /Page + /* TODO: Figure out which other defaults to be inherited by /Page * objects. */ _cairo_output_stream_printf (surface->output, ">>\r\n" @@ -2981,24 +2782,33 @@ _cairo_pdf_surface_emit_to_unicode_stream (cairo_pdf_surface_t *surface, { const cairo_scaled_font_backend_t *backend; unsigned int i, num_bfchar; + cairo_int_status_t status; stream->id = 0; if (font_subset->to_unicode == NULL) return CAIRO_INT_STATUS_UNSUPPORTED; - if (_cairo_truetype_create_glyph_to_unicode_map (font_subset) != CAIRO_STATUS_SUCCESS) { + status = _cairo_truetype_create_glyph_to_unicode_map (font_subset); + if (status) { + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + backend = font_subset->scaled_font->backend; if (backend->map_glyphs_to_unicode == NULL) return CAIRO_INT_STATUS_UNSUPPORTED; - backend->map_glyphs_to_unicode (font_subset->scaled_font, font_subset); + status = backend->map_glyphs_to_unicode (font_subset->scaled_font, + font_subset); + if (status) + return status; } - *stream = _cairo_pdf_surface_open_stream (surface, - surface->compress_content, - NULL); - if (stream->id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + status = _cairo_pdf_surface_open_stream (surface, + NULL, + surface->compress_content, + NULL); + if (status) + return status; _cairo_output_stream_printf (surface->output, "/CIDInit /ProcSet findresource begin\r\n" @@ -3055,6 +2865,7 @@ _cairo_pdf_surface_emit_to_unicode_stream (cairo_pdf_surface_t *surface, "end\r\n" "end\r\n"); + *stream = surface->pdf_stream.self; return _cairo_pdf_surface_close_stream (surface); } @@ -3071,6 +2882,12 @@ _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t *surface, unsigned int i; cairo_status_t status; + subset_resource = _cairo_pdf_surface_get_font_resource (surface, + font_subset->font_id, + font_subset->subset_id); + if (subset_resource.id == 0) + return CAIRO_STATUS_SUCCESS; + compressed = compress_dup (subset->data, subset->data_length, &compressed_length); if (compressed == NULL) return _cairo_error (CAIRO_STATUS_NO_MEMORY); @@ -3162,9 +2979,6 @@ _cairo_pdf_surface_emit_cff_font (cairo_pdf_surface_t *surface, ">>\r\n" "endobj\r\n"); - subset_resource = _cairo_pdf_surface_get_font_resource (surface, - font_subset->font_id, - font_subset->subset_id); _cairo_pdf_surface_update_object (surface, subset_resource); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" @@ -3248,6 +3062,11 @@ _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t *surface, char *compressed; unsigned int i; + subset_resource = _cairo_pdf_surface_get_font_resource (surface, + font_subset->font_id, + font_subset->subset_id); + if (subset_resource.id == 0) + return CAIRO_STATUS_SUCCESS; /* We ignore the zero-trailer and set Length3 to 0. */ length = subset->header_length + subset->data_length; @@ -3316,9 +3135,6 @@ _cairo_pdf_surface_emit_type1_font (cairo_pdf_surface_t *surface, subset->descent, stream.id); - subset_resource = _cairo_pdf_surface_get_font_resource (surface, - font_subset->font_id, - font_subset->subset_id); _cairo_pdf_surface_update_object (surface, subset_resource); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" @@ -3367,7 +3183,7 @@ _cairo_pdf_surface_emit_type1_font_subset (cairo_pdf_surface_t *surface, char name[64]; snprintf (name, sizeof name, "CairoFont-%d-%d", - font_subset->font_id, font_subset->subset_id); + font_subset->font_id, font_subset->subset_id); status = _cairo_type1_subset_init (&subset, name, font_subset, FALSE); if (status) return status; @@ -3414,6 +3230,12 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t *surface, char *compressed; unsigned int i; + subset_resource = _cairo_pdf_surface_get_font_resource (surface, + font_subset->font_id, + font_subset->subset_id); + if (subset_resource.id == 0) + return CAIRO_STATUS_SUCCESS; + status = _cairo_truetype_subset_init (&subset, font_subset); if (status) return status; @@ -3520,9 +3342,6 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t *surface, ">>\r\n" "endobj\r\n"); - subset_resource = _cairo_pdf_surface_get_font_resource (surface, - font_subset->font_id, - font_subset->subset_id); _cairo_pdf_surface_update_object (surface, subset_resource); _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" @@ -3555,60 +3374,6 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t *surface, } static cairo_int_status_t -_cairo_pdf_surface_emit_outline_glyph (cairo_pdf_surface_t *surface, - cairo_scaled_font_t *scaled_font, - unsigned long glyph_index, - cairo_pdf_resource_t *glyph_ret) -{ - cairo_scaled_glyph_t *scaled_glyph; - pdf_path_info_t info; - cairo_status_t status = CAIRO_STATUS_SUCCESS; - - status = _cairo_scaled_glyph_lookup (scaled_font, - glyph_index, - CAIRO_SCALED_GLYPH_INFO_METRICS| - CAIRO_SCALED_GLYPH_INFO_PATH, - &scaled_glyph); - if (status) - return status; - - *glyph_ret = _cairo_pdf_surface_open_stream (surface, - surface->compress_content, - NULL); - if (glyph_ret->id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - _cairo_output_stream_printf (surface->output, - "0 0 %f %f %f %f d1\r\n", - _cairo_fixed_to_double (scaled_glyph->bbox.p1.x), - -_cairo_fixed_to_double (scaled_glyph->bbox.p2.y), - _cairo_fixed_to_double (scaled_glyph->bbox.p2.x), - -_cairo_fixed_to_double (scaled_glyph->bbox.p1.y)); - - info.output = surface->output; - info.cairo_to_pdf = &surface->cairo_to_pdf; - info.ctm_inverse = NULL; - - status = _cairo_path_fixed_interpret (scaled_glyph->path, - CAIRO_DIRECTION_FORWARD, - _cairo_pdf_path_move_to, - _cairo_pdf_path_line_to, - _cairo_pdf_path_curve_to, - _cairo_pdf_path_close_path, - &info); - if (status) { - /* ignore status return as we are on the error path... */ - _cairo_pdf_surface_close_stream (surface); - return status; - } - - _cairo_output_stream_printf (surface->output, - " f"); - - return _cairo_pdf_surface_close_stream (surface); -} - -static cairo_int_status_t _cairo_pdf_surface_emit_bitmap_glyph (cairo_pdf_surface_t *surface, cairo_scaled_font_t *scaled_font, unsigned long glyph_index, @@ -3640,19 +3405,23 @@ _cairo_pdf_surface_emit_bitmap_glyph (cairo_pdf_surface_t *surface, image = scaled_glyph->surface; if (image->format != CAIRO_FORMAT_A1) { image = _cairo_image_surface_clone (image, CAIRO_FORMAT_A1); - if (cairo_surface_status (&image->base)) - return cairo_surface_status (&image->base); + status = cairo_surface_status (&image->base); + if (status) + return status; } - *glyph_ret = _cairo_pdf_surface_open_stream (surface, - surface->compress_content, - NULL); - if (glyph_ret->id == 0) { + status = _cairo_pdf_surface_open_stream (surface, + NULL, + surface->compress_content, + NULL); + if (status) { if (image != scaled_glyph->surface) cairo_surface_destroy (&image->base); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + return status; } + *glyph_ret = surface->pdf_stream.self; + _cairo_output_stream_printf (surface->output, "%f 0 %f %f %f %f d1\r\n", x_advance, @@ -3697,37 +3466,11 @@ _cairo_pdf_surface_emit_bitmap_glyph (cairo_pdf_surface_t *surface, return status; } -static void -_cairo_pdf_surface_emit_glyph (cairo_pdf_surface_t *surface, - cairo_scaled_font_t *scaled_font, - unsigned long glyph_index, - cairo_pdf_resource_t *glyph_ret, - cairo_box_t *bbox, - double *width) -{ - cairo_status_t status; - - status = _cairo_pdf_surface_emit_outline_glyph (surface, - scaled_font, - glyph_index, - glyph_ret); - if (status == CAIRO_INT_STATUS_UNSUPPORTED) - status = _cairo_pdf_surface_emit_bitmap_glyph (surface, - scaled_font, - glyph_index, - glyph_ret, - bbox, - width); - - if (status) - status = _cairo_surface_set_error (&surface->base, status); -} - static cairo_status_t _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface, cairo_scaled_font_subset_t *font_subset) { - cairo_status_t status; + cairo_status_t status = CAIRO_STATUS_SUCCESS; cairo_pdf_resource_t *glyphs, encoding, char_procs, subset_resource, to_unicode_stream; cairo_pdf_font_t font; cairo_matrix_t matrix; @@ -3736,23 +3479,35 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface, cairo_box_t font_bbox = {{0,0},{0,0}}; cairo_box_t bbox = {{0,0},{0,0}}; + if (font_subset->num_glyphs == 0) + return CAIRO_STATUS_SUCCESS; + + subset_resource = _cairo_pdf_surface_get_font_resource (surface, + font_subset->font_id, + font_subset->subset_id); + if (subset_resource.id == 0) + return CAIRO_STATUS_SUCCESS; + glyphs = _cairo_malloc_ab (font_subset->num_glyphs, sizeof (cairo_pdf_resource_t)); if (glyphs == NULL) - return _cairo_surface_set_error (&surface->base, CAIRO_STATUS_NO_MEMORY); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); widths = _cairo_malloc_ab (font_subset->num_glyphs, sizeof (double)); if (widths == NULL) { free (glyphs); - return _cairo_surface_set_error (&surface->base, CAIRO_STATUS_NO_MEMORY); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); } for (i = 0; i < font_subset->num_glyphs; i++) { - _cairo_pdf_surface_emit_glyph (surface, - font_subset->scaled_font, - font_subset->glyphs[i], - &glyphs[i], - &bbox, - &widths[i]); + status = _cairo_pdf_surface_emit_bitmap_glyph (surface, + font_subset->scaled_font, + font_subset->glyphs[i], + &glyphs[i], + &bbox, + &widths[i]); + if (status) + break; + if (i == 0) { font_bbox.p1.x = bbox.p1.x; font_bbox.p1.y = bbox.p1.y; @@ -3769,6 +3524,11 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface, font_bbox.p2.y = bbox.p2.y; } } + if (status) { + free (glyphs); + free (widths); + return status; + } encoding = _cairo_pdf_surface_new_object (surface); if (encoding.id == 0) { @@ -3817,9 +3577,6 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface, return status; } - subset_resource = _cairo_pdf_surface_get_font_resource (surface, - font_subset->font_id, - font_subset->subset_id); _cairo_pdf_surface_update_object (surface, subset_resource); matrix = font_subset->scaled_font->scale; status = cairo_matrix_invert (&matrix); @@ -3991,115 +3748,299 @@ _cairo_pdf_surface_write_xref (cairo_pdf_surface_t *surface) } static cairo_status_t -_cairo_pdf_surface_emit_clip (cairo_pdf_surface_t *surface, - cairo_path_fixed_t *path, - cairo_fill_rule_t fill_rule) +_cairo_pdf_surface_write_mask_group (cairo_pdf_surface_t *surface, + cairo_pdf_smask_group_t *group) { - const char *pdf_operator; + cairo_pdf_resource_t mask_group; + cairo_pdf_resource_t smask; + cairo_pdf_smask_group_t *smask_group; + cairo_pdf_resource_t pattern_res, gstate_res; + cairo_status_t status; - if (path == NULL) { - _cairo_output_stream_printf (surface->output, "Q q\r\n"); - return CAIRO_STATUS_SUCCESS; - } + /* Create mask group */ + status = _cairo_pdf_surface_open_group (surface, NULL); + if (status) + return status; + + pattern_res.id = 0; + gstate_res.id = 0; + status = _cairo_pdf_surface_add_pdf_pattern (surface, group->mask, &pattern_res, &gstate_res); + if (status) + return status; + + if (gstate_res.id != 0) { + smask_group = _cairo_pdf_surface_create_smask_group (surface); + if (smask_group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - if (! path->has_current_point) { - /* construct an empty path */ - _cairo_output_stream_printf (surface->output, "0 0 m "); + smask_group->operation = PDF_PAINT; + smask_group->source = cairo_pattern_reference (group->mask); + smask_group->source_res = pattern_res; + status = _cairo_pdf_surface_add_smask_group (surface, smask_group); + if (status) { + _cairo_pdf_smask_group_destroy (smask_group); + return status; + } + + status = _cairo_pdf_surface_add_smask (surface, gstate_res); + if (status) + return status; + + status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res); + if (status) + return status; + + _cairo_output_stream_printf (surface->output, + "q /s%d gs /x%d Do Q\r\n", + gstate_res.id, + smask_group->group_res.id); } else { - pdf_path_info_t info; - cairo_status_t status; - - info.output = surface->output; - info.cairo_to_pdf = &surface->cairo_to_pdf; - info.ctm_inverse = NULL; - - status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, - _cairo_pdf_path_move_to, - _cairo_pdf_path_line_to, - _cairo_pdf_path_curve_to, - _cairo_pdf_path_close_path, - &info); + status = _cairo_pdf_surface_select_pattern (surface, group->mask, pattern_res, FALSE); if (status) return status; + + _cairo_output_stream_printf (surface->output, + "0 0 %f %f re f\r\n", + surface->width, surface->height); + + _cairo_pdf_surface_unselect_pattern (surface); } - switch (fill_rule) { - case CAIRO_FILL_RULE_WINDING: - pdf_operator = "W"; - break; - case CAIRO_FILL_RULE_EVEN_ODD: - pdf_operator = "W*"; - break; - default: - ASSERT_NOT_REACHED; + status = _cairo_pdf_surface_close_group (surface, &mask_group); + if (status) + return status; + + /* Create source group */ + status = _cairo_pdf_surface_open_group (surface, &group->source_res); + if (status) + return status; + + pattern_res.id = 0; + gstate_res.id = 0; + status = _cairo_pdf_surface_add_pdf_pattern (surface, group->source, &pattern_res, &gstate_res); + if (status) + return status; + + if (gstate_res.id != 0) { + smask_group = _cairo_pdf_surface_create_smask_group (surface); + if (smask_group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + + smask_group->operation = PDF_PAINT; + smask_group->source = cairo_pattern_reference (group->source); + smask_group->source_res = pattern_res; + status = _cairo_pdf_surface_add_smask_group (surface, smask_group); + if (status) { + _cairo_pdf_smask_group_destroy (smask_group); + return status; + } + + status = _cairo_pdf_surface_add_smask (surface, gstate_res); + if (status) + return status; + + status = _cairo_pdf_surface_add_xobject (surface, smask_group->group_res); + if (status) + return status; + + _cairo_output_stream_printf (surface->output, + "q /s%d gs /x%d Do Q\r\n", + gstate_res.id, + smask_group->group_res.id); + } else { + status = _cairo_pdf_surface_select_pattern (surface, group->source, pattern_res, FALSE); + if (status) + return status; + + _cairo_output_stream_printf (surface->output, + "0 0 %f %f re f\r\n", + surface->width, surface->height); + + _cairo_pdf_surface_unselect_pattern (surface); } + status = _cairo_pdf_surface_close_group (surface, NULL); + if (status) + return status; + + /* Create an smask based on the alpha component of mask_group */ + smask = _cairo_pdf_surface_new_object (surface); + if (smask.id == 0) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + + _cairo_output_stream_printf (surface->output, + "%d 0 obj\r\n" + "<< /Type /Mask\r\n" + " /S /Alpha\r\n" + " /G %d 0 R\r\n" + ">>\r\n" + "endobj\r\n", + smask.id, + mask_group.id); + + /* Create a GState that uses the smask */ + _cairo_pdf_surface_update_object (surface, group->group_res); _cairo_output_stream_printf (surface->output, - "%s n\r\n", - pdf_operator); + "%d 0 obj\r\n" + "<< /Type /ExtGState\r\n" + " /SMask %d 0 R\r\n" + " /ca 1\r\n" + " /CA 1\r\n" + " /AIS false\r\n" + ">>\r\n" + "endobj\r\n", + group->group_res.id, + smask.id); - return CAIRO_STATUS_SUCCESS; + return _cairo_output_stream_get_status (surface->output); } static cairo_status_t -_cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface) +_cairo_pdf_surface_write_smask_group (cairo_pdf_surface_t *surface, + cairo_pdf_smask_group_t *group) { cairo_status_t status; - cairo_pdf_resource_t page; - cairo_pdf_resource_t content_group, knockout_group, page_content; - cairo_bool_t has_fallback_images = FALSE; - if (_cairo_array_num_elements (&surface->knockout_group) > 0) - has_fallback_images = TRUE; + /* _mask is a special case that requires two groups - source + * and mask as well as a smask and gstate dictionary */ + if (group->operation == PDF_MASK) + return _cairo_pdf_surface_write_mask_group (surface, group); - status = _cairo_pdf_surface_open_group (surface); + status = _cairo_pdf_surface_open_group (surface, &group->group_res); if (status) return status; - status = _cairo_pdf_surface_write_group_list (surface, &surface->content_group); + status = _cairo_pdf_surface_select_pattern (surface, + group->source, + group->source_res, + group->operation == PDF_STROKE); if (status) return status; - status = _cairo_pdf_surface_close_group (surface, &content_group); + switch (group->operation) { + case PDF_PAINT: + _cairo_output_stream_printf (surface->output, + "0 0 %f %f re f\r\n", + surface->width, surface->height); + break; + case PDF_MASK: + ASSERT_NOT_REACHED; + break; + case PDF_FILL: + status = _cairo_pdf_operators_fill (&surface->pdf_operators, + &group->path, + group->fill_rule); + break; + case PDF_STROKE: + status = _cairo_pdf_operator_stroke (&surface->pdf_operators, + &group->path, + group->style, + &group->ctm, + &group->ctm_inverse); + break; + case PDF_SHOW_GLYPHS: + status = _cairo_pdf_operators_show_glyphs (&surface->pdf_operators, + group->glyphs, + group->num_glyphs, + group->scaled_font); + break; + } if (status) return status; - if (has_fallback_images) { - status = _cairo_pdf_surface_open_knockout_group (surface, &content_group); + _cairo_pdf_surface_unselect_pattern (surface); + + return _cairo_pdf_surface_close_group (surface, NULL); +} + +static cairo_status_t +_cairo_pdf_surface_write_patterns_and_smask_groups (cairo_pdf_surface_t *surface) +{ + cairo_pdf_pattern_t pattern; + cairo_pdf_smask_group_t *group; + int pattern_index, group_index; + cairo_status_t status; + + /* Writing out PDF_MASK groups will cause additional smask groups + * to be appended to surface->smask_groups. Additional patterns + * may also be appended to surface->patterns. + * + * Writing meta surface patterns will cause additional patterns + * and groups to be appended. + */ + pattern_index = 0; + group_index = 0; + while ((pattern_index < _cairo_array_num_elements (&surface->patterns)) || + (group_index < _cairo_array_num_elements (&surface->smask_groups))) + { + for (; group_index < _cairo_array_num_elements (&surface->smask_groups); group_index++) { + _cairo_array_copy_element (&surface->smask_groups, group_index, &group); + status = _cairo_pdf_surface_write_smask_group (surface, group); + if (status) + return status; + } + + for (; pattern_index < _cairo_array_num_elements (&surface->patterns); pattern_index++) { + _cairo_array_copy_element (&surface->patterns, pattern_index, &pattern); + status = _cairo_pdf_surface_emit_pattern (surface, &pattern); + if (status) + return status; + } + } + + return CAIRO_STATUS_SUCCESS; +} + +static cairo_status_t +_cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface) +{ + cairo_pdf_resource_t page, knockout, res; + cairo_status_t status; + int i, len; + + _cairo_pdf_group_resources_clear (&surface->resources); + if (surface->has_fallback_images) { + status = _cairo_pdf_surface_open_knockout_group (surface); + if (status) + return status; + + len = _cairo_array_num_elements (&surface->knockout_group); + for (i = 0; i < len; i++) { + _cairo_array_copy_element (&surface->knockout_group, i, &res); + _cairo_output_stream_printf (surface->output, + "/x%d Do\r\n", + res.id); + status = _cairo_pdf_surface_add_xobject (surface, res); + if (status) + return status; + } + _cairo_output_stream_printf (surface->output, + "/x%d Do\r\n", + surface->content.id); + status = _cairo_pdf_surface_add_xobject (surface, surface->content); if (status) return status; - status = _cairo_pdf_surface_write_group_list (surface, &surface->knockout_group); + status = _cairo_pdf_surface_close_group (surface, &knockout); if (status) return status; - status = _cairo_pdf_surface_close_group (surface, &knockout_group); + _cairo_pdf_group_resources_clear (&surface->resources); + status = _cairo_pdf_surface_open_content_stream (surface, FALSE); if (status) return status; - } - page_content = _cairo_pdf_surface_open_stream (surface, - FALSE, - " /Type /XObject\r\n" - " /Subtype /Form\r\n" - " /BBox [ 0 0 %f %f ]\r\n" - " /Group <<\r\n" - " /Type /Group\r\n" - " /S /Transparency\r\n" - " /CS /DeviceRGB\r\n" - " >>\r\n", - surface->width, - surface->height); - if (page_content.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); + _cairo_output_stream_printf (surface->output, + "/x%d Do\r\n", + knockout.id); + status = _cairo_pdf_surface_add_xobject (surface, knockout); + if (status) + return status; - _cairo_output_stream_printf (surface->output, - "/x%d Do\r\n", - has_fallback_images ? knockout_group.id : content_group.id); - status = _cairo_pdf_surface_close_stream (surface); - if (status) - return status; + status = _cairo_pdf_surface_close_content_stream (surface); + if (status) + return status; + } page = _cairo_pdf_surface_new_object (surface); if (page.id == 0) @@ -4110,29 +4051,30 @@ _cairo_pdf_surface_write_page (cairo_pdf_surface_t *surface) "<< /Type /Page\r\n" " /Parent %d 0 R\r\n" " /MediaBox [ 0 0 %f %f ]\r\n" - " /Contents [ %d 0 R ]\r\n" + " /Contents %d 0 R\r\n" " /Group <<\r\n" " /Type /Group\r\n" " /S /Transparency\r\n" " /CS /DeviceRGB\r\n" " >>\r\n" - " /Resources <<\r\n" - " /XObject << /x%d %d 0 R >>\r\n" - " >>\r\n" + " /Resources %d 0 R\r\n" ">>\r\n" "endobj\r\n", page.id, surface->pages_resource.id, surface->width, surface->height, - page_content.id, - has_fallback_images ? knockout_group.id : content_group.id, - has_fallback_images ? knockout_group.id : content_group.id); + surface->content.id, + surface->content_resources.id); status = _cairo_array_append (&surface->pages, &page); if (status) return status; + status = _cairo_pdf_surface_write_patterns_and_smask_groups (surface); + if (status) + return status; + return CAIRO_STATUS_SUCCESS; } @@ -4233,20 +4175,22 @@ _cairo_pdf_surface_analyze_operation (cairo_pdf_surface_t *surface, if (! _pattern_supported (pattern)) return CAIRO_INT_STATUS_UNSUPPORTED; - if (op == CAIRO_OPERATOR_OVER) { + if (op == CAIRO_OPERATOR_OVER || op == CAIRO_OPERATOR_SOURCE) { if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE) { cairo_surface_pattern_t *surface_pattern = (cairo_surface_pattern_t *) pattern; if ( _cairo_surface_is_meta (surface_pattern->surface)) - return CAIRO_INT_STATUS_ANALYZE_META_SURFACE_PATTERN; + return CAIRO_INT_STATUS_ANALYZE_META_SURFACE_PATTERN; } - return CAIRO_STATUS_SUCCESS; } - /* The SOURCE operator is only supported for the fallback images. */ - if (op == CAIRO_OPERATOR_SOURCE && - surface->paginated_mode == CAIRO_PAGINATED_MODE_RENDER) + if (op == CAIRO_OPERATOR_OVER) return CAIRO_STATUS_SUCCESS; + /* The SOURCE operator is only if there is nothing painted + * underneath. */ + if (op == CAIRO_OPERATOR_SOURCE) + return CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY; + return CAIRO_INT_STATUS_UNSUPPORTED; } @@ -4262,28 +4206,21 @@ _cairo_pdf_surface_operation_supported (cairo_pdf_surface_t *surface, } static cairo_int_status_t -_cairo_pdf_surface_set_operator (cairo_pdf_surface_t *surface, - cairo_operator_t op) +_cairo_pdf_surface_start_fallback (cairo_pdf_surface_t *surface) { cairo_status_t status; - if (op == CAIRO_OPERATOR_OVER) - return CAIRO_STATUS_SUCCESS; - - if (op == CAIRO_OPERATOR_SOURCE) { - surface->current_group = &surface->knockout_group; - status = _cairo_pdf_surface_stop_content_stream (surface); - if (status) - return status; - - status = _cairo_pdf_surface_start_content_stream (surface); - if (status) - return status; + status = _cairo_pdf_surface_close_content_stream (surface); + if (status) + return status; - return CAIRO_STATUS_SUCCESS; - } + status = _cairo_array_append (&surface->knockout_group, &surface->content); + if (status) + return status; - return CAIRO_INT_STATUS_UNSUPPORTED; + surface->has_fallback_images = TRUE; + _cairo_pdf_group_resources_clear (&surface->resources); + return _cairo_pdf_surface_open_content_stream (surface, TRUE); } static cairo_int_status_t @@ -4292,64 +4229,67 @@ _cairo_pdf_surface_paint (void *abstract_surface, cairo_pattern_t *source) { cairo_pdf_surface_t *surface = abstract_surface; - cairo_pdf_resource_t smask_group = {0}; /* squelch bogus compiler warning */ cairo_status_t status; + cairo_pdf_smask_group_t *group; + cairo_pdf_resource_t pattern_res, gstate_res; - if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) + if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { return _cairo_pdf_surface_analyze_operation (surface, op, source); + } else if (surface->paginated_mode == CAIRO_PAGINATED_MODE_FALLBACK) { + status = _cairo_pdf_surface_start_fallback (surface); + if (status) + return status; + } assert (_cairo_pdf_surface_operation_supported (surface, op, source)); - status = _cairo_pdf_surface_emit_pattern (surface, source); + pattern_res.id = 0; + gstate_res.id = 0; + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, &pattern_res, &gstate_res); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; if (status) return status; - status = _cairo_pdf_surface_set_operator (surface, op); - if (status) - return status; + if (gstate_res.id != 0) { + group = _cairo_pdf_surface_create_smask_group (surface); + if (group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - if (surface->emitted_pattern.smask.id != 0) { - _cairo_pdf_surface_pause_content_stream (surface); - status = _cairo_pdf_surface_open_group (surface); - if (status) + group->operation = PDF_PAINT; + group->source = cairo_pattern_reference (source); + group->source_res = pattern_res; + status = _cairo_pdf_surface_add_smask_group (surface, group); + if (status) { + _cairo_pdf_smask_group_destroy (group); return status; - } else { - _cairo_output_stream_printf (surface->output, "q "); - } - - status = _cairo_pdf_surface_select_pattern (surface, FALSE); - if (status) - return status; + } - _cairo_output_stream_printf (surface->output, - "0 0 %f %f re f\r\n", - surface->width, surface->height); + status = _cairo_pdf_surface_add_smask (surface, gstate_res); + if (status) + return status; - if (surface->emitted_pattern.smask.id != 0) { - status = _cairo_pdf_surface_close_group (surface, &smask_group); + status = _cairo_pdf_surface_add_xobject (surface, group->group_res); if (status) return status; - _cairo_pdf_surface_resume_content_stream (surface); _cairo_output_stream_printf (surface->output, "q /s%d gs /x%d Do Q\r\n", - surface->emitted_pattern.smask, - smask_group.id); - status = _cairo_pdf_surface_add_smask (surface, surface->emitted_pattern.smask); - if (status) - return status; - status = _cairo_pdf_surface_add_xobject (surface, smask_group); + gstate_res.id, + group->group_res.id); + } else { + status = _cairo_pdf_surface_select_pattern (surface, source, pattern_res, FALSE); if (status) return status; - } else { - _cairo_output_stream_printf (surface->output, "Q\r\n"); - } - status = _cairo_output_stream_get_status (surface->output); - if (status) - return status; + _cairo_output_stream_printf (surface->output, + "0 0 %f %f re f\r\n", + surface->width, surface->height); - return _cairo_pdf_surface_check_content_stream_size (surface); + _cairo_pdf_surface_unselect_pattern (surface); + } + + return _cairo_output_stream_get_status (surface->output); } static cairo_int_status_t @@ -4359,11 +4299,7 @@ _cairo_pdf_surface_mask (void *abstract_surface, cairo_pattern_t *mask) { cairo_pdf_surface_t *surface = abstract_surface; - cairo_pdf_resource_t mask_group; - cairo_pdf_resource_t group = {0}; /* squelch bogus compiler warning */ - cairo_pdf_resource_t source_group; - cairo_pdf_resource_t smask; - cairo_pdf_resource_t gstate; + cairo_pdf_smask_group_t *group; cairo_status_t status, status2; if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { @@ -4377,213 +4313,46 @@ _cairo_pdf_surface_mask (void *abstract_surface, return status2; return status; + } else if (surface->paginated_mode == CAIRO_PAGINATED_MODE_FALLBACK) { + status = _cairo_pdf_surface_start_fallback (surface); + if (status) + return status; } assert (_cairo_pdf_surface_operation_supported (surface, op, source)); assert (_cairo_pdf_surface_operation_supported (surface, op, mask)); - status = _cairo_pdf_surface_set_operator (surface, op); - if (status) - return status; - - /* Create mask group */ - status = _cairo_pdf_surface_emit_pattern (surface, mask); - if (status) - return status; - - _cairo_pdf_surface_pause_content_stream (surface); - - status = _cairo_pdf_surface_open_group (surface); - if (status) - return status; - - status = _cairo_pdf_surface_select_pattern (surface, FALSE); - if (status) - return status; - - _cairo_output_stream_printf (surface->output, - "0 0 %f %f re f\r\n", - surface->width, surface->height); - status = _cairo_pdf_surface_close_group (surface, &mask_group); - if (status) - return status; - - if (surface->emitted_pattern.smask.id != 0) { - group = mask_group; - status = _cairo_pdf_surface_open_group (surface); - if (status) - return status; - - _cairo_output_stream_printf (surface->output, - "/s%d gs /x%d Do\r\n", - surface->emitted_pattern.smask, - group.id); - status = _cairo_pdf_surface_add_smask (surface, surface->emitted_pattern.smask); - if (status) - return status; - status = _cairo_pdf_surface_add_xobject (surface, group); - if (status) - return status; + group = _cairo_pdf_surface_create_smask_group (surface); + if (group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - status = _cairo_pdf_surface_close_group (surface, &mask_group); - if (status) - return status; + group->operation = PDF_MASK; + group->source = cairo_pattern_reference (source); + group->mask = cairo_pattern_reference (mask); + group->source_res = _cairo_pdf_surface_new_object (surface); + if (group->source_res.id == 0) { + _cairo_pdf_smask_group_destroy (group); + return _cairo_error (CAIRO_STATUS_NO_MEMORY); } - /* Create source group */ - status = _cairo_pdf_surface_emit_pattern (surface, source); - if (status) + status = _cairo_pdf_surface_add_smask_group (surface, group); + if (status) { + _cairo_pdf_smask_group_destroy (group); return status; + } - _cairo_pdf_surface_pause_content_stream (surface); - - status = _cairo_pdf_surface_open_group (surface); + status = _cairo_pdf_surface_add_smask (surface, group->group_res); if (status) return status; - status = _cairo_pdf_surface_select_pattern (surface, FALSE); + status = _cairo_pdf_surface_add_xobject (surface, group->source_res); if (status) return status; _cairo_output_stream_printf (surface->output, - "0 0 %f %f re f\r\n", - surface->width, surface->height); - status = _cairo_pdf_surface_close_group (surface, &source_group); - if (status) - return status; - - if (surface->emitted_pattern.smask.id != 0) { - group = source_group; - status = _cairo_pdf_surface_open_group (surface); - if (status) - return status; - - _cairo_output_stream_printf (surface->output, - "/s%d gs /x%d Do\r\n", - surface->emitted_pattern.smask, - group.id); - status = _cairo_pdf_surface_add_smask (surface, surface->emitted_pattern.smask); - if (status) - return status; - status = _cairo_pdf_surface_add_xobject (surface, group); - if (status) - return status; - - status =_cairo_pdf_surface_close_group (surface, &source_group); - if (status) - return status; - } - - /* Create an smask based on the alpha component of mask_group */ - smask = _cairo_pdf_surface_new_object (surface); - if (smask.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - _cairo_output_stream_printf (surface->output, - "%d 0 obj\r\n" - "<< /Type /Mask\r\n" - " /S /Alpha\r\n" - " /G %d 0 R\r\n" - ">>\r\n" - "endobj\r\n", - smask.id, - mask_group.id); - - /* Create a GState that uses the smask */ - gstate = _cairo_pdf_surface_new_object (surface); - if (gstate.id == 0) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - - _cairo_output_stream_printf (surface->output, - "%d 0 obj\r\n" - "<< /Type /ExtGState\r\n" - " /SMask %d 0 R\r\n" - " /ca 1\r\n" - " /CA 1\r\n" - " /AIS false\r\n" - ">>\r\n" - "endobj\r\n", - gstate.id, - smask.id); - - /* Select the GState then draw the source */ - _cairo_pdf_surface_resume_content_stream (surface); - _cairo_output_stream_printf (surface->output, "q /s%d gs /x%d Do Q\r\n", - gstate.id, - source_group.id); - status = _cairo_pdf_surface_add_smask (surface, gstate); - if (status) - return status; - status = _cairo_pdf_surface_add_xobject (surface, source_group); - if (status) - return status; - - return _cairo_output_stream_get_status (surface->output); -} - -static int -_cairo_pdf_line_cap (cairo_line_cap_t cap) -{ - switch (cap) { - case CAIRO_LINE_CAP_BUTT: - return 0; - case CAIRO_LINE_CAP_ROUND: - return 1; - case CAIRO_LINE_CAP_SQUARE: - return 2; - default: - ASSERT_NOT_REACHED; - return 0; - } -} - -static int -_cairo_pdf_line_join (cairo_line_join_t join) -{ - switch (join) { - case CAIRO_LINE_JOIN_MITER: - return 0; - case CAIRO_LINE_JOIN_ROUND: - return 1; - case CAIRO_LINE_JOIN_BEVEL: - return 2; - default: - ASSERT_NOT_REACHED; - return 0; - } -} - -static cairo_status_t -_cairo_pdf_surface_emit_stroke_style (cairo_pdf_surface_t *surface, - cairo_stroke_style_t *style) -{ - _cairo_output_stream_printf (surface->output, - "%f w\r\n", - style->line_width); - - _cairo_output_stream_printf (surface->output, - "%d J\r\n", - _cairo_pdf_line_cap (style->line_cap)); - - _cairo_output_stream_printf (surface->output, - "%d j\r\n", - _cairo_pdf_line_join (style->line_join)); - - if (style->num_dashes) { - unsigned int d; - _cairo_output_stream_printf (surface->output, "["); - for (d = 0; d < style->num_dashes; d++) - _cairo_output_stream_printf (surface->output, " %f", style->dash[d]); - _cairo_output_stream_printf (surface->output, "] %f d\r\n", - style->dash_offset); - } else { - _cairo_output_stream_printf (surface->output, "[] 0.0 d\r\n"); - } - - _cairo_output_stream_printf (surface->output, - "%f M ", - style->miter_limit); + group->group_res.id, + group->source_res.id); return _cairo_output_stream_get_status (surface->output); } @@ -4600,85 +4369,75 @@ _cairo_pdf_surface_stroke (void *abstract_surface, cairo_antialias_t antialias) { cairo_pdf_surface_t *surface = abstract_surface; - cairo_pdf_resource_t smask_group = {0}; /* squelch bogus compiler warning */ - pdf_path_info_t info; cairo_status_t status; - cairo_matrix_t m; + cairo_pdf_smask_group_t *group; + cairo_pdf_resource_t pattern_res, gstate_res; if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) return _cairo_pdf_surface_analyze_operation (surface, op, source); assert (_cairo_pdf_surface_operation_supported (surface, op, source)); - status = _cairo_pdf_surface_emit_pattern (surface, source); - if (status) - return status; - - if (surface->emitted_pattern.smask.id != 0) { - _cairo_pdf_surface_pause_content_stream (surface); - status = _cairo_pdf_surface_open_group (surface); - if (status) - return status; - } else { - _cairo_output_stream_printf (surface->output, "q "); - } - - status = _cairo_pdf_surface_select_pattern (surface, TRUE); + pattern_res.id = 0; + gstate_res.id = 0; + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, &pattern_res, &gstate_res); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; if (status) return status; - status = _cairo_pdf_surface_emit_stroke_style (surface, - style); - if (status) - return status; + if (gstate_res.id != 0) { + group = _cairo_pdf_surface_create_smask_group (surface); + if (group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - info.output = surface->output; - info.cairo_to_pdf = NULL; - info.ctm_inverse = ctm_inverse; + group->operation = PDF_STROKE; + group->source = cairo_pattern_reference (source); + group->source_res = pattern_res; + status = _cairo_path_fixed_init_copy (&group->path, path); + if (status) { + _cairo_pdf_smask_group_destroy (group); + return status; + } - cairo_matrix_multiply (&m, ctm, &surface->cairo_to_pdf); - _cairo_output_stream_printf (surface->output, - "q %f %f %f %f %f %f cm\r\n", - m.xx, m.yx, m.xy, m.yy, - m.x0, m.y0); - - status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, - _cairo_pdf_path_move_to, - _cairo_pdf_path_line_to, - _cairo_pdf_path_curve_to, - _cairo_pdf_path_close_path, - &info); - if (status) - return status; + group->style = style; + group->ctm = *ctm; + group->ctm_inverse = *ctm_inverse; + status = _cairo_pdf_surface_add_smask_group (surface, group); + if (status) { + _cairo_pdf_smask_group_destroy (group); + return status; + } - _cairo_output_stream_printf (surface->output, "S Q\r\n"); + status = _cairo_pdf_surface_add_smask (surface, gstate_res); + if (status) + return status; - if (surface->emitted_pattern.smask.id != 0) { - status = _cairo_pdf_surface_close_group (surface, &smask_group); + status = _cairo_pdf_surface_add_xobject (surface, group->group_res); if (status) return status; - _cairo_pdf_surface_resume_content_stream (surface); _cairo_output_stream_printf (surface->output, "q /s%d gs /x%d Do Q\r\n", - surface->emitted_pattern.smask, - smask_group.id); - status = _cairo_pdf_surface_add_smask (surface, surface->emitted_pattern.smask); + gstate_res.id, + group->group_res.id); + } else { + status = _cairo_pdf_surface_select_pattern (surface, source, pattern_res, TRUE); if (status) return status; - status = _cairo_pdf_surface_add_xobject (surface, smask_group); + + status = _cairo_pdf_operator_stroke (&surface->pdf_operators, + path, + style, + ctm, + ctm_inverse); if (status) return status; - } else { - _cairo_output_stream_printf (surface->output, "Q\r\n"); - } - status = _cairo_output_stream_get_status (surface->output); - if (status) - return status; + _cairo_pdf_surface_unselect_pattern (surface); + } - return _cairo_pdf_surface_check_content_stream_size (surface); + return _cairo_output_stream_get_status (surface->output); } static cairo_int_status_t @@ -4691,94 +4450,78 @@ _cairo_pdf_surface_fill (void *abstract_surface, cairo_antialias_t antialias) { cairo_pdf_surface_t *surface = abstract_surface; - cairo_pdf_resource_t smask_group = {0}; /* squelch bogus compiler warning */ - const char *pdf_operator; cairo_status_t status; - pdf_path_info_t info; + cairo_pdf_smask_group_t *group; + cairo_pdf_resource_t pattern_res, gstate_res; - if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) + if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { return _cairo_pdf_surface_analyze_operation (surface, op, source); + } else if (surface->paginated_mode == CAIRO_PAGINATED_MODE_FALLBACK) { + status = _cairo_pdf_surface_start_fallback (surface); + if (status) + return status; + } assert (_cairo_pdf_surface_operation_supported (surface, op, source)); - status = _cairo_pdf_surface_set_operator (surface, op); + pattern_res.id = 0; + gstate_res.id = 0; + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, &pattern_res, &gstate_res); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; if (status) return status; - status = _cairo_pdf_surface_emit_pattern (surface, source); - if (status) - return status; + if (gstate_res.id != 0) { + group = _cairo_pdf_surface_create_smask_group (surface); + if (group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - if (surface->emitted_pattern.smask.id != 0) { - _cairo_pdf_surface_pause_content_stream (surface); - status = _cairo_pdf_surface_open_group (surface); - if (status) + group->operation = PDF_FILL; + group->source = cairo_pattern_reference (source); + group->source_res = pattern_res; + status = _cairo_path_fixed_init_copy (&group->path, path); + if (status) { + _cairo_pdf_smask_group_destroy (group); return status; - } else { - _cairo_output_stream_printf (surface->output, "q "); - } - - status = _cairo_pdf_surface_select_pattern (surface, FALSE); - if (status) - return status; - - info.output = surface->output; - info.cairo_to_pdf = &surface->cairo_to_pdf; - info.ctm_inverse = NULL; - status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, - _cairo_pdf_path_move_to, - _cairo_pdf_path_line_to, - _cairo_pdf_path_curve_to, - _cairo_pdf_path_close_path, - &info); - if (status) - return status; + } - switch (fill_rule) { - case CAIRO_FILL_RULE_WINDING: - pdf_operator = "f"; - break; - case CAIRO_FILL_RULE_EVEN_ODD: - pdf_operator = "f*"; - break; - default: - ASSERT_NOT_REACHED; - } + group->fill_rule = fill_rule; + status = _cairo_pdf_surface_add_smask_group (surface, group); + if (status) { + _cairo_pdf_smask_group_destroy (group); + return status; + } - _cairo_output_stream_printf (surface->output, - "%s\r\n", - pdf_operator); + status = _cairo_pdf_surface_add_smask (surface, gstate_res); + if (status) + return status; - if (surface->emitted_pattern.smask.id != 0) { - status = _cairo_pdf_surface_close_group (surface, &smask_group); + status = _cairo_pdf_surface_add_xobject (surface, group->group_res); if (status) return status; - _cairo_pdf_surface_resume_content_stream (surface); _cairo_output_stream_printf (surface->output, "q /s%d gs /x%d Do Q\r\n", - surface->emitted_pattern.smask, - smask_group.id); - status = _cairo_pdf_surface_add_smask (surface, surface->emitted_pattern.smask); + gstate_res.id, + group->group_res.id); + } else { + status = _cairo_pdf_surface_select_pattern (surface, source, pattern_res, FALSE); if (status) return status; - status = _cairo_pdf_surface_add_xobject (surface, smask_group); + + status = _cairo_pdf_operators_fill (&surface->pdf_operators, + path, + fill_rule); if (status) return status; - } else { - _cairo_output_stream_printf (surface->output, "Q\r\n"); - } - status = _cairo_output_stream_get_status (surface->output); - if (status) - return status; + _cairo_pdf_surface_unselect_pattern (surface); + } - return _cairo_pdf_surface_check_content_stream_size (surface); + return _cairo_output_stream_get_status (surface->output); } -#define GLYPH_POSITION_TOLERANCE 0.001 - static cairo_int_status_t _cairo_pdf_surface_show_glyphs (void *abstract_surface, cairo_operator_t op, @@ -4788,206 +4531,68 @@ _cairo_pdf_surface_show_glyphs (void *abstract_surface, cairo_scaled_font_t *scaled_font) { cairo_pdf_surface_t *surface = abstract_surface; - cairo_pdf_resource_t smask_group = {0}; /* squelch bogus compiler warning */ - unsigned int current_subset_id = (unsigned int)-1; - cairo_scaled_font_subsets_glyph_t subset_glyph; - cairo_bool_t diagonal, in_TJ; cairo_status_t status; - double Tlm_x = 0, Tlm_y = 0; - double Tm_x = 0, y; - int i, hex_width; + cairo_pdf_smask_group_t *group; + cairo_pdf_resource_t pattern_res, gstate_res; if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) return _cairo_pdf_surface_analyze_operation (surface, op, source); assert (_cairo_pdf_surface_operation_supported (surface, op, source)); - status = _cairo_pdf_surface_emit_pattern (surface, source); - if (status) - return status; - - if (surface->emitted_pattern.smask.id != 0) { - _cairo_pdf_surface_pause_content_stream (surface); - status = _cairo_pdf_surface_open_group (surface); - if (status) - return status; - } else { - _cairo_output_stream_printf (surface->output, "q "); - } - - status = _cairo_pdf_surface_select_pattern (surface, FALSE); + pattern_res.id = 0; + gstate_res.id = 0; + status = _cairo_pdf_surface_add_pdf_pattern (surface, source, &pattern_res, &gstate_res); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; if (status) return status; - _cairo_output_stream_printf (surface->output, - "BT\r\n"); + if (gstate_res.id != 0) { + group = _cairo_pdf_surface_create_smask_group (surface); + if (group == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - if (scaled_font->scale.xy == 0.0 && - scaled_font->scale.yx == 0.0) - diagonal = TRUE; - else - diagonal = FALSE; + group->operation = PDF_SHOW_GLYPHS; + group->source = cairo_pattern_reference (source); + group->source_res = pattern_res; + group->glyphs = glyphs; + group->num_glyphs = num_glyphs; + group->scaled_font = cairo_scaled_font_reference (scaled_font); + status = _cairo_pdf_surface_add_smask_group (surface, group); + if (status) { + _cairo_pdf_smask_group_destroy (group); + return status; + } - in_TJ = FALSE; - for (i = 0; i < num_glyphs; i++) { - status = _cairo_scaled_font_subsets_map_glyph (surface->font_subsets, - scaled_font, glyphs[i].index, - &subset_glyph); + status = _cairo_pdf_surface_add_smask (surface, gstate_res); if (status) - return status; - - if (subset_glyph.is_composite) - hex_width = 4; - else - hex_width = 2; - - if (subset_glyph.is_scaled == FALSE) { - y = 0.0; - cairo_matrix_transform_distance (&scaled_font->scale, - &subset_glyph.x_advance, - &y); - } - - if (subset_glyph.subset_id != current_subset_id) { - if (in_TJ) { - _cairo_output_stream_printf (surface->output, ">] TJ\r\n"); - in_TJ = FALSE; - } - _cairo_output_stream_printf (surface->output, - "/f-%d-%d 1 Tf\r\n", - subset_glyph.font_id, - subset_glyph.subset_id); - status = _cairo_pdf_surface_add_font (surface, - subset_glyph.font_id, - subset_glyph.subset_id); - if (status) - return status; - } - - if (subset_glyph.subset_id != current_subset_id || !diagonal) { - _cairo_output_stream_printf (surface->output, - "%f %f %f %f %f %f Tm\r\n", - scaled_font->scale.xx, - -scaled_font->scale.yx, - -scaled_font->scale.xy, - scaled_font->scale.yy, - glyphs[i].x, - surface->height - glyphs[i].y); - current_subset_id = subset_glyph.subset_id; - Tlm_x = glyphs[i].x; - Tlm_y = glyphs[i].y; - Tm_x = Tlm_x; - } - - if (diagonal) { - if (i < num_glyphs - 1 && - fabs((glyphs[i].y - glyphs[i+1].y)/scaled_font->scale.yy) < GLYPH_POSITION_TOLERANCE && - fabs((glyphs[i].x - glyphs[i+1].x)/scaled_font->scale.xx) < 10) - { - if (!in_TJ) { - if (i != 0) { - _cairo_output_stream_printf (surface->output, - "%f %f Td\r\n", - (glyphs[i].x - Tlm_x)/scaled_font->scale.xx, - -(glyphs[i].y - Tlm_y)/scaled_font->scale.yy); - - Tlm_x = glyphs[i].x; - Tlm_y = glyphs[i].y; - Tm_x = Tlm_x; - } - _cairo_output_stream_printf (surface->output, - "[<%0*x", - hex_width, - subset_glyph.subset_glyph_index); - Tm_x += subset_glyph.x_advance; - in_TJ = TRUE; - } else { - if (fabs((glyphs[i].x - Tm_x)/scaled_font->scale.xx) > GLYPH_POSITION_TOLERANCE) { - double delta = glyphs[i].x - Tm_x; - - _cairo_output_stream_printf (surface->output, - "> %f <", - -1000.0*delta/scaled_font->scale.xx); - Tm_x += delta; - } - _cairo_output_stream_printf (surface->output, - "%0*x", - hex_width, - subset_glyph.subset_glyph_index); - Tm_x += subset_glyph.x_advance; - } - } - else - { - if (in_TJ) { - if (fabs((glyphs[i].x - Tm_x)/scaled_font->scale.xx) > GLYPH_POSITION_TOLERANCE) { - double delta = glyphs[i].x - Tm_x; - - _cairo_output_stream_printf (surface->output, - "> %f <", - -1000.0*delta/scaled_font->scale.xx); - Tm_x += delta; - } - _cairo_output_stream_printf (surface->output, - "%0*x>] TJ\r\n", - hex_width, - subset_glyph.subset_glyph_index); - Tm_x += subset_glyph.x_advance; - in_TJ = FALSE; - } else { - if (i != 0) { - _cairo_output_stream_printf (surface->output, - "%f %f Td ", - (glyphs[i].x - Tlm_x)/scaled_font->scale.xx, - (glyphs[i].y - Tlm_y)/-scaled_font->scale.yy); - Tlm_x = glyphs[i].x; - Tlm_y = glyphs[i].y; - Tm_x = Tlm_x; - } - _cairo_output_stream_printf (surface->output, - "<%0*x> Tj ", - hex_width, - subset_glyph.subset_glyph_index); - Tm_x += subset_glyph.x_advance; - } - } - } else { - _cairo_output_stream_printf (surface->output, - "<%0*x> Tj\r\n", - hex_width, - subset_glyph.subset_glyph_index); - } - } - - _cairo_output_stream_printf (surface->output, - "ET\r\n"); + return status; - if (surface->emitted_pattern.smask.id != 0) { - status = _cairo_pdf_surface_close_group (surface, &smask_group); + status = _cairo_pdf_surface_add_xobject (surface, group->group_res); if (status) return status; - _cairo_pdf_surface_resume_content_stream (surface); - _cairo_output_stream_printf (surface->output, "q /s%d gs /x%d Do Q\r\n", - surface->emitted_pattern.smask, - smask_group.id); - status = _cairo_pdf_surface_add_smask (surface, surface->emitted_pattern.smask); + gstate_res.id, + group->group_res.id); + } else { + status = _cairo_pdf_surface_select_pattern (surface, source, pattern_res, FALSE); if (status) return status; - status = _cairo_pdf_surface_add_xobject (surface, smask_group); + + status = _cairo_pdf_operators_show_glyphs (&surface->pdf_operators, + glyphs, + num_glyphs, + scaled_font); if (status) return status; - } else { - _cairo_output_stream_printf (surface->output, "Q\r\n"); - } - status = _cairo_output_stream_get_status (surface->output); - if (status) - return status; + _cairo_pdf_surface_unselect_pattern (surface); + } - return _cairo_pdf_surface_check_content_stream_size (surface); + return _cairo_output_stream_get_status (surface->output); } static void @@ -5011,7 +4616,7 @@ static const cairo_surface_backend_t cairo_pdf_surface_backend = { NULL, /* composite */ NULL, /* fill_rectangles */ NULL, /* composite_trapezoids */ - _cairo_pdf_surface_copy_page, + NULL, /* _cairo_pdf_surface_copy_page */ _cairo_pdf_surface_show_page, NULL, /* set_clip_region */ _cairo_pdf_surface_intersect_clip_path, diff --git a/src/cairo-png.c b/src/cairo-png.c index 67c87fd..a78da3f 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -275,8 +275,14 @@ cairo_surface_write_to_png (cairo_surface_t *surface, cairo_status_t status; fp = fopen (filename, "wb"); - if (fp == NULL) - return _cairo_error (CAIRO_STATUS_WRITE_ERROR); + if (fp == NULL) { + switch (errno) { + case ENOMEM: + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + default: + return _cairo_error (CAIRO_STATUS_WRITE_ERROR); + } + } status = write_png (surface, stdio_write_func, fp); @@ -376,7 +382,7 @@ static cairo_surface_t * read_png (png_rw_ptr read_func, void *closure) { - cairo_surface_t *surface = (cairo_surface_t*) &_cairo_surface_nil; + cairo_surface_t *surface; png_struct *png = NULL; png_info *info; png_byte *data = NULL; @@ -392,20 +398,23 @@ read_png (png_rw_ptr read_func, &status, png_simple_error_callback, png_simple_warning_callback); - if (png == NULL) + if (png == NULL) { + surface = _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); goto BAIL; + } info = png_create_info_struct (png); - if (info == NULL) + if (info == NULL) { + surface = _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); goto BAIL; + } png_set_read_fn (png, closure, read_func); status = CAIRO_STATUS_SUCCESS; #ifdef PNG_SETJMP_SUPPORTED if (setjmp (png_jmpbuf (png))) { - if (status != CAIRO_STATUS_NO_MEMORY) - surface = (cairo_surface_t*) &_cairo_surface_nil_read_error; + surface = _cairo_surface_create_in_error (status); goto BAIL; } #endif @@ -454,12 +463,16 @@ read_png (png_rw_ptr read_func, pixel_size = 4; data = _cairo_malloc_abc (png_height, png_width, pixel_size); - if (data == NULL) + if (data == NULL) { + surface = _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); goto BAIL; + } row_pointers = _cairo_malloc_ab (png_height, sizeof (char *)); - if (row_pointers == NULL) + if (row_pointers == NULL) { + surface = _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); goto BAIL; + } for (i = 0; i < png_height; i++) row_pointers[i] = &data[i * png_width * pixel_size]; @@ -484,9 +497,6 @@ read_png (png_rw_ptr read_func, if (png) png_destroy_read_struct (&png, &info, NULL); - if (surface->status) - _cairo_error_throw (surface->status); - return surface; } @@ -532,17 +542,19 @@ cairo_image_surface_create_from_png (const char *filename) fp = fopen (filename, "rb"); if (fp == NULL) { + cairo_status_t status; switch (errno) { case ENOMEM: - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + break; case ENOENT: - _cairo_error_throw (CAIRO_STATUS_FILE_NOT_FOUND); - return (cairo_surface_t*) &_cairo_surface_nil_file_not_found; + status = _cairo_error (CAIRO_STATUS_FILE_NOT_FOUND); + break; default: - _cairo_error_throw (CAIRO_STATUS_READ_ERROR); - return (cairo_surface_t*) &_cairo_surface_nil_read_error; + status = _cairo_error (CAIRO_STATUS_READ_ERROR); + break; } + return _cairo_surface_create_in_error (status); } surface = read_png (stdio_read_func, fp); diff --git a/src/cairo-ps-surface-private.h b/src/cairo-ps-surface-private.h index d75f6c7..c42863a 100644 --- a/src/cairo-ps-surface-private.h +++ b/src/cairo-ps-surface-private.h @@ -78,6 +78,7 @@ typedef struct cairo_ps_surface { cairo_array_t *dsc_comment_target; cairo_ps_level_t ps_level; + cairo_ps_level_t ps_level_used; cairo_surface_t *paginated_surface; } cairo_ps_surface_t; diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 8dac043..327243f 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -47,12 +47,18 @@ #include "cairo-meta-surface-private.h" #include "cairo-output-stream-private.h" +#include <stdio.h> #include <ctype.h> #include <time.h> #include <zlib.h> +#include <errno.h> #define DEBUG_PS 0 +#ifndef HAVE_CTIME_R +#define ctime_r(T, BUF) ctime (T) +#endif + typedef enum _cairo_image_transparency { CAIRO_IMAGE_IS_OPAQUE, CAIRO_IMAGE_HAS_BILEVEL_ALPHA, @@ -170,6 +176,9 @@ _word_wrap_stream_create (cairo_output_stream_t *output, int max_column) { word_wrap_stream_t *stream; + if (output->status) + return _cairo_output_stream_create_in_error (output->status); + stream = malloc (sizeof (word_wrap_stream_t)); if (stream == NULL) { _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); @@ -295,7 +304,7 @@ _cairo_ps_surface_emit_path (cairo_ps_surface_t *surface, word_wrap = _word_wrap_stream_create (stream, 79); status = _cairo_output_stream_get_status (word_wrap); if (status) - return status; + return _cairo_output_stream_destroy (word_wrap); path_info.surface = surface; path_info.stream = word_wrap; @@ -318,18 +327,19 @@ _cairo_ps_surface_emit_path (cairo_ps_surface_t *surface, static void _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) { + char ctime_buf[26]; time_t now; char **comments; int i, num_comments; - const char *level; + int level; const char *eps_header = ""; now = time (NULL); - if (surface->ps_level == CAIRO_PS_LEVEL_2) - level = "2"; + if (surface->ps_level_used == CAIRO_PS_LEVEL_2) + level = 2; else - level = "3"; + level = 3; if (surface->eps) eps_header = " EPSF-3.0"; @@ -342,7 +352,7 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) "%%%%BoundingBox: %d %d %d %d\n", eps_header, cairo_version_string (), - ctime (&now), + ctime_r (&now, ctime_buf), surface->num_pages, surface->bbox_x1, surface->bbox_y1, @@ -351,7 +361,7 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) _cairo_output_stream_printf (surface->final_stream, "%%%%DocumentData: Clean7Bit\n" - "%%%%LanguageLevel: %s\n", + "%%%%LanguageLevel: %d\n", level); num_comments = _cairo_array_num_elements (&surface->dsc_header_comments); @@ -375,6 +385,14 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) "/dict_count countdictstack def\n" "/op_count count 1 sub def\n" "userdict begin\n"); + } else { + _cairo_output_stream_printf (surface->final_stream, + "/languagelevel where{pop languagelevel}{1}ifelse %d lt{/Helvetica\n" + "findfont 12 scalefont setfont 50 500 moveto\n" + "(This print job requires a PostScript Language Level %d printer.)show\n" + "showpage quit}if\n", + level, + level); } _cairo_output_stream_printf (surface->final_stream, @@ -569,7 +587,8 @@ _cairo_ps_surface_emit_truetype_font_subset (cairo_ps_surface_t *surface, static cairo_int_status_t _cairo_ps_surface_emit_outline_glyph_data (cairo_ps_surface_t *surface, cairo_scaled_font_t *scaled_font, - unsigned long glyph_index) + unsigned long glyph_index, + cairo_box_t *bbox) { cairo_scaled_glyph_t *scaled_glyph; cairo_status_t status; @@ -582,6 +601,7 @@ _cairo_ps_surface_emit_outline_glyph_data (cairo_ps_surface_t *surface, if (status) return status; + *bbox = scaled_glyph->bbox; _cairo_output_stream_printf (surface->final_stream, "0 0 %f %f %f %f setcachedevice\n", _cairo_fixed_to_double (scaled_glyph->bbox.p1.x), @@ -594,6 +614,8 @@ _cairo_ps_surface_emit_outline_glyph_data (cairo_ps_surface_t *surface, surface->final_stream, scaled_glyph->path, CAIRO_LINE_CAP_ROUND); + if (status) + return status; _cairo_output_stream_printf (surface->final_stream, "F\n"); @@ -604,7 +626,8 @@ _cairo_ps_surface_emit_outline_glyph_data (cairo_ps_surface_t *surface, static cairo_int_status_t _cairo_ps_surface_emit_bitmap_glyph_data (cairo_ps_surface_t *surface, cairo_scaled_font_t *scaled_font, - unsigned long glyph_index) + unsigned long glyph_index, + cairo_box_t *bbox) { cairo_scaled_glyph_t *scaled_glyph; cairo_status_t status; @@ -621,6 +644,7 @@ _cairo_ps_surface_emit_bitmap_glyph_data (cairo_ps_surface_t *surface, if (status) return status; + *bbox = scaled_glyph->bbox; x_advance = scaled_glyph->metrics.x_advance; y_advance = scaled_glyph->metrics.y_advance; cairo_matrix_transform_distance (&scaled_font->ctm, &x_advance, &y_advance); @@ -684,7 +708,8 @@ static cairo_status_t _cairo_ps_surface_emit_glyph (cairo_ps_surface_t *surface, cairo_scaled_font_t *scaled_font, unsigned long scaled_font_glyph_index, - unsigned int subset_glyph_index) + unsigned int subset_glyph_index, + cairo_box_t *bbox) { cairo_status_t status = CAIRO_STATUS_SUCCESS; @@ -694,11 +719,13 @@ _cairo_ps_surface_emit_glyph (cairo_ps_surface_t *surface, if (subset_glyph_index != 0) { status = _cairo_ps_surface_emit_outline_glyph_data (surface, scaled_font, - scaled_font_glyph_index); + scaled_font_glyph_index, + bbox); if (status == CAIRO_INT_STATUS_UNSUPPORTED) status = _cairo_ps_surface_emit_bitmap_glyph_data (surface, scaled_font, - scaled_font_glyph_index); + scaled_font_glyph_index, + bbox); } _cairo_output_stream_printf (surface->final_stream, @@ -719,6 +746,8 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface, cairo_status_t status; cairo_matrix_t matrix; unsigned int i; + cairo_box_t font_bbox = {{0,0},{0,0}}; + cairo_box_t bbox = {{0,0},{0,0}}; #if DEBUG_PS _cairo_output_stream_printf (surface->final_stream, @@ -733,7 +762,6 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface, "8 dict begin\n" "/FontType 3 def\n" "/FontMatrix [%f %f %f %f 0 0] def\n" - "/FontBBox [0 0 0 0] def\n" "/Encoding 256 array def\n" "0 1 255 { Encoding exch /.notdef put } for\n", matrix.xx, @@ -758,13 +786,31 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface, for (i = 0; i < font_subset->num_glyphs; i++) { status = _cairo_ps_surface_emit_glyph (surface, font_subset->scaled_font, - font_subset->glyphs[i], i); + font_subset->glyphs[i], i, + &bbox); if (status) return status; + + if (i == 0) { + font_bbox.p1.x = bbox.p1.x; + font_bbox.p1.y = bbox.p1.y; + font_bbox.p2.x = bbox.p2.x; + font_bbox.p2.y = bbox.p2.y; + } else { + if (bbox.p1.x < font_bbox.p1.x) + font_bbox.p1.x = bbox.p1.x; + if (bbox.p1.y < font_bbox.p1.y) + font_bbox.p1.y = bbox.p1.y; + if (bbox.p2.x > font_bbox.p2.x) + font_bbox.p2.x = bbox.p2.x; + if (bbox.p2.y > font_bbox.p2.y) + font_bbox.p2.y = bbox.p2.y; + } } _cairo_output_stream_printf (surface->final_stream, "] def\n" + "/FontBBox [%f %f %f %f] def\n" "/BuildChar {\n" " exch /Glyphs get\n" " exch get exec\n" @@ -772,6 +818,10 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface, "currentdict\n" "end\n" "/CairoFont-%d-%d exch definefont pop\n", + _cairo_fixed_to_double (font_bbox.p1.x), + _cairo_fixed_to_double (font_bbox.p1.y), + _cairo_fixed_to_double (font_bbox.p2.x), + _cairo_fixed_to_double (font_bbox.p2.y), font_subset->font_id, font_subset->subset_id); @@ -852,15 +902,20 @@ BAIL: return status; } -static void +static cairo_status_t _cairo_ps_surface_emit_body (cairo_ps_surface_t *surface) { char buf[4096]; int n; + if (ferror (surface->tmpfile) != 0) + return _cairo_error (CAIRO_STATUS_TEMP_FILE_ERROR); + rewind (surface->tmpfile); while ((n = fread (buf, 1, sizeof (buf), surface->tmpfile)) > 0) _cairo_output_stream_write (surface->final_stream, buf, n); + + return CAIRO_STATUS_SUCCESS; } static void @@ -885,7 +940,7 @@ _cairo_ps_surface_create_for_stream_internal (cairo_output_stream_t *stream, double width, double height) { - cairo_status_t status; + cairo_status_t status, status_ignored; cairo_ps_surface_t *surface; surface = malloc (sizeof (cairo_ps_surface_t)); @@ -900,20 +955,32 @@ _cairo_ps_surface_create_for_stream_internal (cairo_output_stream_t *stream, surface->final_stream = stream; surface->tmpfile = tmpfile (); - if (surface->tmpfile == NULL) + if (surface->tmpfile == NULL) { + switch (errno) { + case ENOMEM: + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + break; + default: + status = _cairo_error (CAIRO_STATUS_TEMP_FILE_ERROR); + break; + } goto CLEANUP_SURFACE; + } surface->stream = _cairo_output_stream_create_for_file (surface->tmpfile); status = _cairo_output_stream_get_status (surface->stream); if (status) - goto CLEANUP_TMPFILE; + goto CLEANUP_OUTPUT_STREAM; surface->font_subsets = _cairo_scaled_font_subsets_create_simple (); - if (! surface->font_subsets) + if (surface->font_subsets == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto CLEANUP_OUTPUT_STREAM; + } surface->eps = FALSE; surface->ps_level = CAIRO_PS_LEVEL_3; + surface->ps_level_used = CAIRO_PS_LEVEL_2; surface->width = width; surface->height = height; surface->paginated_mode = CAIRO_PAGINATED_MODE_ANALYZE; @@ -933,22 +1000,21 @@ _cairo_ps_surface_create_for_stream_internal (cairo_output_stream_t *stream, CAIRO_CONTENT_COLOR_ALPHA, width, height, &cairo_ps_surface_paginated_backend); - if (surface->paginated_surface->status == CAIRO_STATUS_SUCCESS) + status = surface->paginated_surface->status; + if (status == CAIRO_STATUS_SUCCESS) return surface->paginated_surface; _cairo_scaled_font_subsets_destroy (surface->font_subsets); CLEANUP_OUTPUT_STREAM: - status = _cairo_output_stream_destroy (surface->stream); - /* Ignore status---we're already on a failure path. */ - CLEANUP_TMPFILE: + status_ignored = _cairo_output_stream_destroy (surface->stream); fclose (surface->tmpfile); CLEANUP_SURFACE: free (surface); CLEANUP: /* destroy stream on behalf of caller */ - status = _cairo_output_stream_destroy (stream); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + status_ignored = _cairo_output_stream_destroy (stream); + + return _cairo_surface_create_in_error (status); } /** @@ -980,15 +1046,11 @@ cairo_ps_surface_create (const char *filename, double width_in_points, double height_in_points) { - cairo_status_t status; cairo_output_stream_t *stream; stream = _cairo_output_stream_create_for_filename (filename); - status = _cairo_output_stream_get_status (stream); - if (status) - return (status == CAIRO_STATUS_WRITE_ERROR) ? - (cairo_surface_t*) &_cairo_surface_nil_write_error : - (cairo_surface_t*) &_cairo_surface_nil; + if (_cairo_output_stream_get_status (stream)) + return _cairo_surface_create_in_error (_cairo_output_stream_destroy (stream)); return _cairo_ps_surface_create_for_stream_internal (stream, width_in_points, @@ -1026,13 +1088,11 @@ cairo_ps_surface_create_for_stream (cairo_write_func_t write_func, double width_in_points, double height_in_points) { - cairo_status_t status; cairo_output_stream_t *stream; stream = _cairo_output_stream_create (write_func, NULL, closure); - status = _cairo_output_stream_get_status (stream); - if (status) - return (cairo_surface_t*) &_cairo_surface_nil; + if (_cairo_output_stream_get_status (stream)) + return _cairo_surface_create_in_error (_cairo_output_stream_destroy (stream)); return _cairo_ps_surface_create_for_stream_internal (stream, width_in_points, @@ -1458,11 +1518,16 @@ _cairo_ps_surface_finish (void *abstract_surface) _cairo_ps_surface_emit_header (surface); status = _cairo_ps_surface_emit_font_subsets (surface); + if (status) + goto CLEANUP; - _cairo_ps_surface_emit_body (surface); + status = _cairo_ps_surface_emit_body (surface); + if (status) + goto CLEANUP; _cairo_ps_surface_emit_footer (surface); +CLEANUP: status2 = _cairo_output_stream_destroy (surface->stream); if (status == CAIRO_STATUS_SUCCESS) status = status2; @@ -1537,7 +1602,6 @@ static cairo_status_t _analyze_image_transparency (cairo_image_surface_t *image, cairo_image_transparency_t *transparency) { - cairo_status_t status; int x, y; if (image->format == CAIRO_FORMAT_RGB24) { @@ -1569,9 +1633,8 @@ _analyze_image_transparency (cairo_image_surface_t *image, } } } - status = CAIRO_STATUS_SUCCESS; - return status; + return CAIRO_STATUS_SUCCESS; } static cairo_int_status_t @@ -1602,10 +1665,12 @@ _cairo_ps_surface_analyze_surface_pattern_transparency (cairo_ps_surface_t break; case CAIRO_IMAGE_HAS_BILEVEL_ALPHA: - if (surface->ps_level == CAIRO_PS_LEVEL_2) + if (surface->ps_level == CAIRO_PS_LEVEL_2) { status = CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY; - else + } else { + surface->ps_level_used = CAIRO_PS_LEVEL_3; status = CAIRO_STATUS_SUCCESS; + } break; case CAIRO_IMAGE_HAS_ALPHA: @@ -1668,6 +1733,7 @@ _gradient_pattern_supported (cairo_ps_surface_t *surface, if (surface->ps_level == CAIRO_PS_LEVEL_2) return FALSE; + surface->ps_level_used = CAIRO_PS_LEVEL_3; extend = cairo_pattern_get_extend (pattern); if (extend == CAIRO_EXTEND_REPEAT || @@ -1728,19 +1794,16 @@ _cairo_ps_surface_analyze_operation (cairo_ps_surface_t *surface, op == CAIRO_OPERATOR_OVER)) return CAIRO_INT_STATUS_UNSUPPORTED; - if (op == CAIRO_OPERATOR_SOURCE) - return CAIRO_STATUS_SUCCESS; - if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE) { cairo_surface_pattern_t *surface_pattern = (cairo_surface_pattern_t *) pattern; if ( _cairo_surface_is_meta (surface_pattern->surface)) return CAIRO_INT_STATUS_ANALYZE_META_SURFACE_PATTERN; - else - return _cairo_ps_surface_analyze_surface_pattern_transparency (surface, - surface_pattern); } + if (op == CAIRO_OPERATOR_SOURCE) + return CAIRO_STATUS_SUCCESS; + /* CAIRO_OPERATOR_OVER is only supported for opaque patterns. If * the pattern contains transparency, we return * CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY to the analysis @@ -1751,6 +1814,13 @@ _cairo_ps_surface_analyze_operation (cairo_ps_surface_t *surface, * background to convert the pattern to opaque. */ + if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE) { + cairo_surface_pattern_t *surface_pattern = (cairo_surface_pattern_t *) pattern; + + return _cairo_ps_surface_analyze_surface_pattern_transparency (surface, + surface_pattern); + } + if (_cairo_pattern_is_opaque (pattern)) return CAIRO_STATUS_SUCCESS; else @@ -1911,10 +1981,8 @@ _cairo_ps_surface_flatten_image_transparency (cairo_ps_surface_t *surface, opaque = cairo_image_surface_create (CAIRO_FORMAT_RGB24, image->width, image->height); - if (opaque->status) { - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); - return status; - } + if (opaque->status) + return opaque->status; _cairo_pattern_init_for_surface (&pattern.surface, &image->base); @@ -1952,8 +2020,8 @@ fail: static cairo_status_t _cairo_ps_surface_emit_base85_string (cairo_ps_surface_t *surface, - unsigned char *data, - unsigned long length) + unsigned char *data, + unsigned long length) { cairo_output_stream_t *base85_stream, *string_array_stream; cairo_status_t status, status2; @@ -1961,13 +2029,13 @@ _cairo_ps_surface_emit_base85_string (cairo_ps_surface_t *surface, string_array_stream = _string_array_stream_create (surface->stream); status = _cairo_output_stream_get_status (string_array_stream); if (status) - return status; + return _cairo_output_stream_destroy (string_array_stream); base85_stream = _cairo_base85_stream_create (string_array_stream); status = _cairo_output_stream_get_status (base85_stream); if (status) { status2 = _cairo_output_stream_destroy (string_array_stream); - return status; + return _cairo_output_stream_destroy (base85_stream); } _cairo_output_stream_write (base85_stream, data, length); @@ -1984,7 +2052,7 @@ static cairo_status_t _cairo_ps_surface_emit_image (cairo_ps_surface_t *surface, cairo_image_surface_t *image, const char *name, - cairo_operator_t op) + cairo_operator_t op) { cairo_status_t status; unsigned char *rgb, *rgb_compressed; @@ -2010,10 +2078,14 @@ _cairo_ps_surface_emit_image (cairo_ps_surface_t *surface, if (op == CAIRO_OPERATOR_SOURCE || transparency == CAIRO_IMAGE_HAS_ALPHA || (transparency == CAIRO_IMAGE_HAS_BILEVEL_ALPHA && - surface->ps_level == CAIRO_PS_LEVEL_2)) { - _cairo_ps_surface_flatten_image_transparency (surface, - image, - &opaque_image); + surface->ps_level == CAIRO_PS_LEVEL_2)) + { + status = _cairo_ps_surface_flatten_image_transparency (surface, + image, + &opaque_image); + if (status) + return status; + use_mask = FALSE; } else if (transparency == CAIRO_IMAGE_IS_OPAQUE) { opaque_image = image; @@ -2215,7 +2287,7 @@ _cairo_ps_surface_emit_image_surface (cairo_ps_surface_t *surface, cairo_surface_pattern_t *pattern, int *width, int *height, - cairo_operator_t op) + cairo_operator_t op) { cairo_image_surface_t *image; void *image_extra; @@ -2227,7 +2299,7 @@ _cairo_ps_surface_emit_image_surface (cairo_ps_surface_t *surface, if (status) return status; - _cairo_ps_surface_emit_image (surface, image, "CairoPattern", op); + status = _cairo_ps_surface_emit_image (surface, image, "CairoPattern", op); if (status) goto fail; @@ -2270,7 +2342,9 @@ _cairo_ps_surface_emit_meta_surface (cairo_ps_surface_t *surface, surface->height); } - status = _cairo_meta_surface_replay (meta_surface, &surface->base); + status = _cairo_meta_surface_replay_region (meta_surface, &surface->base, + CAIRO_META_REGION_NATIVE); + assert (status != CAIRO_INT_STATUS_UNSUPPORTED); if (status) return status; @@ -2285,11 +2359,11 @@ _cairo_ps_surface_emit_meta_surface (cairo_ps_surface_t *surface, } static void -_cairo_ps_surface_flatten_transparency (cairo_ps_surface_t *surface, - const cairo_color_t *color, - double *red, - double *green, - double *blue) +_cairo_ps_surface_flatten_transparency (cairo_ps_surface_t *surface, + const cairo_color_t *color, + double *red, + double *green, + double *blue) { *red = color->red; *green = color->green; @@ -2331,7 +2405,7 @@ _cairo_ps_surface_emit_solid_pattern (cairo_ps_surface_t *surface, static cairo_status_t _cairo_ps_surface_emit_surface_pattern (cairo_ps_surface_t *surface, cairo_surface_pattern_t *pattern, - cairo_operator_t op) + cairo_operator_t op) { cairo_status_t status; int pattern_width = 0; /* squelch bogus compiler warning */ @@ -2349,9 +2423,13 @@ _cairo_ps_surface_emit_surface_pattern (cairo_ps_surface_t *surface, status = _cairo_ps_surface_emit_meta_surface (surface, meta_surface); + if (status) + return status; + status = _cairo_surface_get_extents (meta_surface, &pattern_extents); if (status) return status; + pattern_width = pattern_extents.width; pattern_height = pattern_extents.height; } else { @@ -2497,7 +2575,7 @@ _cairo_ps_surface_emit_pattern_stops (cairo_ps_surface_t *surface, allstops = _cairo_malloc_ab ((pattern->n_stops + 2), sizeof (cairo_ps_color_stop_t)); if (allstops == NULL) - return CAIRO_STATUS_NO_MEMORY; + return _cairo_error (CAIRO_STATUS_NO_MEMORY); stops = &allstops[1]; n_stops = pattern->n_stops; @@ -2553,6 +2631,9 @@ _cairo_ps_surface_emit_linear_pattern (cairo_ps_surface_t *surface, cairo_status_t status; cairo_matrix_t inverse = pattern->base.base.matrix; + if (pattern->base.n_stops == 0) + return CAIRO_INT_STATUS_NOTHING_TO_DO; + extend = cairo_pattern_get_extend (&pattern->base.base); status = cairo_matrix_invert (&inverse); @@ -2608,6 +2689,9 @@ _cairo_ps_surface_emit_radial_pattern (cairo_ps_surface_t *surface, cairo_status_t status; cairo_matrix_t inverse = pattern->base.base.matrix; + if (pattern->base.n_stops == 0) + return CAIRO_INT_STATUS_NOTHING_TO_DO; + extend = cairo_pattern_get_extend (&pattern->base.base); status = cairo_matrix_invert (&inverse); @@ -2680,11 +2764,17 @@ _cairo_ps_surface_emit_pattern (cairo_ps_surface_t *surface, break; case CAIRO_PATTERN_TYPE_LINEAR: - _cairo_ps_surface_emit_linear_pattern (surface, (cairo_linear_pattern_t *) pattern); + status = _cairo_ps_surface_emit_linear_pattern (surface, + (cairo_linear_pattern_t *) pattern); + if (status) + return status; break; case CAIRO_PATTERN_TYPE_RADIAL: - _cairo_ps_surface_emit_radial_pattern (surface, (cairo_radial_pattern_t *) pattern); + status = _cairo_ps_surface_emit_radial_pattern (surface, + (cairo_radial_pattern_t *) pattern); + if (status) + return status; break; } @@ -2799,6 +2889,9 @@ _cairo_ps_surface_paint (void *abstract_surface, _cairo_rectangle_intersect (&extents, &pattern_extents); status = _cairo_ps_surface_emit_pattern (surface, source, op); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; + if (status) return status; @@ -2942,13 +3035,24 @@ _cairo_ps_surface_stroke (void *abstract_surface, } status = _cairo_ps_surface_emit_pattern (surface, source, op); - if (status) + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; + + if (status) { + if (dash != style->dash) + free (dash); return status; + } _cairo_output_stream_printf (stream, "gsave\n"); status = _cairo_ps_surface_emit_path (surface, stream, path, style->line_cap); + if (status) { + if (dash != style->dash) + free (dash); + return status; + } /* * Switch to user space to set line parameters @@ -2985,7 +3089,8 @@ _cairo_ps_surface_stroke (void *abstract_surface, "stroke\n"); _cairo_output_stream_printf (stream, "grestore\n"); - return status; + + return CAIRO_STATUS_SUCCESS; } static cairo_int_status_t @@ -3013,6 +3118,9 @@ _cairo_ps_surface_fill (void *abstract_surface, #endif status = _cairo_ps_surface_emit_pattern (surface, source, op); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; + if (status) return status; @@ -3082,6 +3190,9 @@ _cairo_ps_surface_show_glyphs (void *abstract_surface, num_glyphs_unsigned = num_glyphs; status = _cairo_ps_surface_emit_pattern (surface, source, op); + if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) + return CAIRO_STATUS_SUCCESS; + if (status) return status; @@ -3095,6 +3206,7 @@ _cairo_ps_surface_show_glyphs (void *abstract_surface, &subset_glyph); if (status) goto fail; + glyph_ids[i].subset_id = subset_glyph.subset_id; glyph_ids[i].glyph_id = subset_glyph.subset_glyph_index; } @@ -3141,9 +3253,10 @@ _cairo_ps_surface_show_glyphs (void *abstract_surface, _cairo_output_stream_printf (surface->stream, "<%02x> S\n", glyph_ids[i].glyph_id); } else { word_wrap = _word_wrap_stream_create (surface->stream, 79); - status = _cairo_output_stream_get_status (word_wrap); - if (status) + if (_cairo_output_stream_get_status (word_wrap)) { + status = _cairo_output_stream_destroy (word_wrap); goto fail; + } _cairo_output_stream_printf (word_wrap, "<"); for (j = i; j < last+1; j++) diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h index 5e46e8d..52a3d7f 100644 --- a/src/cairo-quartz-private.h +++ b/src/cairo-quartz-private.h @@ -72,6 +72,9 @@ _cairo_atsui_scaled_font_get_atsu_style (cairo_scaled_font_t *sfont); ATSUFontID _cairo_atsui_scaled_font_get_atsu_font_id (cairo_scaled_font_t *sfont); + +CGFontRef +_cairo_atsui_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont); #endif /* CAIRO_HAS_ATSUI_FONT */ #endif /* CAIRO_QUARTZ_PRIVATE_H */ diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index b51a85a..3cb6389 100644 --- a/src/cairo-quartz-surface.c +++ b/src/cairo-quartz-surface.c @@ -1,7 +1,7 @@ /* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */ /* cairo - a vector graphics library with display and print output * - * Copyright © 2006, 2007 Mozilla Corporation + * Copyright � 2006, 2007 Mozilla Corporation * * This library is free software; you can redistribute it and/or * modify it either under the terms of the GNU Lesser General Public @@ -378,94 +378,6 @@ CreateGradientFunction (cairo_gradient_pattern_t *gpat) &callbacks); } -static cairo_int_status_t -_cairo_quartz_cairo_gradient_pattern_to_quartz (cairo_pattern_t *abspat, - CGShadingRef *shading) -{ - cairo_matrix_t mat; - double x0, y0; - - if (abspat->type != CAIRO_PATTERN_TYPE_LINEAR && - abspat->type != CAIRO_PATTERN_TYPE_RADIAL) - return CAIRO_INT_STATUS_UNSUPPORTED; - - /* bandaid for mozilla bug 379321, also visible in the - * linear-gradient-reflect test. - */ - if (abspat->extend == CAIRO_EXTEND_REFLECT || - abspat->extend == CAIRO_EXTEND_REPEAT) - return CAIRO_INT_STATUS_UNSUPPORTED; - - /* We can only do this if we have an identity pattern matrix; - * otherwise fall back through to the generic pattern case. - * XXXperf we could optimize this by creating a pattern with the shading; - * but we'd need to know the extents to do that. - * ... but we don't care; we can use the surface extents for it - * XXXtodo - implement gradients with non-identity pattern matrices - */ - cairo_pattern_get_matrix (abspat, &mat); - if (mat.xx != 1.0 || mat.yy != 1.0 || mat.xy != 0.0 || mat.yx != 0.0) - return CAIRO_INT_STATUS_UNSUPPORTED; - - x0 = mat.x0; - y0 = mat.y0; - - if (abspat->type == CAIRO_PATTERN_TYPE_LINEAR) { - cairo_linear_pattern_t *lpat = (cairo_linear_pattern_t*) abspat; - CGPoint start, end; - CGFunctionRef gradFunc; - CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); - bool extend = abspat->extend == CAIRO_EXTEND_PAD; - - start = CGPointMake (_cairo_fixed_to_double (lpat->p1.x) - x0, - _cairo_fixed_to_double (lpat->p1.y) - y0); - end = CGPointMake (_cairo_fixed_to_double (lpat->p2.x) - x0, - _cairo_fixed_to_double (lpat->p2.y) - y0); - - cairo_pattern_reference (abspat); - gradFunc = CreateGradientFunction ((cairo_gradient_pattern_t*) lpat); - *shading = CGShadingCreateAxial (rgb, - start, end, - gradFunc, - extend, extend); - CGColorSpaceRelease(rgb); - CGFunctionRelease(gradFunc); - - return CAIRO_STATUS_SUCCESS; - } - - if (abspat->type == CAIRO_PATTERN_TYPE_RADIAL) { - cairo_radial_pattern_t *rpat = (cairo_radial_pattern_t*) abspat; - CGPoint start, end; - CGFunctionRef gradFunc; - CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); - bool extend = abspat->extend == CAIRO_EXTEND_PAD; - - start = CGPointMake (_cairo_fixed_to_double (rpat->c1.x) - x0, - _cairo_fixed_to_double (rpat->c1.y) - y0); - end = CGPointMake (_cairo_fixed_to_double (rpat->c2.x) - x0, - _cairo_fixed_to_double (rpat->c2.y) - y0); - - cairo_pattern_reference (abspat); - gradFunc = CreateGradientFunction ((cairo_gradient_pattern_t*) rpat); - *shading = CGShadingCreateRadial (rgb, - start, - _cairo_fixed_to_double (rpat->r1), - end, - _cairo_fixed_to_double (rpat->r2), - gradFunc, - extend, extend); - CGColorSpaceRelease(rgb); - CGFunctionRelease(gradFunc); - - return CAIRO_STATUS_SUCCESS; - } - - /* Shouldn't be reached */ - ASSERT_NOT_REACHED; - return CAIRO_STATUS_SUCCESS; -} - /* generic cairo surface -> cairo_quartz_surface_t function */ static cairo_int_status_t _cairo_quartz_surface_to_quartz (cairo_surface_t *target, @@ -707,6 +619,118 @@ typedef enum { } cairo_quartz_action_t; static cairo_quartz_action_t +_cairo_quartz_setup_linear_source (cairo_quartz_surface_t *surface, + cairo_linear_pattern_t *lpat) +{ + cairo_pattern_t *abspat = (cairo_pattern_t *) lpat; + cairo_matrix_t mat; + double x0, y0; + CGPoint start, end; + CGFunctionRef gradFunc; + CGColorSpaceRef rgb; + bool extend = abspat->extend == CAIRO_EXTEND_PAD; + + /* bandaid for mozilla bug 379321, also visible in the + * linear-gradient-reflect test. + */ + if (abspat->extend == CAIRO_EXTEND_REFLECT || + abspat->extend == CAIRO_EXTEND_REPEAT) + return DO_UNSUPPORTED; + + /* We can only do this if we have an identity pattern matrix; + * otherwise fall back through to the generic pattern case. + * XXXperf we could optimize this by creating a pattern with the shading; + * but we'd need to know the extents to do that. + * ... but we don't care; we can use the surface extents for it + * XXXtodo - implement gradients with non-identity pattern matrices + */ + cairo_pattern_get_matrix (abspat, &mat); + if (mat.xx != 1.0 || mat.yy != 1.0 || mat.xy != 0.0 || mat.yx != 0.0) + return DO_UNSUPPORTED; + + if (!lpat->base.n_stops) { + CGContextSetRGBStrokeColor (surface->cgContext, 0., 0., 0., 0.); + CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.); + return DO_SOLID; + } + + x0 = mat.x0; + y0 = mat.y0; + rgb = CGColorSpaceCreateDeviceRGB(); + + start = CGPointMake (_cairo_fixed_to_double (lpat->p1.x) - x0, + _cairo_fixed_to_double (lpat->p1.y) - y0); + end = CGPointMake (_cairo_fixed_to_double (lpat->p2.x) - x0, + _cairo_fixed_to_double (lpat->p2.y) - y0); + + cairo_pattern_reference (abspat); + gradFunc = CreateGradientFunction ((cairo_gradient_pattern_t*) lpat); + surface->sourceShading = CGShadingCreateAxial (rgb, + start, end, + gradFunc, + extend, extend); + CGColorSpaceRelease(rgb); + CGFunctionRelease(gradFunc); + + return DO_SHADING; +} + +static cairo_quartz_action_t +_cairo_quartz_setup_radial_source (cairo_quartz_surface_t *surface, + cairo_radial_pattern_t *rpat) +{ + cairo_pattern_t *abspat = (cairo_pattern_t *)rpat; + cairo_matrix_t mat; + double x0, y0; + CGPoint start, end; + CGFunctionRef gradFunc; + CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); + bool extend = abspat->extend == CAIRO_EXTEND_PAD; + + /* bandaid for mozilla bug 379321, also visible in the + * linear-gradient-reflect test. + */ + if (abspat->extend == CAIRO_EXTEND_REFLECT || + abspat->extend == CAIRO_EXTEND_REPEAT) + return DO_UNSUPPORTED; + + /* XXXtodo - implement gradients with non-identity pattern matrices + */ + cairo_pattern_get_matrix (abspat, &mat); + if (mat.xx != 1.0 || mat.yy != 1.0 || mat.xy != 0.0 || mat.yx != 0.0) + return DO_UNSUPPORTED; + + if (!rpat->base.n_stops) { + CGContextSetRGBStrokeColor (surface->cgContext, 0., 0., 0., 0.); + CGContextSetRGBFillColor (surface->cgContext, 0., 0., 0., 0.); + return DO_SOLID; + } + + x0 = mat.x0; + y0 = mat.y0; + rgb = CGColorSpaceCreateDeviceRGB(); + + start = CGPointMake (_cairo_fixed_to_double (rpat->c1.x) - x0, + _cairo_fixed_to_double (rpat->c1.y) - y0); + end = CGPointMake (_cairo_fixed_to_double (rpat->c2.x) - x0, + _cairo_fixed_to_double (rpat->c2.y) - y0); + + cairo_pattern_reference (abspat); + gradFunc = CreateGradientFunction ((cairo_gradient_pattern_t*) rpat); + surface->sourceShading = CGShadingCreateRadial (rgb, + start, + _cairo_fixed_to_double (rpat->r1), + end, + _cairo_fixed_to_double (rpat->r2), + gradFunc, + extend, extend); + CGColorSpaceRelease(rgb); + CGFunctionRelease(gradFunc); + + return DO_SHADING; +} + +static cairo_quartz_action_t _cairo_quartz_setup_source (cairo_quartz_surface_t *surface, cairo_pattern_t *source) { @@ -727,19 +751,15 @@ _cairo_quartz_setup_source (cairo_quartz_surface_t *surface, solid->color.alpha); return DO_SOLID; - } else if (source->type == CAIRO_PATTERN_TYPE_LINEAR || - source->type == CAIRO_PATTERN_TYPE_RADIAL) + } else if (source->type == CAIRO_PATTERN_TYPE_LINEAR) { - CGShadingRef shading = NULL; - cairo_int_status_t status; + cairo_linear_pattern_t *lpat = (cairo_linear_pattern_t *)source; + return _cairo_quartz_setup_linear_source (surface, lpat); - status = _cairo_quartz_cairo_gradient_pattern_to_quartz (source, &shading); - if (status) - return DO_UNSUPPORTED; + } else if (source->type == CAIRO_PATTERN_TYPE_RADIAL) { + cairo_radial_pattern_t *rpat = (cairo_radial_pattern_t *)source; + return _cairo_quartz_setup_radial_source (surface, rpat); - surface->sourceShading = shading; - - return DO_SHADING; } else if (source->type == CAIRO_PATTERN_TYPE_SURFACE && (source->extend == CAIRO_EXTEND_NONE || (CGContextDrawTiledImage && source->extend == CAIRO_EXTEND_REPEAT))) { @@ -1504,9 +1524,6 @@ _cairo_quartz_surface_show_glyphs (void *abstract_surface, int num_glyphs, cairo_scaled_font_t *scaled_font) { - ATSUFontID fid; - ATSFontRef atsfref; - CGFontRef cgfref; CGAffineTransform cairoTextTransform, textTransform, ctm; // XXXtodo/perf: stack storage for glyphs/sizes #define STATIC_BUF_SIZE 64 @@ -1548,12 +1565,9 @@ _cairo_quartz_surface_show_glyphs (void *abstract_surface, CGContextSetCompositeOperation (surface->cgContext, _cairo_quartz_cairo_operator_to_quartz (op)); - fid = _cairo_atsui_scaled_font_get_atsu_font_id (scaled_font); - atsfref = FMGetATSFontRefFromFont (fid); - cgfref = CGFontCreateWithPlatformFont (&atsfref); - + /* this doesn't addref */ + CGFontRef cgfref = _cairo_atsui_scaled_font_get_cg_font_ref (scaled_font); CGContextSetFont (surface->cgContext, cgfref); - CGFontRelease (cgfref); /* So this should include the size; I don't know if I need to extract the * size from this and call CGContextSetFontSize.. will I get crappy hinting @@ -1851,10 +1865,8 @@ _cairo_quartz_surface_create_internal (CGContextRef cgContext, /* Init the base surface */ surface = malloc(sizeof(cairo_quartz_surface_t)); - if (surface == NULL) { - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return NULL; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); memset(surface, 0, sizeof(cairo_quartz_surface_t)); @@ -1900,7 +1912,7 @@ _cairo_quartz_surface_create_internal (CGContextRef cgContext, * this function is called: * * <informalexample><programlisting> - * GContextTranslateCTM (cgContext, 0.0, height); + * CGContextTranslateCTM (cgContext, 0.0, height); * CGContextScaleCTM (cgContext, 1.0, -1.0); * </programlisting></informalexample> * @@ -1926,10 +1938,10 @@ cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext, surf = _cairo_quartz_surface_create_internal (cgContext, CAIRO_CONTENT_COLOR_ALPHA, width, height); - if (!surf) { + if (surf->base.status) { CGContextRelease (cgContext); // create_internal will have set an error - return (cairo_surface_t*) &_cairo_surface_nil; + return surf; } return (cairo_surface_t *) surf; @@ -1964,10 +1976,8 @@ cairo_quartz_surface_create (cairo_format_t format, int bitsPerComponent; // verify width and height of surface - if (!verify_surface_size(width, height)) { - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (!verify_surface_size(width, height)) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); if (width == 0 || height == 0) { return (cairo_surface_t*) _cairo_quartz_surface_create_internal (NULL, _cairo_content_from_format (format), @@ -1997,18 +2007,15 @@ cairo_quartz_surface_create (cairo_format_t format, * cairo_format_t -- these are 1-bit pixels stored in 32-bit * quantities. */ - _cairo_error (CAIRO_STATUS_INVALID_FORMAT); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); } else { - _cairo_error (CAIRO_STATUS_INVALID_FORMAT); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); } imageData = _cairo_malloc_ab (height, stride); if (!imageData) { CGColorSpaceRelease (cgColorspace); - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } /* zero the memory to match the image surface behaviour */ memset (imageData, 0, height * stride); @@ -2023,9 +2030,8 @@ cairo_quartz_surface_create (cairo_format_t format, CGColorSpaceRelease (cgColorspace); if (!cgc) { - _cairo_error (CAIRO_STATUS_NO_MEMORY); free (imageData); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } /* flip the Y axis */ @@ -2034,11 +2040,11 @@ cairo_quartz_surface_create (cairo_format_t format, surf = _cairo_quartz_surface_create_internal (cgc, _cairo_content_from_format (format), width, height); - if (!surf) { + if (surf->base.status) { CGContextRelease (cgc); free (imageData); // create_internal will have set an error - return (cairo_surface_t*) &_cairo_surface_nil; + return surf; } surf->imageData = imageData; diff --git a/src/cairo-region.c b/src/cairo-region.c index b4b9117..7bf4982 100644 --- a/src/cairo-region.c +++ b/src/cairo-region.c @@ -52,14 +52,12 @@ _cairo_region_init_rect (cairo_region_t *region, rect->width, rect->height); } -#define STACK_BOXES_LEN ((int) (CAIRO_STACK_BUFFER_SIZE / sizeof(pixman_box16_t))) - cairo_int_status_t _cairo_region_init_boxes (cairo_region_t *region, cairo_box_int_t *boxes, int count) { - pixman_box16_t stack_pboxes[STACK_BOXES_LEN]; + pixman_box16_t stack_pboxes[CAIRO_STACK_ARRAY_LENGTH (pixman_box16_t)]; pixman_box16_t *pboxes = stack_pboxes; cairo_int_status_t status = CAIRO_STATUS_SUCCESS; int i; diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c index 35ba53c..82be70c 100644 --- a/src/cairo-scaled-font-subsets.c +++ b/src/cairo-scaled-font-subsets.c @@ -493,10 +493,11 @@ _cairo_scaled_font_subsets_destroy (cairo_scaled_font_subsets_t *subsets) _cairo_hash_table_foreach (subsets->unscaled_sub_fonts, _cairo_sub_font_pluck, subsets->unscaled_sub_fonts); _cairo_hash_table_destroy (subsets->unscaled_sub_fonts); + free (subsets); } -cairo_private cairo_status_t +cairo_status_t _cairo_scaled_font_subsets_map_glyph (cairo_scaled_font_subsets_t *subsets, cairo_scaled_font_t *scaled_font, unsigned long scaled_font_glyph_index, @@ -547,7 +548,9 @@ _cairo_scaled_font_subsets_map_glyph (cairo_scaled_font_subsets_t *subsets, if (status && status != CAIRO_INT_STATUS_UNSUPPORTED) return status; - if (status == 0 && subsets->type != CAIRO_SUBSETS_SCALED) { + if (status == CAIRO_STATUS_SUCCESS && + subsets->type != CAIRO_SUBSETS_SCALED) + { /* Path available. Add to unscaled subset. */ key.is_scaled = FALSE; _cairo_sub_font_init_key (&key, scaled_font); @@ -722,20 +725,16 @@ _cairo_string_init_key (cairo_string_entry_t *key, char *s) key->string = s; } -static cairo_string_entry_t * -create_string_entry (char *s) +static cairo_status_t +create_string_entry (char *s, cairo_string_entry_t **entry) { - cairo_string_entry_t *entry; - - entry = malloc (sizeof (cairo_string_entry_t)); - if (entry == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NULL; - } + *entry = malloc (sizeof (cairo_string_entry_t)); + if (*entry == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); - _cairo_string_init_key (entry, s); + _cairo_string_init_key (*entry, s); - return entry; + return CAIRO_STATUS_SUCCESS; } cairo_int_status_t @@ -748,37 +747,42 @@ _cairo_scaled_font_subset_create_glyph_names (cairo_scaled_font_subset_t *subset cairo_string_entry_t key, *entry; char buf[30]; - if (subset->to_unicode == NULL) { + if (subset->to_unicode == NULL) return CAIRO_INT_STATUS_UNSUPPORTED; - } - if (_cairo_truetype_create_glyph_to_unicode_map (subset) != CAIRO_STATUS_SUCCESS) { + status = _cairo_truetype_create_glyph_to_unicode_map (subset); + if (status) { + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; + backend = subset->scaled_font->backend; - if (backend->map_glyphs_to_unicode == NULL) { + if (backend->map_glyphs_to_unicode == NULL) return CAIRO_INT_STATUS_UNSUPPORTED; - } - backend->map_glyphs_to_unicode (subset->scaled_font, subset); - } - subset->glyph_names = calloc (subset->num_glyphs, sizeof (char *)); + status = backend->map_glyphs_to_unicode (subset->scaled_font, subset); + if (status) + return status; + } names = _cairo_hash_table_create (_cairo_string_equal); - if (names == NULL) { - status = CAIRO_STATUS_NO_MEMORY; - goto FAIL1; + if (names == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + + subset->glyph_names = calloc (subset->num_glyphs, sizeof (char *)); + if (subset->glyph_names == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto CLEANUP_HASH; } subset->glyph_names[0] = strdup (".notdef"); if (subset->glyph_names[0] == NULL) { - status = CAIRO_STATUS_NO_MEMORY; - goto FAIL1; + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto CLEANUP_HASH; } - entry = create_string_entry (subset->glyph_names[0]); - if (entry == NULL) { - status = CAIRO_STATUS_NO_MEMORY; - goto FAIL2; - } + status = create_string_entry (subset->glyph_names[0], &entry); + if (status) + goto CLEANUP_HASH; status = _cairo_hash_table_insert (names, &entry->base); if (status) { @@ -786,7 +790,7 @@ _cairo_scaled_font_subset_create_glyph_names (cairo_scaled_font_subset_t *subset goto CLEANUP_HASH; } - for (i = 0; i < subset->num_glyphs; i++) { + for (i = 1; i < subset->num_glyphs; i++) { if (subset->to_unicode[i] <= 0xffff) { snprintf (buf, sizeof(buf), "uni%04X", (unsigned int)(subset->to_unicode[i])); _cairo_string_init_key (&key, buf); @@ -800,15 +804,13 @@ _cairo_scaled_font_subset_create_glyph_names (cairo_scaled_font_subset_t *subset subset->glyph_names[i] = strdup (buf); if (subset->glyph_names[i] == NULL) { - status = CAIRO_STATUS_NO_MEMORY; + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto CLEANUP_HASH; } - entry = create_string_entry (subset->glyph_names[i]); - if (entry == NULL) { - status = CAIRO_STATUS_NO_MEMORY; + status = create_string_entry (subset->glyph_names[i], &entry); + if (status) goto CLEANUP_HASH; - } status = _cairo_hash_table_insert (names, &entry->base); if (status) { @@ -816,30 +818,30 @@ _cairo_scaled_font_subset_create_glyph_names (cairo_scaled_font_subset_t *subset goto CLEANUP_HASH; } } - return 0; CLEANUP_HASH: while (1) { entry = _cairo_hash_table_random_entry (names, NULL); if (entry == NULL) break; + _cairo_hash_table_remove (names, (cairo_hash_entry_t *) entry); free (entry); } _cairo_hash_table_destroy (names); if (status == CAIRO_STATUS_SUCCESS) - return status; + return CAIRO_STATUS_SUCCESS; -FAIL2: - for (i = 0; i < subset->num_glyphs; i++) { - if (subset->glyph_names[i] != NULL) - free (subset->glyph_names[i]); - } + if (subset->glyph_names != NULL) { + for (i = 0; i < subset->num_glyphs; i++) { + if (subset->glyph_names[i] != NULL) + free (subset->glyph_names[i]); + } -FAIL1: - free (subset->glyph_names); - subset->glyph_names = NULL; + free (subset->glyph_names); + subset->glyph_names = NULL; + } return status; } diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 2fd1fff..f8b124b 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -608,6 +608,9 @@ cairo_scaled_font_create (cairo_font_face_t *font_face, if (! _cairo_matrix_is_invertible (font_matrix)) return (cairo_scaled_font_t *)&_cairo_scaled_font_nil; + if (! _cairo_matrix_is_invertible (ctm)) + return (cairo_scaled_font_t *)&_cairo_scaled_font_nil; + font_map = _cairo_scaled_font_map_lock (); if (font_map == NULL) return (cairo_scaled_font_t *)&_cairo_scaled_font_nil; @@ -1170,7 +1173,9 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, { cairo_status_t status; cairo_surface_t *mask = NULL; + cairo_format_t mask_format = CAIRO_FORMAT_A1; /* shut gcc up */ cairo_surface_pattern_t mask_pattern; + cairo_solid_pattern_t white_pattern; int i; /* These operators aren't interpreted the same way by the backends; @@ -1200,6 +1205,8 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, status = CAIRO_STATUS_SUCCESS; + _cairo_pattern_init_solid (&white_pattern, CAIRO_COLOR_WHITE, CAIRO_CONTENT_COLOR); + _cairo_cache_freeze (scaled_font->glyphs); for (i = 0; i < num_glyphs; i++) { @@ -1218,26 +1225,67 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, glyph_surface = scaled_glyph->surface; - /* Create the mask using the format from the first glyph */ + /* To start, create the mask using the format from the first + * glyph. Later we'll deal with different formats. */ if (mask == NULL) { - mask = cairo_image_surface_create (glyph_surface->format, + mask_format = glyph_surface->format; + mask = cairo_image_surface_create (mask_format, width, height); if (mask->status) { status = mask->status; goto CLEANUP_MASK; } + } - status = _cairo_surface_fill_rectangle (mask, - CAIRO_OPERATOR_CLEAR, - CAIRO_COLOR_TRANSPARENT, - 0, 0, - width, height); - if (status) + /* If we have glyphs of different formats, we "upgrade" the mask + * to the wider of the formats. */ + if (glyph_surface->format != mask_format && + _cairo_format_width (mask_format) < _cairo_format_width (glyph_surface->format) ) + { + cairo_surface_t *new_mask; + cairo_surface_pattern_t mask_pattern; + + switch (glyph_surface->format) { + case CAIRO_FORMAT_ARGB32: + case CAIRO_FORMAT_A8: + case CAIRO_FORMAT_A1: + mask_format = glyph_surface->format; + break; + case CAIRO_FORMAT_RGB24: + default: + ASSERT_NOT_REACHED; + mask_format = CAIRO_FORMAT_ARGB32; + break; + } + + new_mask = cairo_image_surface_create (mask_format, + width, height); + if (new_mask->status) { + status = new_mask->status; + cairo_surface_destroy (new_mask); + goto CLEANUP_MASK; + } + + _cairo_pattern_init_for_surface (&mask_pattern, mask); + + status = _cairo_surface_composite (CAIRO_OPERATOR_ADD, + &white_pattern.base, + &mask_pattern.base, + new_mask, + 0, 0, + 0, 0, + 0, 0, + width, height); + + _cairo_pattern_fini (&mask_pattern.base); + + if (status) { + cairo_surface_destroy (new_mask); goto CLEANUP_MASK; - if (glyph_surface->format == CAIRO_FORMAT_ARGB32) - pixman_image_set_component_alpha (((cairo_image_surface_t*) mask)-> - pixman_image, TRUE); + } + cairo_surface_destroy (mask); + mask = new_mask; } /* round glyph locations to the nearest pixel */ @@ -1248,21 +1296,24 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, _cairo_pattern_init_for_surface (&glyph_pattern, &glyph_surface->base); status = _cairo_surface_composite (CAIRO_OPERATOR_ADD, + &white_pattern.base, &glyph_pattern.base, - NULL, mask, 0, 0, 0, 0, - x - dest_x, - y - dest_y, + x - dest_x, y - dest_y, glyph_surface->width, glyph_surface->height); _cairo_pattern_fini (&glyph_pattern.base); + if (status) goto CLEANUP_MASK; } + if (mask_format == CAIRO_FORMAT_ARGB32) + pixman_image_set_component_alpha (((cairo_image_surface_t*) mask)-> + pixman_image, TRUE); _cairo_pattern_init_for_surface (&mask_pattern, mask); status = _cairo_surface_composite (op, pattern, &mask_pattern.base, @@ -1277,6 +1328,8 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, CLEANUP_MASK: _cairo_cache_thaw (scaled_font->glyphs); + _cairo_pattern_fini (&white_pattern.base); + if (mask != NULL) cairo_surface_destroy (mask); return _cairo_scaled_font_set_error (scaled_font, status); diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c index 4abeaf9..02a2e9d 100644 --- a/src/cairo-surface-fallback.c +++ b/src/cairo-surface-fallback.c @@ -1043,15 +1043,15 @@ _cairo_surface_fallback_snapshot (cairo_surface_t *surface) status = _cairo_surface_acquire_source_image (surface, &image, &image_extra); - if (status != CAIRO_STATUS_SUCCESS) - return (cairo_surface_t *) &_cairo_surface_nil; + if (status) + return _cairo_surface_create_in_error (status); snapshot = cairo_image_surface_create (image->format, image->width, image->height); if (cairo_surface_status (snapshot)) { _cairo_surface_release_source_image (surface, - image, &image_extra); + image, image_extra); return snapshot; } @@ -1069,11 +1069,11 @@ _cairo_surface_fallback_snapshot (cairo_surface_t *surface) _cairo_pattern_fini (&pattern.base); _cairo_surface_release_source_image (surface, - image, &image_extra); + image, image_extra); if (status) { cairo_surface_destroy (snapshot); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); } snapshot->device_transform = surface->device_transform; diff --git a/src/cairo-surface.c b/src/cairo-surface.c index ed332f5..8860c95 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -78,15 +78,19 @@ const cairo_surface_t name = { \ } /* font_options */ \ } -DEFINE_NIL_SURFACE(CAIRO_STATUS_NO_MEMORY, _cairo_surface_nil); -DEFINE_NIL_SURFACE(CAIRO_STATUS_FILE_NOT_FOUND, _cairo_surface_nil_file_not_found); -DEFINE_NIL_SURFACE(CAIRO_STATUS_READ_ERROR, _cairo_surface_nil_read_error); -DEFINE_NIL_SURFACE(CAIRO_STATUS_WRITE_ERROR, _cairo_surface_nil_write_error); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_NO_MEMORY, _cairo_surface_nil); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_CONTENT, _cairo_surface_nil_invalid_content); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_FORMAT, _cairo_surface_nil_invalid_format); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_INVALID_VISUAL, _cairo_surface_nil_invalid_visual); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_FILE_NOT_FOUND, _cairo_surface_nil_file_not_found); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_TEMP_FILE_ERROR, _cairo_surface_nil_temp_file_error); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_READ_ERROR, _cairo_surface_nil_read_error); +static DEFINE_NIL_SURFACE(CAIRO_STATUS_WRITE_ERROR, _cairo_surface_nil_write_error); static cairo_status_t _cairo_surface_copy_pattern_for_destination (const cairo_pattern_t *pattern, cairo_surface_t *destination, - cairo_pattern_t *pattern_out); + cairo_pattern_t **pattern_out); /** * _cairo_surface_set_error: @@ -228,7 +232,7 @@ _cairo_surface_create_similar_scratch (cairo_surface_t *other, cairo_format_t format = _cairo_format_from_content (content); if (other->status) - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (other->status); if (other->backend->create_similar) { surface = other->backend->create_similar (other, content, width, height); @@ -289,12 +293,10 @@ cairo_surface_create_similar (cairo_surface_t *other, int height) { if (other->status) - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (other->status); - if (! CAIRO_CONTENT_VALID (content)) { - _cairo_error_throw (CAIRO_STATUS_INVALID_CONTENT); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (! CAIRO_CONTENT_VALID (content)) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_CONTENT)); return _cairo_surface_create_similar_solid (other, content, width, height, @@ -317,17 +319,14 @@ _cairo_surface_create_similar_solid (cairo_surface_t *other, surface = _cairo_surface_create_similar_scratch (other, content, width, height); - if (surface->status) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (surface->status) + return surface; if (pattern == NULL) { source = _cairo_pattern_create_solid (color, content); if (source->status) { cairo_surface_destroy (surface); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (source->status); } } else source = pattern; @@ -342,8 +341,7 @@ _cairo_surface_create_similar_solid (cairo_surface_t *other, if (status) { cairo_surface_destroy (surface); - _cairo_error_throw (status); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); } return surface; @@ -931,7 +929,7 @@ _cairo_surface_has_device_transform (cairo_surface_t *surface) * @surface as a source. _cairo_surface_release_source_image() must be called * when finished. * - * Return value: %CAIRO_STATUS_SUCCESS if a an image was stored in @image_out. + * Return value: %CAIRO_STATUS_SUCCESS if an image was stored in @image_out. * %CAIRO_INT_STATUS_UNSUPPORTED if an image cannot be retrieved for the specified * surface. Or %CAIRO_STATUS_NO_MEMORY. **/ @@ -942,6 +940,9 @@ _cairo_surface_acquire_source_image (cairo_surface_t *surface, { assert (!surface->finished); + if (surface->backend->acquire_source_image == NULL) + return CAIRO_INT_STATUS_UNSUPPORTED; + return _cairo_surface_set_error (surface, surface->backend->acquire_source_image (surface, image_out, image_extra)); @@ -1005,6 +1006,9 @@ _cairo_surface_acquire_dest_image (cairo_surface_t *surface, { assert (!surface->finished); + if (surface->backend->acquire_dest_image == NULL) + return CAIRO_INT_STATUS_UNSUPPORTED; + return _cairo_surface_set_error (surface, surface->backend->acquire_dest_image (surface, interest_rect, @@ -1135,7 +1139,7 @@ cairo_surface_t * _cairo_surface_snapshot (cairo_surface_t *surface) { if (surface->finished) - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_FINISHED)); if (surface->backend->snapshot) return surface->backend->snapshot (surface); @@ -1286,7 +1290,7 @@ _cairo_surface_fill_region (cairo_surface_t *surface, { int num_boxes; cairo_box_int_t *boxes = NULL; - cairo_rectangle_int_t stack_rects[CAIRO_STACK_BUFFER_SIZE / sizeof (cairo_rectangle_int_t)]; + cairo_rectangle_int_t stack_rects[CAIRO_STACK_ARRAY_LENGTH (cairo_rectangle_int_t)]; cairo_rectangle_int_t *rects = stack_rects; cairo_status_t status; int i; @@ -1389,24 +1393,24 @@ _cairo_surface_paint (cairo_surface_t *surface, cairo_pattern_t *source) { cairo_status_t status; - cairo_pattern_union_t dev_source; + cairo_pattern_t *dev_source; assert (! surface->is_snapshot); - status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source.base); + status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source); if (status) return _cairo_surface_set_error (surface, status); if (surface->backend->paint) { - status = surface->backend->paint (surface, op, &dev_source.base); + status = surface->backend->paint (surface, op, dev_source); if (status != CAIRO_INT_STATUS_UNSUPPORTED) goto FINISH; } - status = _cairo_surface_fallback_paint (surface, op, &dev_source.base); + status = _cairo_surface_fallback_paint (surface, op, dev_source); FINISH: - _cairo_pattern_fini (&dev_source.base); + cairo_pattern_destroy (dev_source); return _cairo_surface_set_error (surface, status); } @@ -1418,31 +1422,31 @@ _cairo_surface_mask (cairo_surface_t *surface, cairo_pattern_t *mask) { cairo_status_t status; - cairo_pattern_union_t dev_source; - cairo_pattern_union_t dev_mask; + cairo_pattern_t *dev_source; + cairo_pattern_t *dev_mask; assert (! surface->is_snapshot); - status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source.base); + status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source); if (status) goto FINISH; - status = _cairo_surface_copy_pattern_for_destination (mask, surface, &dev_mask.base); + status = _cairo_surface_copy_pattern_for_destination (mask, surface, &dev_mask); if (status) goto CLEANUP_SOURCE; if (surface->backend->mask) { - status = surface->backend->mask (surface, op, &dev_source.base, &dev_mask.base); + status = surface->backend->mask (surface, op, dev_source, dev_mask); if (status != CAIRO_INT_STATUS_UNSUPPORTED) goto CLEANUP_MASK; } - status = _cairo_surface_fallback_mask (surface, op, &dev_source.base, &dev_mask.base); + status = _cairo_surface_fallback_mask (surface, op, dev_source, dev_mask); CLEANUP_MASK: - _cairo_pattern_fini (&dev_mask.base); + cairo_pattern_destroy (dev_mask); CLEANUP_SOURCE: - _cairo_pattern_fini (&dev_source.base); + cairo_pattern_destroy (dev_source); FINISH: return _cairo_surface_set_error (surface, status); @@ -1467,29 +1471,29 @@ _cairo_surface_fill_stroke (cairo_surface_t *surface, cairo_status_t status; if (surface->backend->fill_stroke) { - cairo_pattern_union_t dev_stroke_source; - cairo_pattern_union_t dev_fill_source; + cairo_pattern_t *dev_stroke_source; + cairo_pattern_t *dev_fill_source; cairo_matrix_t dev_ctm = *stroke_ctm; cairo_matrix_t dev_ctm_inverse = *stroke_ctm_inverse; - status = _cairo_surface_copy_pattern_for_destination (stroke_source, surface, &dev_stroke_source.base); + status = _cairo_surface_copy_pattern_for_destination (stroke_source, surface, &dev_stroke_source); if (status) return _cairo_surface_set_error (surface, status); - status = _cairo_surface_copy_pattern_for_destination (fill_source, surface, &dev_fill_source.base); + status = _cairo_surface_copy_pattern_for_destination (fill_source, surface, &dev_fill_source); if (status) { - _cairo_pattern_fini (&dev_stroke_source.base); + cairo_pattern_destroy (dev_stroke_source); return _cairo_surface_set_error (surface, status); } - status = surface->backend->fill_stroke (surface, fill_op, &dev_fill_source.base, + status = surface->backend->fill_stroke (surface, fill_op, dev_fill_source, fill_rule, fill_tolerance, fill_antialias, - path, stroke_op, &dev_stroke_source.base, stroke_style, + path, stroke_op, dev_stroke_source, stroke_style, &dev_ctm, &dev_ctm_inverse, stroke_tolerance, stroke_antialias); - _cairo_pattern_fini (&dev_stroke_source.base); - _cairo_pattern_fini (&dev_fill_source.base); + cairo_pattern_destroy (dev_stroke_source); + cairo_pattern_destroy (dev_fill_source); if (status != CAIRO_INT_STATUS_UNSUPPORTED) return _cairo_surface_set_error (surface, status); @@ -1521,7 +1525,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, cairo_antialias_t antialias) { cairo_status_t status; - cairo_pattern_union_t dev_source; + cairo_pattern_t *dev_source; cairo_path_fixed_t *dev_path = path; cairo_path_fixed_t real_dev_path; cairo_matrix_t dev_ctm = *ctm; @@ -1529,12 +1533,12 @@ _cairo_surface_stroke (cairo_surface_t *surface, assert (! surface->is_snapshot); - status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source.base); + status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source); if (status) return _cairo_surface_set_error (surface, status); if (surface->backend->stroke) { - status = surface->backend->stroke (surface, op, &dev_source.base, + status = surface->backend->stroke (surface, op, dev_source, path, stroke_style, &dev_ctm, &dev_ctm_inverse, tolerance, antialias); @@ -1543,7 +1547,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, goto FINISH; } - status = _cairo_surface_fallback_stroke (surface, op, &dev_source.base, + status = _cairo_surface_fallback_stroke (surface, op, dev_source, path, stroke_style, &dev_ctm, &dev_ctm_inverse, tolerance, antialias); @@ -1551,7 +1555,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, FINISH: if (dev_path == &real_dev_path) _cairo_path_fixed_fini (&real_dev_path); - _cairo_pattern_fini (&dev_source.base); + cairo_pattern_destroy (dev_source); return _cairo_surface_set_error (surface, status); } @@ -1566,16 +1570,16 @@ _cairo_surface_fill (cairo_surface_t *surface, cairo_antialias_t antialias) { cairo_status_t status; - cairo_pattern_union_t dev_source; + cairo_pattern_t *dev_source; assert (! surface->is_snapshot); - status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source.base); + status = _cairo_surface_copy_pattern_for_destination (source, surface, &dev_source); if (status) return _cairo_surface_set_error (surface, status); if (surface->backend->fill) { - status = surface->backend->fill (surface, op, &dev_source.base, + status = surface->backend->fill (surface, op, dev_source, path, fill_rule, tolerance, antialias); @@ -1583,12 +1587,12 @@ _cairo_surface_fill (cairo_surface_t *surface, goto FINISH; } - status = _cairo_surface_fallback_fill (surface, op, &dev_source.base, + status = _cairo_surface_fallback_fill (surface, op, dev_source, path, fill_rule, tolerance, antialias); FINISH: - _cairo_pattern_fini (&dev_source.base); + cairo_pattern_destroy (dev_source); return _cairo_surface_set_error (surface, status); } @@ -2039,7 +2043,7 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, { cairo_status_t status; cairo_scaled_font_t *dev_scaled_font = scaled_font; - cairo_pattern_union_t dev_source; + cairo_pattern_t *dev_source; cairo_matrix_t font_matrix; assert (! surface->is_snapshot); @@ -2049,7 +2053,7 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, status = _cairo_surface_copy_pattern_for_destination (source, surface, - &dev_source.base); + &dev_source); if (status) return _cairo_surface_set_error (surface, status); @@ -2074,7 +2078,7 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, } status = cairo_scaled_font_status (dev_scaled_font); if (status) { - _cairo_pattern_fini (&dev_source.base); + cairo_pattern_destroy (dev_source); return _cairo_surface_set_error (surface, status); } @@ -2083,12 +2087,12 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, status = CAIRO_INT_STATUS_UNSUPPORTED; if (surface->backend->show_glyphs) - status = surface->backend->show_glyphs (surface, op, &dev_source.base, + status = surface->backend->show_glyphs (surface, op, dev_source, glyphs, num_glyphs, dev_scaled_font); if (status == CAIRO_INT_STATUS_UNSUPPORTED) - status = _cairo_surface_fallback_show_glyphs (surface, op, &dev_source.base, + status = _cairo_surface_fallback_show_glyphs (surface, op, dev_source, glyphs, num_glyphs, dev_scaled_font); @@ -2097,7 +2101,7 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, if (dev_scaled_font != scaled_font) cairo_scaled_font_destroy (dev_scaled_font); - _cairo_pattern_fini (&dev_source.base); + cairo_pattern_destroy (dev_source); return _cairo_surface_set_error (surface, status); } @@ -2364,11 +2368,11 @@ _cairo_surface_composite_shape_fixup_unbounded (cairo_surface_t *dst, static cairo_status_t _cairo_surface_copy_pattern_for_destination (const cairo_pattern_t *pattern, cairo_surface_t *destination, - cairo_pattern_t *pattern_out) + cairo_pattern_t **pattern_out) { cairo_status_t status; - status = _cairo_pattern_init_copy (pattern_out, pattern); + status = _cairo_pattern_create_copy (pattern_out, pattern); if (status) return status; @@ -2381,7 +2385,7 @@ _cairo_surface_copy_pattern_for_destination (const cairo_pattern_t *pattern, * matrix should always be invertible. */ assert (status == CAIRO_STATUS_SUCCESS); - _cairo_pattern_transform (pattern_out, &device_to_surface); + _cairo_pattern_transform (*pattern_out, &device_to_surface); } return CAIRO_STATUS_SUCCESS; @@ -2406,5 +2410,31 @@ _cairo_surface_set_resolution (cairo_surface_t *surface, surface->y_resolution = y_res; } +cairo_surface_t * +_cairo_surface_create_in_error (cairo_status_t status) +{ + switch (status) { + case CAIRO_STATUS_NO_MEMORY: + return (cairo_surface_t *) &_cairo_surface_nil; + case CAIRO_STATUS_INVALID_CONTENT: + return (cairo_surface_t *) &_cairo_surface_nil_invalid_content; + case CAIRO_STATUS_INVALID_FORMAT: + return (cairo_surface_t *) &_cairo_surface_nil_invalid_format; + case CAIRO_STATUS_INVALID_VISUAL: + return (cairo_surface_t *) &_cairo_surface_nil_invalid_visual; + case CAIRO_STATUS_READ_ERROR: + return (cairo_surface_t *) &_cairo_surface_nil_read_error; + case CAIRO_STATUS_WRITE_ERROR: + return (cairo_surface_t *) &_cairo_surface_nil_write_error; + case CAIRO_STATUS_FILE_NOT_FOUND: + return (cairo_surface_t *) &_cairo_surface_nil_file_not_found; + case CAIRO_STATUS_TEMP_FILE_ERROR: + return (cairo_surface_t *) &_cairo_surface_nil_temp_file_error; + default: + _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); + return (cairo_surface_t *) &_cairo_surface_nil; + } +} + /* LocalWords: rasterized */ diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index a3d2b7e..2c3cb58 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -118,11 +118,12 @@ typedef struct { cairo_meta_surface_t *meta; } cairo_meta_snapshot_t; -static cairo_svg_document_t * -_cairo_svg_document_create (cairo_output_stream_t *stream, - double width, - double height, - cairo_svg_version_t version); +static cairo_status_t +_cairo_svg_document_create (cairo_output_stream_t *stream, + double width, + double height, + cairo_svg_version_t version, + cairo_svg_document_t **document_out); static cairo_status_t _cairo_svg_document_destroy (cairo_svg_document_t *document); @@ -173,13 +174,11 @@ cairo_svg_surface_create_for_stream (cairo_write_func_t write_func, double width, double height) { - cairo_status_t status; cairo_output_stream_t *stream; stream = _cairo_output_stream_create (write_func, NULL, closure); - status = _cairo_output_stream_get_status (stream); - if (status) - return (cairo_surface_t *) &_cairo_surface_nil; + if (_cairo_output_stream_get_status (stream)) + return _cairo_surface_create_in_error (_cairo_output_stream_destroy (stream)); return _cairo_svg_surface_create_for_stream_internal (stream, width, height, CAIRO_SVG_VERSION_1_1); } @@ -208,15 +207,11 @@ cairo_svg_surface_create (const char *filename, double width, double height) { - cairo_status_t status; cairo_output_stream_t *stream; stream = _cairo_output_stream_create_for_filename (filename); - status = _cairo_output_stream_get_status (stream); - if (status) - return (status == CAIRO_STATUS_WRITE_ERROR) ? - (cairo_surface_t *) &_cairo_surface_nil_write_error : - (cairo_surface_t *) &_cairo_surface_nil; + if (_cairo_output_stream_get_status (stream)) + return _cairo_surface_create_in_error (_cairo_output_stream_destroy (stream)); return _cairo_svg_surface_create_for_stream_internal (stream, width, height, CAIRO_SVG_VERSION_1_1); } @@ -332,13 +327,11 @@ _cairo_svg_surface_create_for_document (cairo_svg_document_t *document, { cairo_svg_surface_t *surface; cairo_surface_t *paginated; - cairo_status_t status; + cairo_status_t status, status_ignored; surface = malloc (sizeof (cairo_svg_surface_t)); - if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); _cairo_surface_init (&surface->base, &cairo_svg_surface_backend, content); @@ -355,8 +348,9 @@ _cairo_svg_surface_create_for_document (cairo_svg_document_t *document, surface->is_base_clip_emitted = FALSE; surface->xml_node = _cairo_memory_stream_create (); - if (_cairo_output_stream_get_status (surface->xml_node)) - goto CLEANUP_DOCUMENT; + status = _cairo_output_stream_get_status (surface->xml_node); + if (status) + goto CLEANUP; _cairo_array_init (&surface->page_set, sizeof (cairo_svg_page_t)); @@ -366,8 +360,9 @@ _cairo_svg_surface_create_for_document (cairo_svg_document_t *document, "style=\"opacity: 1; stroke: none; " "fill: rgb(0,0,0);\"/>\n", width, height); - if (_cairo_output_stream_get_status (surface->xml_node)) - goto CLEANUP_STREAM; + status = _cairo_output_stream_get_status (surface->xml_node); + if (status) + goto CLEANUP; } surface->paginated_mode = CAIRO_PAGINATED_MODE_ANALYZE; @@ -379,18 +374,18 @@ _cairo_svg_surface_create_for_document (cairo_svg_document_t *document, surface->width, surface->height, &cairo_svg_surface_paginated_backend); - if (! paginated->status) + status = paginated->status; + if (status == CAIRO_STATUS_SUCCESS) return paginated; /* ignore status as we are on the error path */ -CLEANUP_STREAM: - status = _cairo_output_stream_destroy (surface->xml_node); -CLEANUP_DOCUMENT: - status = _cairo_svg_document_destroy (document); +CLEANUP: + status_ignored = _cairo_output_stream_destroy (surface->xml_node); + status_ignored = _cairo_svg_document_destroy (document); free (surface); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + + return _cairo_surface_create_in_error (status); } static cairo_surface_t * @@ -399,23 +394,25 @@ _cairo_svg_surface_create_for_stream_internal (cairo_output_stream_t *stream, double height, cairo_svg_version_t version) { - cairo_svg_document_t *document; + cairo_svg_document_t *document = NULL; /* silence compiler */ cairo_surface_t *surface; cairo_status_t status; - document = _cairo_svg_document_create (stream, width, height, version); - if (document == NULL) { + status = _cairo_svg_document_create (stream, + width, height, version, + &document); + if (status) { + surface = _cairo_surface_create_in_error (status); /* consume the output stream on behalf of caller */ status = _cairo_output_stream_destroy (stream); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return surface; } surface = _cairo_svg_surface_create_for_document (document, CAIRO_CONTENT_COLOR_ALPHA, width, height); if (surface->status) { status = _cairo_svg_document_destroy (document); - return (cairo_surface_t *) &_cairo_surface_nil; + return surface; } document->owner = surface; @@ -432,20 +429,21 @@ _cairo_svg_surface_store_page (cairo_svg_surface_t *surface) unsigned int i; cairo_svg_page_t page; cairo_output_stream_t *stream; + cairo_status_t status; stream = _cairo_memory_stream_create (); - if (stream->status) + if (_cairo_output_stream_get_status (stream)) { + status = _cairo_output_stream_destroy (stream); return NULL; + } page.surface_id = surface->id; page.clip_level = surface->clip_level; page.xml_node = surface->xml_node; - if (_cairo_array_append (&surface->page_set, &page) != CAIRO_STATUS_SUCCESS) - { - cairo_status_t status = _cairo_output_stream_destroy (stream); + if (_cairo_array_append (&surface->page_set, &page)) { + status = _cairo_output_stream_destroy (stream); return NULL; - (void) status; } surface->xml_node = stream; @@ -1032,7 +1030,7 @@ _cairo_svg_surface_emit_meta_surface (cairo_svg_document_t *document, meta->height_pixels); if (paginated_surface->status) { cairo_surface_destroy (&meta->base); - return CAIRO_STATUS_NO_MEMORY; + return paginated_surface->status; } svg_surface = (cairo_svg_surface_t *) _cairo_paginated_surface_get_target (paginated_surface); @@ -1096,7 +1094,7 @@ _cairo_svg_surface_emit_meta_surface (cairo_svg_document_t *document, if (_cairo_memory_stream_length (contents) > 0) { if (_cairo_svg_surface_store_page (svg_surface) == NULL) { cairo_surface_destroy (paginated_surface); - return CAIRO_STATUS_NO_MEMORY; + return _cairo_error (CAIRO_STATUS_NO_MEMORY); } } @@ -1538,6 +1536,8 @@ _cairo_svg_surface_emit_radial_pattern (cairo_svg_surface_t *surface, assert (status == CAIRO_STATUS_SUCCESS); if (pattern->r1 == pattern->r2) { + unsigned int n_stops = pattern->base.n_stops; + _cairo_output_stream_printf (document->xml_node_defs, "<radialGradient id=\"radial%d\" " "gradientUnits=\"userSpaceOnUse\" " @@ -1549,8 +1549,7 @@ _cairo_svg_surface_emit_radial_pattern (cairo_svg_surface_t *surface, _cairo_svg_surface_emit_transform (document->xml_node_defs, "gradientTransform", &p2u); _cairo_output_stream_printf (document->xml_node_defs, ">\n"); - if (extend == CAIRO_EXTEND_NONE || - pattern->base.n_stops < 1) + if (extend == CAIRO_EXTEND_NONE || n_stops < 1) _cairo_output_stream_printf (document->xml_node_defs, "<stop offset=\"0\" style=\"" "stop-color: rgb(0%%,0%%,0%%); " @@ -1564,15 +1563,15 @@ _cairo_svg_surface_emit_radial_pattern (cairo_svg_surface_t *surface, pattern->base.stops[0].color.green * 100.0, pattern->base.stops[0].color.blue * 100.0, pattern->base.stops[0].color.alpha); - if (pattern->base.n_stops > 1) + if (n_stops > 1) _cairo_output_stream_printf (document->xml_node_defs, "<stop offset=\"0\" style=\"" "stop-color: rgb(%f%%,%f%%,%f%%); " "stop-opacity: %f;\"/>\n", - pattern->base.stops[1].color.red * 100.0, - pattern->base.stops[1].color.green * 100.0, - pattern->base.stops[1].color.blue * 100.0, - pattern->base.stops[1].color.alpha); + pattern->base.stops[n_stops - 1].color.red * 100.0, + pattern->base.stops[n_stops - 1].color.green * 100.0, + pattern->base.stops[n_stops - 1].color.blue * 100.0, + pattern->base.stops[n_stops - 1].color.alpha); } } else { @@ -1959,8 +1958,8 @@ _cairo_svg_surface_paint (void *abstract_surface, } surface->xml_node = _cairo_memory_stream_create (); - status = _cairo_output_stream_get_status (surface->xml_node); - if (status) { + if (_cairo_output_stream_get_status (surface->xml_node)) { + status = _cairo_output_stream_destroy (surface->xml_node); surface->xml_node = NULL; return status; } @@ -2005,9 +2004,8 @@ _cairo_svg_surface_mask (void *abstract_surface, * document->xml_node_defs so we need to write the mask element to * a temporary stream and then copy that to xml_node_defs. */ mask_stream = _cairo_memory_stream_create (); - status = _cairo_output_stream_get_status (mask_stream); - if (status) - return status; + if (_cairo_output_stream_get_status (mask_stream)) + return _cairo_output_stream_destroy (mask_stream); _cairo_output_stream_printf (mask_stream, "<mask id=\"mask%d\">\n" @@ -2245,28 +2243,29 @@ static const cairo_surface_backend_t cairo_svg_surface_backend = { _cairo_svg_surface_fill_stroke }; -static cairo_svg_document_t * -_cairo_svg_document_create (cairo_output_stream_t *output_stream, - double width, - double height, - cairo_svg_version_t version) +static cairo_status_t +_cairo_svg_document_create (cairo_output_stream_t *output_stream, + double width, + double height, + cairo_svg_version_t version, + cairo_svg_document_t **document_out) { cairo_svg_document_t *document; - cairo_status_t status; + cairo_status_t status, status_ignored; if (output_stream->status) - return NULL; + return output_stream->status; document = malloc (sizeof (cairo_svg_document_t)); - if (document == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NULL; - } + if (document == NULL) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); /* The use of defs for font glyphs imposes no per-subset limit. */ document->font_subsets = _cairo_scaled_font_subsets_create_scaled (); - if (document->font_subsets == NULL) + if (document->font_subsets == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto CLEANUP_DOCUMENT; + } document->output_stream = output_stream; document->refcount = 1; @@ -2284,12 +2283,14 @@ _cairo_svg_document_create (cairo_output_stream_t *output_stream, document->mask_id = 0; document->xml_node_defs = _cairo_memory_stream_create (); - if (_cairo_output_stream_get_status (document->xml_node_defs)) - goto CLEANUP_FONT_SUBSETS; + status = _cairo_output_stream_get_status (document->xml_node_defs); + if (status) + goto CLEANUP_NODE_DEFS; document->xml_node_glyphs = _cairo_memory_stream_create (); - if (_cairo_output_stream_get_status (document->xml_node_glyphs)) - goto CLEANUP_NODE_DEFS; + status = _cairo_output_stream_get_status (document->xml_node_glyphs); + if (status) + goto CLEANUP_NODE_GLYPHS; document->alpha_filter = FALSE; @@ -2298,15 +2299,17 @@ _cairo_svg_document_create (cairo_output_stream_t *output_stream, document->svg_version = version; - return document; + *document_out = document; + return CAIRO_STATUS_SUCCESS; + CLEANUP_NODE_GLYPHS: + status_ignored = _cairo_output_stream_destroy (document->xml_node_glyphs); CLEANUP_NODE_DEFS: - status = _cairo_output_stream_destroy (document->xml_node_defs); - CLEANUP_FONT_SUBSETS: + status_ignored = _cairo_output_stream_destroy (document->xml_node_defs); _cairo_scaled_font_subsets_destroy (document->font_subsets); CLEANUP_DOCUMENT: free (document); - return NULL; + return status; } static cairo_svg_document_t * @@ -2377,7 +2380,7 @@ _cairo_svg_document_finish (cairo_svg_document_t *document) _cairo_memory_stream_length (surface->xml_node) > 0) { if (_cairo_svg_surface_store_page (surface) == NULL) { if (status == CAIRO_STATUS_SUCCESS) - status = CAIRO_STATUS_NO_MEMORY; + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); } } diff --git a/src/cairo-traps.c b/src/cairo-traps.c index 099b09e..c3d4329 100644 --- a/src/cairo-traps.c +++ b/src/cairo-traps.c @@ -568,11 +568,13 @@ _cairo_traps_contain (cairo_traps_t *traps, double x, double y) void _cairo_traps_extents (cairo_traps_t *traps, cairo_box_t *extents) { - *extents = traps->extents; + if (traps->num_traps == 0) { + extents->p1.x = extents->p1.y = _cairo_fixed_from_int (0); + extents->p2.x = extents->p2.y = _cairo_fixed_from_int (0); + } else + *extents = traps->extents; } -#define STACK_BOXES_LEN ((int) (CAIRO_STACK_BUFFER_SIZE / sizeof(cairo_box_int_t))) - /** * _cairo_traps_extract_region: * @traps: a #cairo_traps_t @@ -591,7 +593,7 @@ cairo_int_status_t _cairo_traps_extract_region (cairo_traps_t *traps, cairo_region_t *region) { - cairo_box_int_t stack_boxes[STACK_BOXES_LEN]; + cairo_box_int_t stack_boxes[CAIRO_STACK_ARRAY_LENGTH (cairo_box_int_t)]; cairo_box_int_t *boxes = stack_boxes; int i, box_count; cairo_int_status_t status; diff --git a/src/cairo-truetype-subset.c b/src/cairo-truetype-subset.c index 5e392d4..557ab1d 100644 --- a/src/cairo-truetype-subset.c +++ b/src/cairo-truetype-subset.c @@ -323,7 +323,7 @@ cairo_truetype_font_allocate_write_buffer (cairo_truetype_font_t *font, return CAIRO_STATUS_SUCCESS; } -static cairo_status_t +static void cairo_truetype_font_write (cairo_truetype_font_t *font, const void *data, size_t length) @@ -331,13 +331,11 @@ cairo_truetype_font_write (cairo_truetype_font_t *font, cairo_status_t status; if (font->status) - return font->status; + return; status = _cairo_array_append_multiple (&font->output, data, length); if (status) - return _cairo_truetype_font_set_error (font, status); - - return CAIRO_STATUS_SUCCESS; + status = _cairo_truetype_font_set_error (font, status); } static void @@ -366,22 +364,29 @@ cairo_truetype_font_write_be32 (cairo_truetype_font_t *font, cairo_truetype_font_write (font, &be32_value, sizeof be32_value); } -static unsigned long -cairo_truetype_font_align_output (cairo_truetype_font_t *font) +static cairo_status_t +cairo_truetype_font_align_output (cairo_truetype_font_t *font, + unsigned long *aligned) { - int length, aligned, pad; + int length, pad; unsigned char *padding; length = _cairo_array_num_elements (&font->output); - aligned = (length + 3) & ~3; - pad = aligned - length; + *aligned = (length + 3) & ~3; + pad = *aligned - length; if (pad) { - cairo_truetype_font_allocate_write_buffer (font, pad, &padding); + cairo_status_t status; + + status = cairo_truetype_font_allocate_write_buffer (font, pad, + &padding); + if (status) + return status; + memset (padding, 0, pad); } - return aligned; + return CAIRO_STATUS_SUCCESS; } static cairo_status_t @@ -575,8 +580,9 @@ cairo_truetype_font_write_glyf_table (cairo_truetype_font_t *font, } size = end - begin; - - next = cairo_truetype_font_align_output (font); + status = cairo_truetype_font_align_output (font, &next); + if (status) + goto FAIL; status = cairo_truetype_font_check_boundary (font, next); if (status) @@ -598,8 +604,11 @@ cairo_truetype_font_write_glyf_table (cairo_truetype_font_t *font, } } - font->glyphs[i].location = - cairo_truetype_font_align_output (font) - start_offset; + status = cairo_truetype_font_align_output (font, &next); + if (status) + goto FAIL; + + font->glyphs[i].location = next - start_offset; status = font->status; FAIL: @@ -881,8 +890,9 @@ cairo_truetype_font_generate (cairo_truetype_font_t *font, if (status) goto FAIL; - start = cairo_truetype_font_align_output (font); - end = start; + status = cairo_truetype_font_align_output (font, &start); + if (status) + goto FAIL; end = 0; for (i = 0; i < font->num_tables; i++) { @@ -891,7 +901,10 @@ cairo_truetype_font_generate (cairo_truetype_font_t *font, goto FAIL; end = _cairo_array_num_elements (&font->output); - next = cairo_truetype_font_align_output (font); + status = cairo_truetype_font_align_output (font, &next); + if (status) + goto FAIL; + cairo_truetype_font_update_entry (font, font->truetype_tables[i].pos, font->truetype_tables[i].tag, start, end); status = cairo_truetype_font_check_boundary (font, next); diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c index 3532692..0ca4998 100644 --- a/src/cairo-type1-fallback.c +++ b/src/cairo-type1-fallback.c @@ -601,10 +601,8 @@ cairo_type1_font_write_private_dict (cairo_type1_font_t *font, cairo_type1_write_stream_encrypted, NULL, font); - if (encrypted_output == NULL) { - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); - goto fail; - } + if (_cairo_output_stream_get_status (encrypted_output)) + return _cairo_output_stream_destroy (encrypted_output); /* Note: the first four spaces at the start of this private dict * are the four "random" bytes of plaintext required by the @@ -697,6 +695,8 @@ cairo_type1_font_generate (cairo_type1_font_t *font, const char *name) return status; font->output = _cairo_output_stream_create (cairo_type1_write_stream, NULL, font); + if (_cairo_output_stream_get_status (font->output)) + return _cairo_output_stream_destroy (font->output); status = cairo_type1_font_write (font, name); if (status) diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c index 031b19f..bc46954 100644 --- a/src/cairo-type1-subset.c +++ b/src/cairo-type1-subset.c @@ -147,18 +147,20 @@ _cairo_type1_font_subset_create (cairo_unscaled_font_t *unscaled_font, font->base.y_max = face->bbox.yMax; font->base.ascent = face->ascender; font->base.descent = face->descender; - font->base.base_font = strdup (face->family_name); - if (font->base.base_font == NULL) { - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); - goto fail2; - } - for (i = 0, j = 0; font->base.base_font[j]; j++) { - if (font->base.base_font[j] == ' ') - continue; - font->base.base_font[i++] = font->base.base_font[j]; + if (face->family_name) { + font->base.base_font = strdup (face->family_name); + if (font->base.base_font == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto fail2; + } + for (i = 0, j = 0; font->base.base_font[j]; j++) { + if (font->base.base_font[j] == ' ') + continue; + font->base.base_font[i++] = font->base.base_font[j]; + } + font->base.base_font[i] = '\0'; } - font->base.base_font[i] = '\0'; font->glyphs = calloc (face->num_glyphs, sizeof font->glyphs[0]); if (font->glyphs == NULL) { @@ -180,7 +182,8 @@ _cairo_type1_font_subset_create (cairo_unscaled_font_t *unscaled_font, return CAIRO_STATUS_SUCCESS; fail3: - free (font->base.base_font); + if (font->base.base_font) + free (font->base.base_font); fail2: _cairo_unscaled_font_destroy (unscaled_font); free (font); @@ -190,16 +193,13 @@ _cairo_type1_font_subset_create (cairo_unscaled_font_t *unscaled_font, return status; } -static int +static void cairo_type1_font_subset_use_glyph (cairo_type1_font_subset_t *font, int glyph) { if (font->glyphs[glyph].subset_index >= 0) - return font->glyphs[glyph].subset_index; + return; - font->glyphs[glyph].subset_index = font->num_glyphs; - font->num_glyphs++; - - return font->glyphs[glyph].subset_index; + font->glyphs[glyph].subset_index = font->num_glyphs++; } static cairo_bool_t @@ -1126,9 +1126,10 @@ cairo_type1_font_subset_generate (void *abstract_font, goto fail; font->output = _cairo_output_stream_create (type1_font_write, NULL, font); - status = _cairo_output_stream_get_status (font->output); - if (status) + if (_cairo_output_stream_get_status (font->output)) { + status = _cairo_output_stream_destroy (font->output); goto fail; + } status = cairo_type1_font_subset_write (font, name); if (status) @@ -1161,7 +1162,8 @@ cairo_type1_font_subset_destroy (void *abstract_font) _cairo_unscaled_font_destroy (font->base.unscaled_font); - free (font->base.base_font); + if (font->base.base_font) + free (font->base.base_font); free (font->glyphs); free (font); } @@ -1178,6 +1180,7 @@ _cairo_type1_subset_init (cairo_type1_subset_t *type1_subset, unsigned long parent_glyph, length; unsigned int i; cairo_unscaled_font_t *unscaled_font; + char buf[30]; /* XXX: Need to fix this to work with a general cairo_unscaled_font_t. */ if (!_cairo_scaled_font_is_ft (scaled_font_subset->scaled_font)) @@ -1201,7 +1204,13 @@ _cairo_type1_subset_init (cairo_type1_subset_t *type1_subset, if (status) goto fail1; - type1_subset->base_font = strdup (font->base.base_font); + if (font->base.base_font) { + type1_subset->base_font = strdup (font->base.base_font); + } else { + snprintf(buf, sizeof (buf), "CairoFont-%u-%u", + scaled_font_subset->font_id, scaled_font_subset->subset_id); + type1_subset->base_font = strdup (buf); + } if (type1_subset->base_font == NULL) goto fail1; diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h index a7af712..8580beb 100644 --- a/src/cairo-types-private.h +++ b/src/cairo-types-private.h @@ -41,6 +41,7 @@ /* This is the only header file not including cairoint.h. It only contains * typedefs.*/ #include "cairo.h" +#include "cairo-fixed-private.h" typedef struct _cairo_array cairo_array_t; typedef struct _cairo_hash_table cairo_hash_table_t; @@ -123,7 +124,8 @@ struct _cairo_cache { typedef enum _cairo_paginated_mode { CAIRO_PAGINATED_MODE_ANALYZE, /* analyze page regions */ - CAIRO_PAGINATED_MODE_RENDER /* render page contents */ + CAIRO_PAGINATED_MODE_RENDER, /* render page contents */ + CAIRO_PAGINATED_MODE_FALLBACK /* paint fallback images */ } cairo_paginated_mode_t; /* Sure wish C had a real enum type so that this would be distinct @@ -148,4 +150,172 @@ typedef enum _cairo_internal_surface_type { CAIRO_INTERNAL_SURFACE_TYPE_TEST_PAGINATED } cairo_internal_surface_type_t; +typedef struct _cairo_region cairo_region_t; + +typedef struct _cairo_point { + cairo_fixed_t x; + cairo_fixed_t y; +} cairo_point_t; + +typedef struct _cairo_slope +{ + cairo_fixed_t dx; + cairo_fixed_t dy; +} cairo_slope_t, cairo_distance_t; + +typedef struct _cairo_point_double { + double x; + double y; +} cairo_point_double_t; + +typedef struct _cairo_distance_double { + double dx; + double dy; +} cairo_distance_double_t; + +typedef struct _cairo_line { + cairo_point_t p1; + cairo_point_t p2; +} cairo_line_t, cairo_box_t; + +typedef struct _cairo_trapezoid { + cairo_fixed_t top, bottom; + cairo_line_t left, right; +} cairo_trapezoid_t; + +typedef struct _cairo_rectangle_int16 { + int16_t x, y; + uint16_t width, height; +} cairo_rectangle_int16_t, cairo_glyph_size_t; + +typedef struct _cairo_rectangle_int32 { + int32_t x, y; + uint32_t width, height; +} cairo_rectangle_int32_t; + +typedef struct _cairo_point_int16 { + int16_t x, y; +} cairo_point_int16_t; + +typedef struct _cairo_point_int32 { + int16_t x, y; +} cairo_point_int32_t; + +typedef struct _cairo_box_int16 { + cairo_point_int16_t p1; + cairo_point_int16_t p2; +} cairo_box_int16_t; + +typedef struct _cairo_box_int32 { + cairo_point_int32_t p1; + cairo_point_int32_t p2; +} cairo_box_int32_t; + + +#if CAIRO_FIXED_BITS == 32 && CAIRO_FIXED_FRAC_BITS >= 16 +typedef cairo_rectangle_int16_t cairo_rectangle_int_t; +typedef cairo_point_int16_t cairo_point_int_t; +typedef cairo_box_int16_t cairo_box_int_t; +#define CAIRO_RECT_INT_MIN INT16_MIN +#define CAIRO_RECT_INT_MAX INT16_MAX +#elif CAIRO_FIXED_BITS == 32 +typedef cairo_rectangle_int32_t cairo_rectangle_int_t; +typedef cairo_point_int32_t cairo_point_int_t; +typedef cairo_box_int32_t cairo_box_int_t; +#define CAIRO_RECT_INT_MIN INT32_MIN +#define CAIRO_RECT_INT_MAX INT32_MAX +#else +#error Not sure how to pick a cairo_rectangle_int_t for your CAIRO_FIXED_BITS! +#endif + +typedef enum _cairo_direction { + CAIRO_DIRECTION_FORWARD, + CAIRO_DIRECTION_REVERSE +} cairo_direction_t; + +typedef struct _cairo_path_fixed cairo_path_fixed_t; +typedef enum _cairo_clip_mode { + CAIRO_CLIP_MODE_PATH, + CAIRO_CLIP_MODE_REGION, + CAIRO_CLIP_MODE_MASK +} cairo_clip_mode_t; +typedef struct _cairo_clip_path cairo_clip_path_t; + +typedef struct _cairo_edge { + cairo_line_t edge; + int clockWise; + + cairo_fixed_t current_x; +} cairo_edge_t; + +typedef struct _cairo_polygon { + cairo_status_t status; + + cairo_point_t first_point; + cairo_point_t current_point; + cairo_bool_t has_current_point; + + int num_edges; + int edges_size; + cairo_edge_t *edges; + cairo_edge_t edges_embedded[8]; +} cairo_polygon_t; + +typedef struct _cairo_spline_knots { + cairo_point_t a, b, c, d; +} cairo_spline_knots_t; +typedef struct _cairo_spline { + cairo_spline_knots_t knots; + + cairo_slope_t initial_slope; + cairo_slope_t final_slope; + + int num_points; + int points_size; + cairo_point_t *points; + cairo_point_t points_embedded[8]; +} cairo_spline_t; + +typedef struct _cairo_pen_vertex { + cairo_point_t point; + + cairo_slope_t slope_ccw; + cairo_slope_t slope_cw; +} cairo_pen_vertex_t; + +typedef struct _cairo_pen { + double radius; + double tolerance; + + cairo_pen_vertex_t *vertices; + int num_vertices; +} cairo_pen_t; + +typedef struct _cairo_color cairo_color_t; +typedef struct _cairo_image_surface cairo_image_surface_t; + +typedef struct _cairo_stroke_style { + double line_width; + cairo_line_cap_t line_cap; + cairo_line_join_t line_join; + double miter_limit; + double *dash; + unsigned int num_dashes; + double dash_offset; +} cairo_stroke_style_t; + +typedef struct _cairo_format_masks { + int bpp; + unsigned long alpha_mask; + unsigned long red_mask; + unsigned long green_mask; + unsigned long blue_mask; +} cairo_format_masks_t; + +typedef enum { + CAIRO_STOCK_WHITE, + CAIRO_STOCK_BLACK, + CAIRO_STOCK_TRANSPARENT +} cairo_stock_t; + #endif /* CAIRO_TYPES_PRIVATE_H */ diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c index 2b224a3..18b9143 100644 --- a/src/cairo-unicode.c +++ b/src/cairo-unicode.c @@ -258,6 +258,7 @@ _cairo_utf8_to_ucs4 (const unsigned char *str, return CAIRO_STATUS_SUCCESS; } +#if CAIRO_HAS_UTF8_TO_UTF16 /** * _cairo_utf8_to_utf16: * @str: an UTF-8 string @@ -333,3 +334,4 @@ _cairo_utf8_to_utf16 (const unsigned char *str, return CAIRO_STATUS_SUCCESS; } +#endif diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index 9e46d23..19c494d 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -33,6 +33,15 @@ * Contributor(s): */ +#define WIN32_LEAN_AND_MEAN +/* We require Windows 2000 features such as GetGlyphIndices */ +#if !defined(WINVER) || (WINVER < 0x0500) +# define WINVER 0x0500 +#endif +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500) +# define _WIN32_WINNT 0x0500 +#endif + #include "cairoint.h" #include "cairo-win32-private.h" @@ -50,7 +59,7 @@ #define TT_PRIM_CSPLINE 3 #endif -#define OPENTYPE_CFF_TAG 0x20464643 +#define CMAP_TAG 0x70616d63 const cairo_scaled_font_backend_t cairo_win32_scaled_font_backend; @@ -99,10 +108,8 @@ typedef struct { HFONT scaled_hfont; HFONT unscaled_hfont; - cairo_bool_t is_truetype; - cairo_bool_t glyph_indexing; cairo_bool_t is_bitmap; - + cairo_bool_t is_type1; cairo_bool_t delete_scaled_hfont; } cairo_win32_scaled_font_t; @@ -571,6 +578,92 @@ _cairo_win32_scaled_font_fini (void *abstract_font) } static cairo_int_status_t +_cairo_win32_scaled_font_type1_text_to_glyphs (cairo_win32_scaled_font_t *scaled_font, + double x, + double y, + const char *utf8, + cairo_glyph_t **glyphs, + int *num_glyphs) +{ + uint16_t *utf16; + int n16; + int i; + WORD *glyph_indices = NULL; + cairo_status_t status = CAIRO_STATUS_SUCCESS; + double x_pos, y_pos; + HDC hdc = NULL; + cairo_matrix_t mat; + + status = _cairo_utf8_to_utf16 (utf8, -1, &utf16, &n16); + if (status) + return status; + + glyph_indices = _cairo_malloc_ab (n16 + 1, sizeof (WORD)); + if (!glyph_indices) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto FAIL1; + } + + hdc = _get_global_font_dc (); + if (!hdc) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto FAIL2; + } + + status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc); + if (status) + goto FAIL2; + + if (GetGlyphIndicesW (hdc, utf16, n16, glyph_indices, 0) == GDI_ERROR) { + status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_type1_text_to_glyphs:GetGlyphIndicesW"); + goto FAIL2; + } + + *num_glyphs = n16; + *glyphs = _cairo_malloc_ab (n16, sizeof (cairo_glyph_t)); + if (!*glyphs) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto FAIL2; + } + + x_pos = x; + y_pos = y; + mat = scaled_font->base.ctm; + cairo_matrix_invert (&mat); + for (i = 0; i < n16; i++) { + cairo_scaled_glyph_t *scaled_glyph; + + (*glyphs)[i].index = glyph_indices[i]; + (*glyphs)[i].x = x_pos; + (*glyphs)[i].y = y_pos; + + status = _cairo_scaled_glyph_lookup (&scaled_font->base, + glyph_indices[i], + CAIRO_SCALED_GLYPH_INFO_METRICS, + &scaled_glyph); + if (status) { + free (*glyphs); + goto FAIL2; + } + + x = scaled_glyph->x_advance; + y = scaled_glyph->y_advance; + cairo_matrix_transform_distance (&mat, &x, &y); + x_pos += x; + y_pos += y; + } + + cairo_win32_scaled_font_done_font (&scaled_font->base); + +FAIL2: + free (glyph_indices); +FAIL1: + free (utf16); + + return status; +} + +static cairo_int_status_t _cairo_win32_scaled_font_text_to_glyphs (void *abstract_font, double x, double y, @@ -590,6 +683,16 @@ _cairo_win32_scaled_font_text_to_glyphs (void *abstract_font, double x_incr, y_incr; HDC hdc = NULL; + /* GetCharacterPlacement() returns utf16 instead of glyph indices + * for Type 1 fonts. Use GetGlyphIndices for Type 1 fonts. */ + if (scaled_font->is_type1) + return _cairo_win32_scaled_font_type1_text_to_glyphs (scaled_font, + x, + y, + utf8, + glyphs, + num_glyphs); + /* Compute a vector in user space along the baseline of length one logical space unit */ x_incr = 1; y_incr = 0; @@ -747,16 +850,27 @@ _cairo_win32_scaled_font_set_metrics (cairo_win32_scaled_font_t *scaled_font) } - if (metrics.tmPitchAndFamily & TMPF_VECTOR) - scaled_font->is_bitmap = FALSE; - else - scaled_font->is_bitmap = TRUE; + scaled_font->is_bitmap = !(metrics.tmPitchAndFamily & TMPF_VECTOR); - scaled_font->is_truetype = (metrics.tmPitchAndFamily & TMPF_TRUETYPE) != 0; - scaled_font->glyph_indexing = scaled_font->is_truetype || - (GetFontData (hdc, OPENTYPE_CFF_TAG, 0, NULL, 0) != GDI_ERROR); - // XXX in what situations does this OPENTYPE_CFF thing not have the - // TMPF_TRUETYPE flag? GetFontData says it only works on Truetype fonts... + /* Need to determine if this is a Type 1 font for the special + * handling in _text_to_glyphs. Unlike TrueType or OpenType, + * Type1 fonts do not have a "cmap" table (or any other table). + * However GetFontData() will retrieve a Type1 font when + * requesting that GetFontData() retrieve data from the start of + * the file. This is to distinguish Type1 from stroke fonts such + * as "Script" and "Modern". The TMPF_TRUETYPE test is redundant + * but improves performance for the most common fonts. + */ + scaled_font->is_type1 = FALSE; + if (!(metrics.tmPitchAndFamily & TMPF_TRUETYPE) && + (metrics.tmPitchAndFamily & TMPF_VECTOR)) + { + if ((GetFontData (hdc, CMAP_TAG, 0, NULL, 0) == GDI_ERROR) && + (GetFontData (hdc, 0, 0, NULL, 0) != GDI_ERROR)) + { + scaled_font->is_type1 = TRUE; + } + } _cairo_scaled_font_set_metrics (&scaled_font->base, &extents); @@ -777,7 +891,7 @@ _cairo_win32_scaled_font_init_glyph_metrics (cairo_win32_scaled_font_t *scaled_f if (!hdc) return _cairo_error (CAIRO_STATUS_NO_MEMORY); - if (!scaled_font->is_truetype) { + if (scaled_font->is_bitmap) { /* GetGlyphOutline will not work. Assume that the glyph does not extend outside the font box. */ cairo_font_extents_t font_extents; INT width = 0; @@ -890,7 +1004,6 @@ _cairo_win32_scaled_font_glyph_bbox (void *abstract_font, GLYPHMETRICS metrics; cairo_status_t status; int i; - UINT glyph_index_option; if (!hdc) return _cairo_error (CAIRO_STATUS_NO_MEMORY); @@ -899,16 +1012,11 @@ _cairo_win32_scaled_font_glyph_bbox (void *abstract_font, if (status) return status; - if (scaled_font->glyph_indexing) - glyph_index_option = GGO_GLYPH_INDEX; - else - glyph_index_option = 0; - for (i = 0; i < num_glyphs; i++) { int x = _cairo_lround (glyphs[i].x); int y = _cairo_lround (glyphs[i].y); - GetGlyphOutlineW (hdc, glyphs[i].index, GGO_METRICS | glyph_index_option, + GetGlyphOutlineW (hdc, glyphs[i].index, GGO_METRICS | GGO_GLYPH_INDEX, &metrics, 0, NULL, &matrix); if (i == 0 || x1 > x + metrics.gmptGlyphOrigin.x) @@ -964,22 +1072,16 @@ _flush_glyphs (cairo_glyph_state_t *state) int dx = 0; WCHAR * elements; int * dx_elements; - UINT glyph_index_option; status = _cairo_array_append (&state->dx, &dx); if (status) return status; - if (state->scaled_font->glyph_indexing) - glyph_index_option = ETO_GLYPH_INDEX; - else - glyph_index_option = 0; - elements = _cairo_array_index (&state->glyphs, 0); dx_elements = _cairo_array_index (&state->dx, 0); if (!ExtTextOutW (state->hdc, state->start_x, state->last_y, - glyph_index_option, + ETO_GLYPH_INDEX, NULL, elements, state->glyphs.num_elements, @@ -1328,18 +1430,99 @@ _cairo_win32_scaled_font_load_truetype_table (void *abstract_font, return status; } -static void +static cairo_int_status_t _cairo_win32_scaled_font_map_glyphs_to_unicode (void *abstract_font, - cairo_scaled_font_subset_t *font_subset) + cairo_scaled_font_subset_t *font_subset) { cairo_win32_scaled_font_t *scaled_font = abstract_font; - unsigned int i; + GLYPHSET *glyph_set; + uint16_t *utf16 = NULL; + WORD *glyph_indices = NULL; + HDC hdc = NULL; + int res; + unsigned int i, j, k, count, num_glyphs; + cairo_status_t status = CAIRO_STATUS_SUCCESS; + + hdc = _get_global_font_dc (); + if (!hdc) + return _cairo_error (CAIRO_STATUS_NO_MEMORY); + + status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc); + if (status) + return status; + + res = GetFontUnicodeRanges(hdc, NULL); + if (res == 0) { + status = _cairo_win32_print_gdi_error ( + "_cairo_win32_scaled_font_map_glyphs_to_unicode:GetFontUnicodeRanges"); + goto fail1; + } + + glyph_set = malloc (res); + if (glyph_set == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto fail1; + } + + res = GetFontUnicodeRanges(hdc, glyph_set); + if (res == 0) { + status = _cairo_win32_print_gdi_error ( + "_cairo_win32_scaled_font_map_glyphs_to_unicode:GetFontUnicodeRanges"); + goto fail2; + } + + count = font_subset->num_glyphs; + for (i = 0; i < glyph_set->cRanges && count > 0; i++) { + num_glyphs = glyph_set->ranges[i].cGlyphs; + + utf16 = _cairo_malloc_ab (num_glyphs + 1, sizeof (uint16_t)); + if (utf16 == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto fail2; + } + + glyph_indices = _cairo_malloc_ab (num_glyphs + 1, sizeof (WORD)); + if (glyph_indices == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + goto fail2; + } + + for (j = 0; j < num_glyphs; j++) + utf16[j] = glyph_set->ranges[i].wcLow + j; + utf16[j] = 0; + + if (GetGlyphIndicesW (hdc, utf16, num_glyphs, glyph_indices, 0) == GDI_ERROR) { + status = _cairo_win32_print_gdi_error ( + "_cairo_win32_scaled_font_map_glyphs_to_unicode:GetGlyphIndicesW"); + goto fail2; + } - if (scaled_font->glyph_indexing) - return; + for (j = 0; j < num_glyphs; j++) { + for (k = 0; k < font_subset->num_glyphs; k++) { + if (font_subset->glyphs[k] == glyph_indices[j]) { + font_subset->to_unicode[k] = utf16[j]; + count--; + break; + } + } + } + + free (glyph_indices); + glyph_indices = NULL; + free (utf16); + utf16= NULL; + } - for (i = 0; i < font_subset->num_glyphs; i++) - font_subset->to_unicode[i] = font_subset->glyphs[i]; +fail2: + if (glyph_indices) + free (glyph_indices); + if (utf16) + free (utf16); + free (glyph_set); +fail1: + cairo_win32_scaled_font_done_font (&scaled_font->base); + + return status; } static cairo_status_t @@ -1411,7 +1594,6 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font cairo_path_fixed_t *path; cairo_matrix_t transform; cairo_fixed_t x, y; - UINT glyph_index_option; if (scaled_font->is_bitmap) return CAIRO_INT_STATUS_UNSUPPORTED; @@ -1435,13 +1617,8 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font if (status) goto CLEANUP_PATH; - if (scaled_font->glyph_indexing) - glyph_index_option = GGO_GLYPH_INDEX; - else - glyph_index_option = 0; - bytesGlyph = GetGlyphOutlineW (hdc, _cairo_scaled_glyph_index (scaled_glyph), - GGO_NATIVE | glyph_index_option, + GGO_NATIVE | GGO_GLYPH_INDEX, &metrics, 0, NULL, &matrix); if (bytesGlyph == GDI_ERROR) { @@ -1457,7 +1634,7 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font } if (GetGlyphOutlineW (hdc, _cairo_scaled_glyph_index (scaled_glyph), - GGO_NATIVE | glyph_index_option, + GGO_NATIVE | GGO_GLYPH_INDEX, &metrics, bytesGlyph, buffer, &matrix) == GDI_ERROR) { status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_glyph_path"); goto CLEANUP_BUFFER; diff --git a/src/cairo-win32-printing-surface.c b/src/cairo-win32-printing-surface.c index 57f1ab0..d589f23 100644 --- a/src/cairo-win32-printing-surface.c +++ b/src/cairo-win32-printing-surface.c @@ -71,7 +71,6 @@ #endif #define PELS_72DPI ((LONG)(72. / 0.0254)) -#define NIL_SURFACE ((cairo_surface_t*)&_cairo_surface_nil) static const cairo_surface_backend_t cairo_win32_printing_surface_backend; static const cairo_paginated_surface_backend_t cairo_win32_surface_paginated_backend; @@ -874,6 +873,7 @@ _cairo_win32_printing_surface_path_line_to (void *closure, cairo_point_t *point) { win32_path_info_t *path_info = closure; + path_info->surface->path_empty = FALSE; if (path_info->surface->has_ctm) { double x, y; @@ -899,6 +899,7 @@ _cairo_win32_printing_surface_path_curve_to (void *closure, win32_path_info_t *path_info = closure; POINT points[3]; + path_info->surface->path_empty = FALSE; if (path_info->surface->has_ctm) { double x, y; @@ -1244,6 +1245,7 @@ _cairo_win32_printing_surface_fill (void *abstract_surface, assert (_cairo_win32_printing_surface_operation_supported (surface, op, source)); + surface->path_empty = TRUE; BeginPath (surface->dc); status = _cairo_win32_printing_surface_emit_path (surface, path); EndPath (surface->dc); @@ -1266,7 +1268,7 @@ _cairo_win32_printing_surface_fill (void *abstract_surface, FillPath (surface->dc); _cairo_win32_printing_surface_done_solid_brush (surface); - } else { + } else if (surface->path_empty == FALSE) { SaveDC (surface->dc); SelectClipPath (surface->dc, RGN_AND); status = _cairo_win32_printing_surface_paint_pattern (surface, source); @@ -1358,6 +1360,7 @@ _cairo_win32_printing_surface_show_glyphs (void *abstract_surfac old_ctm = surface->ctm; old_has_ctm = surface->has_ctm; surface->has_ctm = TRUE; + surface->path_empty = TRUE; BeginPath (surface->dc); for (i = 0; i < num_glyphs; i++) { status = _cairo_scaled_glyph_lookup (scaled_font, @@ -1373,9 +1376,19 @@ _cairo_win32_printing_surface_show_glyphs (void *abstract_surfac EndPath (surface->dc); surface->ctm = old_ctm; surface->has_ctm = old_has_ctm; - if (status == CAIRO_STATUS_SUCCESS) { - SelectClipPath (surface->dc, RGN_AND); - status = _cairo_win32_printing_surface_paint_pattern (surface, source); + if (status == CAIRO_STATUS_SUCCESS && surface->path_empty == FALSE) { + if (source->type == CAIRO_PATTERN_TYPE_SOLID) { + status = _cairo_win32_printing_surface_select_solid_brush (surface, source); + if (status) + return status; + + SetPolyFillMode (surface->dc, WINDING); + FillPath (surface->dc); + _cairo_win32_printing_surface_done_solid_brush (surface); + } else { + SelectClipPath (surface->dc, RGN_AND); + status = _cairo_win32_printing_surface_paint_pattern (surface, source); + } } RestoreDC (surface->dc, -1); @@ -1453,15 +1466,12 @@ cairo_win32_printing_surface_create (HDC hdc) if (GetClipBox (hdc, &rect) == ERROR) { _cairo_win32_print_gdi_error ("cairo_win32_surface_create"); /* XXX: Can we make a more reasonable guess at the error cause here? */ - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NIL_SURFACE; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } surface = malloc (sizeof (cairo_win32_surface_t)); - if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NIL_SURFACE; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); surface->image = NULL; surface->format = CAIRO_FORMAT_RGB24; diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h index 0eff4d1..7857d18 100644 --- a/src/cairo-win32-private.h +++ b/src/cairo-win32-private.h @@ -83,6 +83,7 @@ typedef struct _cairo_win32_surface { /* printing surface bits */ cairo_paginated_mode_t paginated_mode; cairo_content_t content; + cairo_bool_t path_empty; cairo_bool_t has_ctm; cairo_matrix_t ctm; int clip_saved_dc; diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c index dd99b8f..881532b 100644 --- a/src/cairo-win32-surface.c +++ b/src/cairo-win32-surface.c @@ -67,7 +67,6 @@ #endif #define PELS_72DPI ((LONG)(72. / 0.0254)) -#define NIL_SURFACE ((cairo_surface_t*)&_cairo_surface_nil) static const cairo_surface_backend_t cairo_win32_surface_backend; @@ -91,7 +90,7 @@ _cairo_win32_print_gdi_error (const char *context) NULL, last_error, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &lpMsgBuf, + (LPSTR) &lpMsgBuf, 0, NULL)) { fprintf (stderr, "%s: Unknown GDI error", context); } else { @@ -333,10 +332,8 @@ _cairo_win32_surface_create_for_dc (HDC original_dc, int rowstride; surface = malloc (sizeof (cairo_win32_surface_t)); - if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NIL_SURFACE; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); status = _create_dc_and_bitmap (surface, original_dc, format, width, height, @@ -346,10 +343,9 @@ _cairo_win32_surface_create_for_dc (HDC original_dc, surface->image = cairo_image_surface_create_for_data (bits, format, width, height, rowstride); - if (surface->image->status) { - status = _cairo_error (CAIRO_STATUS_NO_MEMORY); + status = surface->image->status; + if (status) goto FAIL; - } surface->format = format; @@ -365,7 +361,7 @@ _cairo_win32_surface_create_for_dc (HDC original_dc, _cairo_surface_init (&surface->base, &cairo_win32_surface_backend, _cairo_content_from_format (format)); - return (cairo_surface_t *)surface; + return &surface->base; FAIL: if (surface->bitmap) { @@ -373,10 +369,9 @@ _cairo_win32_surface_create_for_dc (HDC original_dc, DeleteObject (surface->bitmap); DeleteDC (surface->dc); } - if (surface) - free (surface); + free (surface); - return NIL_SURFACE; + return _cairo_surface_create_in_error (status); } static cairo_surface_t * @@ -745,7 +740,7 @@ _composite_alpha_blend (cairo_win32_surface_t *dst, if (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId || os.dwMajorVersion != 4 || os.dwMinorVersion != 10) { - HMODULE msimg32_dll = LoadLibrary ("msimg32"); + HMODULE msimg32_dll = LoadLibraryA ("msimg32"); if (msimg32_dll != NULL) alpha_blend = (cairo_alpha_blend_func_t)GetProcAddress (msimg32_dll, @@ -1720,8 +1715,7 @@ cairo_win32_surface_create (HDC hdc) if (clipBoxType == ERROR) { _cairo_win32_print_gdi_error ("cairo_win32_surface_create"); /* XXX: Can we make a more reasonable guess at the error cause here? */ - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NIL_SURFACE; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } if (GetDeviceCaps(hdc, TECHNOLOGY) == DT_RASDISPLAY) { @@ -1738,18 +1732,15 @@ cairo_win32_surface_create (HDC hdc) format = CAIRO_FORMAT_A1; else { _cairo_win32_print_gdi_error("cairo_win32_surface_create(bad BITSPIXEL)"); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NIL_SURFACE; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); } } else { format = CAIRO_FORMAT_RGB24; } surface = malloc (sizeof (cairo_win32_surface_t)); - if (surface == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return NIL_SURFACE; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); surface->image = NULL; surface->format = format; @@ -1837,7 +1828,7 @@ cairo_win32_surface_create_with_ddb (HDC hdc, HBITMAP saved_dc_bitmap; if (format != CAIRO_FORMAT_RGB24) - return NIL_SURFACE; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT)); /* XXX handle these eventually format != CAIRO_FORMAT_A8 || format != CAIRO_FORMAT_A1) @@ -1853,7 +1844,7 @@ cairo_win32_surface_create_with_ddb (HDC hdc, ddb_dc = CreateCompatibleDC (hdc); if (ddb_dc == NULL) { _cairo_win32_print_gdi_error("CreateCompatibleDC"); - new_surf = (cairo_win32_surface_t*) NIL_SURFACE; + new_surf = (cairo_win32_surface_t*) _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); goto FINISH; } @@ -1866,7 +1857,7 @@ cairo_win32_surface_create_with_ddb (HDC hdc, * video memory is probably exhausted. */ _cairo_win32_print_gdi_error("CreateCompatibleBitmap"); - new_surf = (cairo_win32_surface_t*) NIL_SURFACE; + new_surf = (cairo_win32_surface_t*) _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); goto FINISH; } diff --git a/src/cairo-win32.c b/src/cairo-win32.c new file mode 100644 index 0000000..a656ff8 --- /dev/null +++ b/src/cairo-win32.c @@ -0,0 +1,98 @@ +/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ +/* Cairo - a vector graphics library with display and print output + * + * Copyright © 2007 Adrian Johnson + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Adrian Johnson. + * + * Contributor(s): + * Adrian Johnson <ajohnson@redneon.com> + */ + +#define WIN32_LEAN_AND_MEAN +/* We require Windows 2000 features such as ETO_PDY */ +#if !defined(WINVER) || (WINVER < 0x0500) +# define WINVER 0x0500 +#endif +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500) +# define _WIN32_WINNT 0x0500 +#endif + +#include "cairoint.h" + +#include <windows.h> +#include <io.h> + +/* tmpfile() replacment for Windows. + * + * On Windows tmpfile() creates the file in the root directory. This + * may fail due to unsufficient privileges. + */ +FILE * +_cairo_win32_tmpfile (void) +{ + DWORD path_len; + WCHAR path_name[MAX_PATH + 1]; + WCHAR file_name[MAX_PATH + 1]; + HANDLE handle; + int fd; + FILE *fp; + + path_len = GetTempPathW (MAX_PATH, path_name); + if (path_len <= 0 || path_len >= MAX_PATH) + return NULL; + + if (GetTempFileNameW (path_name, L"ps_", 0, file_name) == 0) + return NULL; + + handle = CreateFileW (file_name, + GENERIC_READ | GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, + NULL); + if (handle == INVALID_HANDLE_VALUE) { + DeleteFileW (file_name); + return NULL; + } + + fd = _open_osfhandle((intptr_t) handle, 0); + if (fd < 0) { + CloseHandle (handle); + return NULL; + } + + fp = fdopen(fd, "w+b"); + if (fp == NULL) { + _close(fd); + return NULL; + } + + return fp; +} diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c index 451cc8f..2b1f888 100644 --- a/src/cairo-xcb-surface.c +++ b/src/cairo-xcb-surface.c @@ -196,10 +196,8 @@ _cairo_xcb_surface_create_similar (void *abstract_src, cairo_xcb_surface_create_with_xrender_format (dpy, pixmap, src->screen, xrender_format, width, height); - if (surface->base.status) { - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (surface->base.status) + return surface; surface->owns_pixmap = TRUE; @@ -1730,10 +1728,8 @@ _cairo_xcb_surface_create_internal (xcb_connection_t *dpy, const xcb_render_query_version_reply_t *r; surface = malloc (sizeof (cairo_xcb_surface_t)); - if (surface == NULL) { - _cairo_error (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (surface == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); if (xrender_format) { depth = xrender_format->depth; @@ -1873,10 +1869,8 @@ cairo_xcb_surface_create (xcb_connection_t *c, { xcb_screen_t *screen = _cairo_xcb_screen_from_visual (c, visual); - if (screen == NULL) { - _cairo_error (CAIRO_STATUS_INVALID_VISUAL); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (screen == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_VISUAL)); return _cairo_xcb_surface_create_internal (c, drawable, screen, visual, NULL, diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c index efb53ba..8b1fa0a 100644 --- a/src/cairo-xlib-display.c +++ b/src/cairo-xlib-display.c @@ -34,6 +34,7 @@ #include "cairoint.h" #include "cairo-xlib-private.h" +#include "cairo-xlib-xrender-private.h" #include <fontconfig/fontconfig.h> @@ -292,7 +293,14 @@ _cairo_xlib_display_get (Display *dpy) display->buggy_repeat = FALSE; if (strstr (ServerVendor (dpy), "X.Org") != NULL) { - if (VendorRelease (dpy) <= 60802000) + /* When modularized, the X.Org server VendorRelease was + * bogusly reset to a very small number, without any change in + * the ServerVendor string. We avoid considering the new + * servers with the small number as buggy by restricting the + * test to known bad releases. But there could be a problem + * again in the future if X.Org server versions ever climb + * back up to 6.7 or 6.8. */ + if (VendorRelease (dpy) >= 60700000 && VendorRelease (dpy) <= 60802000) display->buggy_repeat = TRUE; } else if (strstr (ServerVendor (dpy), "XFree86") != NULL) { if (VendorRelease (dpy) <= 40500000) diff --git a/src/cairo-xlib-private.h b/src/cairo-xlib-private.h index 05c7d0e..3e04ecd 100644 --- a/src/cairo-xlib-private.h +++ b/src/cairo-xlib-private.h @@ -33,16 +33,12 @@ #ifndef CAIRO_XLIB_PRIVATE_H #define CAIRO_XLIB_PRIVATE_H -#include "cairoint.h" - #include "cairo-xlib.h" #include "cairo-compiler-private.h" #include "cairo-freelist-private.h" +#include "cairo-mutex-private.h" #include "cairo-reference-count-private.h" -#include "cairo-xlib-xrender-private.h" - -#include <X11/Xutil.h> /* for XDestroyImage */ typedef struct _cairo_xlib_display cairo_xlib_display_t; typedef struct _cairo_xlib_hook cairo_xlib_hook_t; diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c index 578a33a..f8d5936 100644 --- a/src/cairo-xlib-screen.c +++ b/src/cairo-xlib-screen.c @@ -55,6 +55,7 @@ #include "cairoint.h" #include "cairo-xlib-private.h" +#include "cairo-xlib-xrender-private.h" #include <fontconfig/fontconfig.h> diff --git a/src/cairo-xlib-surface-private.h b/src/cairo-xlib-surface-private.h index 3bbf43e..e5ccf90 100644 --- a/src/cairo-xlib-surface-private.h +++ b/src/cairo-xlib-surface-private.h @@ -34,6 +34,8 @@ #define CAIRO_XLIB_SURFACE_PRIVATE_H #include "cairo-xlib.h" +#include "cairo-xlib-private.h" +#include "cairo-xlib-xrender-private.h" #include "cairo-surface-private.h" diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index f5267e1..93cd6f8 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -42,6 +42,8 @@ #include "cairo-xlib-surface-private.h" #include "cairo-clip-private.h" +#include <X11/Xutil.h> /* for XDestroyImage */ + /* Xlib doesn't define a typedef, so define one ourselves */ typedef int (*cairo_xlib_error_func_t) (Display *display, XErrorEvent *event); @@ -69,6 +71,10 @@ _cairo_xlib_surface_show_glyphs (void *abstract_dst, int num_glyphs, cairo_scaled_font_t *scaled_font); +#if CAIRO_HAS_XLIB_XRENDER_SURFACE +slim_hidden_proto (cairo_xlib_surface_create_with_xrender_format); +#endif + /* * Instead of taking two round trips for each blending request, * assume that if a particular drawable fails GetImage that it will @@ -170,10 +176,9 @@ _cairo_xlib_surface_create_similar_with_format (void *abstract_src, cairo_xlib_surface_create_with_xrender_format (dpy, pix, src->screen, xrender_format, width, height); - if (surface->base.status != CAIRO_STATUS_SUCCESS) { + if (surface->base.status) { XFreePixmap (dpy, pix); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return &surface->base; } surface->owns_pixmap = TRUE; @@ -252,8 +257,7 @@ _cairo_xlib_surface_create_similar (void *abstract_src, width, height); if (surface->base.status != CAIRO_STATUS_SUCCESS) { XFreePixmap (src->dpy, pix); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return &surface->base; } surface->owns_pixmap = TRUE; @@ -1011,6 +1015,7 @@ _cairo_xlib_surface_set_attributes (cairo_xlib_surface_t *surface, break; case CAIRO_EXTEND_REFLECT: case CAIRO_EXTEND_PAD: + default: status = CAIRO_INT_STATUS_UNSUPPORTED; } if (status) @@ -1942,24 +1947,20 @@ _cairo_xlib_surface_create_internal (Display *dpy, cairo_xlib_screen_info_t *screen_info; screen_info = _cairo_xlib_screen_info_get (dpy, screen); - if (screen_info == NULL) { - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (screen_info == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); surface = malloc (sizeof (cairo_xlib_surface_t)); if (surface == NULL) { _cairo_xlib_screen_info_destroy (screen_info); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } if (! _cairo_xlib_add_close_display_hook (dpy, _cairo_xlib_surface_detach_display, surface, surface)) { free (surface); _cairo_xlib_screen_info_destroy (screen_info); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } if (xrender_format) { @@ -2089,10 +2090,8 @@ cairo_xlib_surface_create (Display *dpy, { Screen *screen = _cairo_xlib_screen_from_visual (dpy, visual); - if (screen == NULL) { - _cairo_error_throw (CAIRO_STATUS_INVALID_VISUAL); - return (cairo_surface_t*) &_cairo_surface_nil; - } + if (screen == NULL) + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_VISUAL)); CAIRO_MUTEX_INITIALIZE (); @@ -2423,11 +2422,22 @@ cairo_xlib_surface_get_height (cairo_surface_t *abstract_surface) return surface->height; } -typedef struct _cairo_xlib_surface_font_private { - Display *dpy; +enum { + GLYPHSET_INDEX_ARGB32, + GLYPHSET_INDEX_A8, + GLYPHSET_INDEX_A1, + NUM_GLYPHSETS +}; + +typedef struct _cairo_xlib_font_glyphset_info { GlyphSet glyphset; cairo_format_t format; XRenderPictFormat *xrender_format; +} cairo_xlib_font_glyphset_info_t; + +typedef struct _cairo_xlib_surface_font_private { + Display *dpy; + cairo_xlib_font_glyphset_info_t glyphset_info[NUM_GLYPHSETS]; } cairo_xlib_surface_font_private_t; static void @@ -2445,17 +2455,23 @@ _cairo_xlib_surface_remove_scaled_font (Display *dpy, CAIRO_MUTEX_UNLOCK (scaled_font->mutex); if (font_private != NULL) { - XRenderFreeGlyphSet (font_private->dpy, font_private->glyphset); + int i; + for (i = 0; i < NUM_GLYPHSETS; i++) { + cairo_xlib_font_glyphset_info_t *glyphset_info = &font_private->glyphset_info[i]; + if (glyphset_info->glyphset) { + XRenderFreeGlyphSet (font_private->dpy, glyphset_info->glyphset); + } + } free (font_private); } } static cairo_status_t _cairo_xlib_surface_font_init (Display *dpy, - cairo_scaled_font_t *scaled_font, - cairo_format_t format) + cairo_scaled_font_t *scaled_font) { cairo_xlib_surface_font_private_t *font_private; + int i; font_private = malloc (sizeof (cairo_xlib_surface_font_private_t)); if (!font_private) @@ -2470,9 +2486,18 @@ _cairo_xlib_surface_font_init (Display *dpy, font_private->dpy = dpy; - font_private->format = format; - font_private->xrender_format = _CAIRO_FORMAT_TO_XRENDER_FORMAT(dpy, format); - font_private->glyphset = XRenderCreateGlyphSet (dpy, font_private->xrender_format); + for (i = 0; i < NUM_GLYPHSETS; i++) { + cairo_xlib_font_glyphset_info_t *glyphset_info = &font_private->glyphset_info[i]; + switch (i) { + case GLYPHSET_INDEX_ARGB32: glyphset_info->format = CAIRO_FORMAT_ARGB32; break; + case GLYPHSET_INDEX_A8: glyphset_info->format = CAIRO_FORMAT_A8; break; + case GLYPHSET_INDEX_A1: glyphset_info->format = CAIRO_FORMAT_A1; break; + default: ASSERT_NOT_REACHED; break; + } + glyphset_info->xrender_format = NULL; + glyphset_info->glyphset = None; + } + scaled_font->surface_private = font_private; scaled_font->surface_backend = &cairo_xlib_surface_backend; @@ -2491,10 +2516,19 @@ _cairo_xlib_surface_scaled_font_fini (cairo_scaled_font_t *scaled_font) display = _cairo_xlib_display_get (font_private->dpy); if (display != NULL) { - cairo_status_t status = _cairo_xlib_display_queue_resource (display, - XRenderFreeGlyphSet, - font_private->glyphset); - (void) status; /* XXX cannot propagate failure */ + int i; + + for (i = 0; i < NUM_GLYPHSETS; i++) { + cairo_xlib_font_glyphset_info_t *glyphset_info = &font_private->glyphset_info[i]; + if (glyphset_info->glyphset) { + cairo_status_t status; + status = _cairo_xlib_display_queue_resource (display, + XRenderFreeGlyphSet, + glyphset_info->glyphset); + (void) status; /* XXX cannot propagate failure */ + } + } + _cairo_xlib_display_destroy (display); } @@ -2513,6 +2547,19 @@ static void _cairo_xlib_render_free_glyphs (Display *dpy, struct _cairo_xlib_ren &arg->glyph_index, 1); } +static cairo_xlib_font_glyphset_info_t * +_cairo_xlib_scaled_glyph_get_glyphset_info (cairo_scaled_glyph_t *scaled_glyph) +{ + return scaled_glyph->surface_private; +} + +static void +_cairo_xlib_scaled_glyph_set_glyphset_info (cairo_scaled_glyph_t *scaled_glyph, + cairo_xlib_font_glyphset_info_t *glyphset_info) +{ + scaled_glyph->surface_private = glyphset_info; +} + static void _cairo_xlib_surface_scaled_glyph_fini (cairo_scaled_glyph_t *scaled_glyph, cairo_scaled_font_t *scaled_font) @@ -2525,7 +2572,7 @@ _cairo_xlib_surface_scaled_glyph_fini (cairo_scaled_glyph_t *scaled_glyph, struct _cairo_xlib_render_free_glyphs *arg = malloc (sizeof (*arg)); if (arg != NULL) { cairo_status_t status; - arg->glyphset = font_private->glyphset; + arg->glyphset = _cairo_xlib_scaled_glyph_get_glyphset_info (scaled_glyph)->glyphset; arg->glyph_index = _cairo_scaled_glyph_index (scaled_glyph); status = _cairo_xlib_display_queue_work (display, (cairo_xlib_notify_func) _cairo_xlib_render_free_glyphs, @@ -2551,6 +2598,32 @@ _native_byte_order_lsb (void) return *((char *) &x) == 1; } +static cairo_xlib_font_glyphset_info_t * +_cairo_xlib_scaled_font_get_glyphset_info_for_format (cairo_scaled_font_t *scaled_font, + cairo_format_t format) +{ + cairo_xlib_surface_font_private_t *font_private = scaled_font->surface_private; + cairo_xlib_font_glyphset_info_t *glyphset_info; + int glyphset_index; + + switch (format) { + default: + case CAIRO_FORMAT_RGB24: + case CAIRO_FORMAT_ARGB32: glyphset_index = GLYPHSET_INDEX_ARGB32; break; + case CAIRO_FORMAT_A8: glyphset_index = GLYPHSET_INDEX_A8; break; + case CAIRO_FORMAT_A1: glyphset_index = GLYPHSET_INDEX_A1; break; + } + + glyphset_info = &font_private->glyphset_info[glyphset_index]; + + if (glyphset_info->glyphset == None) { + glyphset_info->xrender_format = _CAIRO_FORMAT_TO_XRENDER_FORMAT(font_private->dpy, glyphset_info->format); + glyphset_info->glyphset = XRenderCreateGlyphSet (font_private->dpy, glyphset_info->xrender_format); + } + + return glyphset_info; +} + static cairo_status_t _cairo_xlib_surface_add_glyph (Display *dpy, cairo_scaled_font_t *scaled_font, @@ -2564,6 +2637,7 @@ _cairo_xlib_surface_add_glyph (Display *dpy, cairo_scaled_glyph_t *scaled_glyph = *pscaled_glyph; cairo_image_surface_t *glyph_surface = scaled_glyph->surface; cairo_bool_t already_had_glyph_surface; + cairo_xlib_font_glyphset_info_t *glyphset_info; if (!glyph_surface) { @@ -2583,13 +2657,15 @@ _cairo_xlib_surface_add_glyph (Display *dpy, } if (scaled_font->surface_private == NULL) { - status = _cairo_xlib_surface_font_init (dpy, scaled_font, - glyph_surface->format); + status = _cairo_xlib_surface_font_init (dpy, scaled_font); if (status) return status; } font_private = scaled_font->surface_private; + glyphset_info = _cairo_xlib_scaled_font_get_glyphset_info_for_format (scaled_font, + glyph_surface->format); + /* If the glyph surface has zero height or width, we create * a clear 1x1 surface, to avoid various X server bugs. */ @@ -2597,7 +2673,7 @@ _cairo_xlib_surface_add_glyph (Display *dpy, cairo_t *cr; cairo_surface_t *tmp_surface; - tmp_surface = cairo_image_surface_create (font_private->format, 1, 1); + tmp_surface = cairo_image_surface_create (glyphset_info->format, 1, 1); cr = cairo_create (tmp_surface); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); cairo_paint (cr); @@ -2619,11 +2695,11 @@ _cairo_xlib_surface_add_glyph (Display *dpy, * create a temporary surface for the glyph image with the font's * format. */ - if (glyph_surface->format != font_private->format) { + if (glyph_surface->format != glyphset_info->format) { cairo_t *cr; cairo_surface_t *tmp_surface; - tmp_surface = cairo_image_surface_create (font_private->format, + tmp_surface = cairo_image_surface_create (glyphset_info->format, glyph_surface->width, glyph_surface->height); tmp_surface->device_transform = glyph_surface->base.device_transform; @@ -2719,11 +2795,13 @@ _cairo_xlib_surface_add_glyph (Display *dpy, glyph_index = _cairo_scaled_glyph_index (scaled_glyph); - XRenderAddGlyphs (dpy, font_private->glyphset, + XRenderAddGlyphs (dpy, glyphset_info->glyphset, &glyph_index, &(glyph_info), 1, (char *) data, glyph_surface->stride * glyph_surface->height); + _cairo_xlib_scaled_glyph_set_glyphset_info (scaled_glyph, glyphset_info); + if (data != glyph_surface->data) free (data); @@ -2773,19 +2851,23 @@ typedef struct { } p; } cairo_xlib_glyph_t; +/* compile-time assert that cairo_xlib_glyph_t is the same size as cairo_glyph_t */ +typedef int cairo_xlib_glyph_t_size_assertion [sizeof (cairo_xlib_glyph_t) == sizeof (cairo_glyph_t) ? 1 : -1]; + #define GLYPH_INDEX_SKIP ((unsigned long) -1) -#define STACK_ELTS_LEN ((int) (CAIRO_STACK_BUFFER_SIZE / sizeof (XGlyphElt8))) static cairo_status_t _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, cairo_xlib_glyph_t *glyphs, int num_glyphs, - int width, - int num_elts, cairo_scaled_font_t *scaled_font, cairo_operator_t op, cairo_xlib_surface_t *src, - cairo_surface_attributes_t *attributes) + cairo_surface_attributes_t *attributes, + /* info for this chunk */ + int num_elts, + int width, + cairo_xlib_font_glyphset_info_t *glyphset_info) { /* Which XRenderCompositeText function to use */ cairo_xrender_composite_text_func_t composite_text_func; @@ -2793,7 +2875,7 @@ _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, /* Element buffer stuff */ XGlyphElt8 *elts; - XGlyphElt8 stack_elts[STACK_ELTS_LEN]; + XGlyphElt8 stack_elts[CAIRO_STACK_ARRAY_LENGTH (XGlyphElt8)]; /* Reuse the input glyph array for output char generation */ char *char8 = (char *) glyphs; @@ -2805,8 +2887,6 @@ _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, int n; /* Num output glyphs in current element */ int j; /* Num output glyphs so far */ - cairo_xlib_surface_font_private_t *font_private = scaled_font->surface_private; - switch (width) { case 1: /* don't cast the 8-variant, to catch possible mismatches */ @@ -2824,7 +2904,7 @@ _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, } /* Allocate element array */ - if (num_elts <= STACK_ELTS_LEN) { + if (num_elts <= ARRAY_LENGTH (stack_elts)) { elts = stack_elts; } else { elts = _cairo_malloc_ab (num_elts, sizeof (XGlyphElt8)); @@ -2851,7 +2931,7 @@ _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, n = 0; } elts[nelt].chars = char8 + size * j; - elts[nelt].glyphset = font_private->glyphset; + elts[nelt].glyphset = glyphset_info->glyphset; elts[nelt].xOff = glyphs[i].p.i.x; elts[nelt].yOff = glyphs[i].p.i.y; } @@ -2877,7 +2957,7 @@ _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, _render_operator (op), src->src_picture, dst->dst_picture, - font_private->xrender_format, + glyphset_info->xrender_format, attributes->x_offset + elts[0].xOff, attributes->y_offset + elts[0].yOff, elts[0].xOff, elts[0].yOff, @@ -2889,8 +2969,6 @@ _cairo_xlib_surface_emit_glyphs_chunk (cairo_xlib_surface_t *dst, return CAIRO_STATUS_SUCCESS; } -#undef STACK_ELTS_LEN - static cairo_status_t _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, cairo_xlib_glyph_t *glyphs, @@ -2904,6 +2982,7 @@ _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, cairo_status_t status = CAIRO_STATUS_SUCCESS; cairo_scaled_glyph_t *scaled_glyph; cairo_fixed_t x = 0, y = 0; + cairo_xlib_font_glyphset_info_t *glyphset_info = NULL, *this_glyphset_info; unsigned long max_index = 0; int width = 1; @@ -2954,6 +3033,19 @@ _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, continue; } + /* Send unsent glyphs to the server */ + if (_cairo_xlib_scaled_glyph_get_glyphset_info (scaled_glyph) == NULL) { + status = _cairo_xlib_surface_add_glyph (dst->dpy, + scaled_font, + &scaled_glyph); + if (status) + return status; + } + + this_glyphset_info = _cairo_xlib_scaled_glyph_get_glyphset_info (scaled_glyph); + if (!glyphset_info) + glyphset_info = this_glyphset_info; + old_width = width; /* Update max glyph index */ @@ -2969,11 +3061,20 @@ _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, /* If we will pass the max request size by adding this glyph, * flush current glyphs. Note that we account for a - * possible element being added below. */ - if (request_size + width > max_request_size - sz_xGlyphElt) { + * possible element being added below. + * + * Also flush if changing glyphsets, as Xrender limits one mask + * format per request, so we can either break up, or use a + * wide-enough mask format. We do the former. One reason to + * prefer the latter is the fact that Xserver ADDs all glyphs + * to the mask first, and then composes that to final surface, + * though it's not a big deal. + */ + if (request_size + width > max_request_size - sz_xGlyphElt || + (this_glyphset_info != glyphset_info)) { status = _cairo_xlib_surface_emit_glyphs_chunk (dst, glyphs, i, - old_width, num_elts, - scaled_font, op, src, attributes); + scaled_font, op, src, attributes, + num_elts, old_width, glyphset_info); if (status != CAIRO_STATUS_SUCCESS) return status; @@ -2986,7 +3087,7 @@ _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, num_elts = 0; num_out_glyphs = 0; x = y = 0; - + glyphset_info = this_glyphset_info; } /* Convert absolute glyph position to relative-to-current-point @@ -3001,16 +3102,6 @@ _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, request_size += sz_xGlyphElt; } - /* Send unsent glyphs to the server */ - if (scaled_glyph->surface_private == NULL) { - status = _cairo_xlib_surface_add_glyph (dst->dpy, - scaled_font, - &scaled_glyph); - if (status) - return status; - scaled_glyph->surface_private = (void *) 1; - } - /* adjust current-position */ x = this_x + scaled_glyph->x_advance; y = this_y + scaled_glyph->y_advance; @@ -3021,8 +3112,8 @@ _cairo_xlib_surface_emit_glyphs (cairo_xlib_surface_t *dst, if (num_elts) status = _cairo_xlib_surface_emit_glyphs_chunk (dst, glyphs, num_glyphs, - width, num_elts, - scaled_font, op, src, attributes); + scaled_font, op, src, attributes, + num_elts, width, glyphset_info); return status; } diff --git a/src/cairo-xlib-xrender-private.h b/src/cairo-xlib-xrender-private.h index db27c24..11bbbeb 100644 --- a/src/cairo-xlib-xrender-private.h +++ b/src/cairo-xlib-xrender-private.h @@ -33,12 +33,9 @@ #ifndef CAIRO_XLIB_XRENDER_PRIVATE_H #define CAIRO_XLIB_XRENDER_PRIVATE_H -#include "cairoint.h" - #if CAIRO_HAS_XLIB_XRENDER_SURFACE #include "cairo-xlib-xrender.h" -slim_hidden_proto (cairo_xlib_surface_create_with_xrender_format); #include <X11/extensions/Xrender.h> #include <X11/extensions/renderproto.h> diff --git a/src/cairo-xlib-xrender.h b/src/cairo-xlib-xrender.h index f5c35dc..572049d 100644 --- a/src/cairo-xlib-xrender.h +++ b/src/cairo-xlib-xrender.h @@ -39,7 +39,7 @@ #include <cairo.h> -#if CAIRO_HAS_XLIB_SURFACE +#if CAIRO_HAS_XLIB_XRENDER_SURFACE #include <X11/Xlib.h> #include <X11/extensions/Xrender.h> @@ -56,8 +56,8 @@ cairo_xlib_surface_create_with_xrender_format (Display *dpy, CAIRO_END_DECLS -#else /* CAIRO_HAS_XLIB_SURFACE */ -# error Cairo was not compiled with support for the xlib backend -#endif /* CAIRO_HAS_XLIB_SURFACE */ +#else /* CAIRO_HAS_XLIB_XRENDER_SURFACE */ +# error Cairo was not compiled with support for the xlib XRender backend +#endif /* CAIRO_HAS_XLIB_XRENDER_SURFACE */ #endif /* CAIRO_XLIB_XRENDER_H */ diff --git a/src/cairo.c b/src/cairo.c index a319792..676aeb1 100644 --- a/src/cairo.c +++ b/src/cairo.c @@ -67,7 +67,7 @@ static const cairo_t _cairo_nil = { * a bit of a pain, but it should be easy to always catch as long as * one adds a new test case to test a trigger of the new status value. */ -#define CAIRO_STATUS_LAST_STATUS CAIRO_STATUS_INVALID_INDEX +#define CAIRO_STATUS_LAST_STATUS CAIRO_STATUS_TEMP_FILE_ERROR /** * _cairo_error: @@ -3019,6 +3019,9 @@ cairo_text_path (cairo_t *cr, const char *utf8) if (cr->status) return; + if (utf8 == NULL) + return; + cairo_get_current_point (cr, &x, &y); status = _cairo_gstate_text_to_glyphs (cr->gstate, utf8, @@ -3076,6 +3079,9 @@ cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs) if (cr->status) return; + if (num_glyphs == 0) + return; + status = _cairo_gstate_glyph_path (cr->gstate, glyphs, num_glyphs, cr->path); @@ -3317,7 +3323,7 @@ cairo_surface_t * cairo_get_target (cairo_t *cr) { if (cr->status) - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (cr->status); return _cairo_gstate_get_original_target (cr->gstate); } @@ -3326,17 +3332,19 @@ cairo_get_target (cairo_t *cr) * cairo_get_group_target: * @cr: a cairo context * - * Gets the target surface for the current group as started by the - * most recent call to cairo_push_group() or - * cairo_push_group_with_content(). + * Gets the current destination surface for the context. This is either + * the original target surface as passed to cairo_create() or the target + * surface for the current group as started by the most recent call to + * cairo_push_group() or cairo_push_group_with_content(). * - * This function will return NULL if called "outside" of any group - * rendering blocks, (that is, after the last balancing call to - * cairo_pop_group() or cairo_pop_group_to_source()). + * This function will always return a valid pointer, but the result + * can be a "nil" surface if @cr is already in an error state, + * (ie. cairo_status() <literal>!=</literal> %CAIRO_STATUS_SUCCESS). + * A nil surface is indicated by cairo_surface_status() + * <literal>!=</literal> %CAIRO_STATUS_SUCCESS. * - * Return value: the target group surface, or NULL if none. This - * object is owned by cairo. To keep a reference to it, you must call - * cairo_surface_reference(). + * Return value: the target surface. This object is owned by cairo. To + * keep a reference to it, you must call cairo_surface_reference(). * * Since: 1.2 **/ @@ -3344,7 +3352,7 @@ cairo_surface_t * cairo_get_group_target (cairo_t *cr) { if (cr->status) - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (cr->status); return _cairo_gstate_get_target (cr->gstate); } @@ -3551,6 +3559,8 @@ cairo_status_to_string (cairo_status_t status) return "invalid index passed to getter"; case CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: return "clip region not representable in desired format"; + case CAIRO_STATUS_TEMP_FILE_ERROR: + return "error creating or writing to a temporary file"; } return "<unknown error status>"; diff --git a/src/cairo.h b/src/cairo.h index 65d8b36..4c58c14 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -201,6 +201,7 @@ typedef struct _cairo_user_data_key { * @CAIRO_STATUS_INVALID_DSC_COMMENT: invalid value for a DSC comment (Since 1.2) * @CAIRO_STATUS_INVALID_INDEX: invalid index passed to getter (Since 1.4) * @CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: clip region not representable in desired format (Since 1.4) + * @CAIRO_STATUS_TEMP_FILE_ERROR: error creating or writing to a temporary file (Since 1.6) * * #cairo_status_t is used to indicate errors that can occur when * using Cairo. In some cases it is returned directly by functions. @@ -233,7 +234,9 @@ typedef enum _cairo_status { CAIRO_STATUS_INVALID_DASH, CAIRO_STATUS_INVALID_DSC_COMMENT, CAIRO_STATUS_INVALID_INDEX, - CAIRO_STATUS_CLIP_NOT_REPRESENTABLE + CAIRO_STATUS_CLIP_NOT_REPRESENTABLE, + CAIRO_STATUS_TEMP_FILE_ERROR + /* after adding a new error: update CAIRO_STATUS_LAST_STATUS in cairo.c */ } cairo_status_t; /** diff --git a/src/cairoint.h b/src/cairoint.h index bde8f6b..889862d 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -81,6 +81,12 @@ CAIRO_BEGIN_DECLS +#ifdef _WIN32 +cairo_private FILE * +_cairo_win32_tmpfile (void); +#define tmpfile() _cairo_win32_tmpfile() +#endif + #undef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) @@ -109,6 +115,8 @@ CAIRO_BEGIN_DECLS #define CAIRO_STACK_BUFFER_SIZE (512 * sizeof (int)) #endif +#define CAIRO_STACK_ARRAY_LENGTH(T) (CAIRO_STACK_BUFFER_SIZE / sizeof(T)) + #define ASSERT_NOT_REACHED \ do { \ static const int NOT_REACHED = 0; \ @@ -170,152 +178,8 @@ be32_to_cpu(uint32_t v) #include "cairo-types-private.h" #include "cairo-cache-private.h" -#include "cairo-fixed-private.h" #include "cairo-reference-count-private.h" -typedef struct _cairo_region cairo_region_t; - -typedef struct _cairo_point { - cairo_fixed_t x; - cairo_fixed_t y; -} cairo_point_t; - -typedef struct _cairo_slope -{ - cairo_fixed_t dx; - cairo_fixed_t dy; -} cairo_slope_t, cairo_distance_t; - -typedef struct _cairo_point_double { - double x; - double y; -} cairo_point_double_t; - -typedef struct _cairo_distance_double { - double dx; - double dy; -} cairo_distance_double_t; - -typedef struct _cairo_line { - cairo_point_t p1; - cairo_point_t p2; -} cairo_line_t, cairo_box_t; - -typedef struct _cairo_trapezoid { - cairo_fixed_t top, bottom; - cairo_line_t left, right; -} cairo_trapezoid_t; - -typedef struct _cairo_rectangle_int16 { - int16_t x, y; - uint16_t width, height; -} cairo_rectangle_int16_t, cairo_glyph_size_t; - -typedef struct _cairo_rectangle_int32 { - int32_t x, y; - uint32_t width, height; -} cairo_rectangle_int32_t; - -typedef struct _cairo_point_int16 { - int16_t x, y; -} cairo_point_int16_t; - -typedef struct _cairo_point_int32 { - int16_t x, y; -} cairo_point_int32_t; - -typedef struct _cairo_box_int16 { - cairo_point_int16_t p1; - cairo_point_int16_t p2; -} cairo_box_int16_t; - -typedef struct _cairo_box_int32 { - cairo_point_int32_t p1; - cairo_point_int32_t p2; -} cairo_box_int32_t; - -#if CAIRO_FIXED_BITS == 32 && CAIRO_FIXED_FRAC_BITS >= 16 -typedef cairo_rectangle_int16_t cairo_rectangle_int_t; -typedef cairo_point_int16_t cairo_point_int_t; -typedef cairo_box_int16_t cairo_box_int_t; -#define CAIRO_RECT_INT_MIN INT16_MIN -#define CAIRO_RECT_INT_MAX INT16_MAX -#elif CAIRO_FIXED_BITS == 32 -typedef cairo_rectangle_int32_t cairo_rectangle_int_t; -typedef cairo_point_int32_t cairo_point_int_t; -typedef cairo_box_int32_t cairo_box_int_t; -#define CAIRO_RECT_INT_MIN INT32_MIN -#define CAIRO_RECT_INT_MAX INT32_MAX -#else -#error Not sure how to pick a cairo_rectangle_int_t for your CAIRO_FIXED_BITS! -#endif - -typedef enum _cairo_direction { - CAIRO_DIRECTION_FORWARD, - CAIRO_DIRECTION_REVERSE -} cairo_direction_t; - -typedef struct _cairo_path_fixed cairo_path_fixed_t; -typedef enum _cairo_clip_mode { - CAIRO_CLIP_MODE_PATH, - CAIRO_CLIP_MODE_REGION, - CAIRO_CLIP_MODE_MASK -} cairo_clip_mode_t; -typedef struct _cairo_clip_path cairo_clip_path_t; - -typedef struct _cairo_edge { - cairo_line_t edge; - int clockWise; - - cairo_fixed_t current_x; -} cairo_edge_t; - -typedef struct _cairo_polygon { - cairo_status_t status; - - cairo_point_t first_point; - cairo_point_t current_point; - cairo_bool_t has_current_point; - - int num_edges; - int edges_size; - cairo_edge_t *edges; - cairo_edge_t edges_embedded[8]; -} cairo_polygon_t; - -typedef struct _cairo_spline_knots { - cairo_point_t a, b, c, d; -} cairo_spline_knots_t; -typedef struct _cairo_spline { - cairo_spline_knots_t knots; - - cairo_slope_t initial_slope; - cairo_slope_t final_slope; - - int num_points; - int points_size; - cairo_point_t *points; - cairo_point_t points_embedded[8]; -} cairo_spline_t; - -typedef struct _cairo_pen_vertex { - cairo_point_t point; - - cairo_slope_t slope_ccw; - cairo_slope_t slope_cw; -} cairo_pen_vertex_t; - -typedef struct _cairo_pen { - double radius; - double tolerance; - - cairo_pen_vertex_t *vertices; - int num_vertices; -} cairo_pen_t; - -typedef struct _cairo_color cairo_color_t; -typedef struct _cairo_image_surface cairo_image_surface_t; - cairo_private void _cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_int_t *rectangle); @@ -521,7 +385,7 @@ struct _cairo_scaled_font_backend { unsigned char *buffer, unsigned long *length); - void + cairo_warn cairo_int_status_t (*map_glyphs_to_unicode)(void *scaled_font, cairo_scaled_font_subset_t *font_subset); @@ -563,16 +427,6 @@ extern const cairo_private struct _cairo_scaled_font_backend cairo_atsui_scaled_ #endif -typedef struct _cairo_stroke_style { - double line_width; - cairo_line_cap_t line_cap; - cairo_line_join_t line_join; - double miter_limit; - double *dash; - unsigned int num_dashes; - double dash_offset; -} cairo_stroke_style_t; - struct _cairo_surface_backend { cairo_surface_type_t type; @@ -833,14 +687,6 @@ struct _cairo_surface_backend { cairo_antialias_t stroke_antialias); }; -typedef struct _cairo_format_masks { - int bpp; - unsigned long alpha_mask; - unsigned long red_mask; - unsigned long green_mask; - unsigned long blue_mask; -} cairo_format_masks_t; - #include "cairo-surface-private.h" struct _cairo_image_surface { @@ -880,12 +726,6 @@ struct _cairo_color { unsigned short alpha_short; }; -typedef enum { - CAIRO_STOCK_WHITE, - CAIRO_STOCK_BLACK, - CAIRO_STOCK_TRANSPARENT -} cairo_stock_t; - #define CAIRO_EXTEND_SURFACE_DEFAULT CAIRO_EXTEND_NONE #define CAIRO_EXTEND_GRADIENT_DEFAULT CAIRO_EXTEND_PAD #define CAIRO_FILTER_DEFAULT CAIRO_FILTER_BEST @@ -1007,6 +847,11 @@ typedef struct _cairo_traps { #define CAIRO_FONT_FAMILY_DEFAULT CAIRO_FT_FONT_FAMILY_DEFAULT #define CAIRO_SCALED_FONT_BACKEND_DEFAULT &cairo_ft_scaled_font_backend +#else + +/* Paranoia: this should have been caught by configure. */ +#error No font backends are available. + #endif #define CAIRO_GSTATE_OPERATOR_DEFAULT CAIRO_OPERATOR_OVER @@ -1513,7 +1358,7 @@ _cairo_path_fixed_interpret (cairo_path_fixed_t *path, cairo_path_fixed_close_path_func_t *close_path, void *closure); -cairo_private cairo_status_t +cairo_private void _cairo_path_fixed_bounds (cairo_path_fixed_t *path, double *x1, double *y1, double *x2, double *y2); @@ -1631,10 +1476,8 @@ _cairo_stroke_style_fini (cairo_stroke_style_t *style); /* cairo-surface.c */ -extern const cairo_private cairo_surface_t _cairo_surface_nil; -extern const cairo_private cairo_surface_t _cairo_surface_nil_read_error; -extern const cairo_private cairo_surface_t _cairo_surface_nil_write_error; -extern const cairo_private cairo_surface_t _cairo_surface_nil_file_not_found; +cairo_private cairo_surface_t * +_cairo_surface_create_in_error (cairo_status_t status); cairo_private cairo_status_t _cairo_surface_set_error (cairo_surface_t *surface, @@ -1951,6 +1794,9 @@ _cairo_surface_has_device_transform (cairo_surface_t *surface); == 0)) cairo_private cairo_format_t +_cairo_format_width (cairo_format_t format); + +cairo_private cairo_format_t _cairo_format_from_content (cairo_content_t content); cairo_private cairo_content_t @@ -2215,6 +2061,10 @@ _cairo_slope_counter_clockwise (cairo_slope_t *a, cairo_slope_t *b); /* cairo_pattern.c */ cairo_private cairo_status_t +_cairo_pattern_create_copy (cairo_pattern_t **pattern, + const cairo_pattern_t *other); + +cairo_private cairo_status_t _cairo_pattern_init_copy (cairo_pattern_t *pattern, const cairo_pattern_t *other); @@ -2309,11 +2159,16 @@ _cairo_utf8_to_ucs4 (const unsigned char *str, uint32_t **result, int *items_written); +#if CAIRO_HAS_WIN32_FONT+0 || CAIRO_HAS_ATSUI_FONT+0 +# define CAIRO_HAS_UTF8_TO_UTF16 1 +#endif +#if CAIRO_HAS_UTF8_TO_UTF16 cairo_private cairo_status_t _cairo_utf8_to_utf16 (const unsigned char *str, int len, uint16_t **result, int *items_written); +#endif cairo_private cairo_status_t _cairo_error (cairo_status_t status); diff --git a/src/check-cairoint.sh b/src/check-cairoint.sh index 05ba8ea..ef4e57e 100755 --- a/src/check-cairoint.sh +++ b/src/check-cairoint.sh @@ -12,6 +12,6 @@ while read x; do grep '\<include\>' "$x" /dev/null | head -n 1 done | grep -v '"cairoint.h"' | -grep . && status = 1 +grep . && status=1 exit $status diff --git a/src/check-def.sh b/src/check-def.sh index 6f4d3f3..a7aa131 100755 --- a/src/check-def.sh +++ b/src/check-def.sh @@ -8,15 +8,22 @@ if ! which nm 2>/dev/null >/dev/null; then fi test -z "$srcdir" && srcdir=. +test -z "$MAKE" && MAKE=make status=0 +$MAKE check-has-hidden-symbols.i || exit 1 +if tail -1 check-has-hidden-symbols.i | grep CAIRO_HAS_HIDDEN_SYMBOLS >/dev/null; then + echo "Compiler doesn't support symbol visibility; skipping test" + exit 0 +fi + get_cairo_syms='nm "$so" | grep " T " | cut -d" " -f3' if [ "`uname -s`" = "Linux" ]; then get_cairo_syms='objdump -t "$so" | sed -n "/.*g *F *\.\(opd\|text\).* \(.*cairo_.*\)$/s//\2/p"' fi defs="cairo.def" -make $defs +$MAKE $defs for def in $defs; do lib=`echo "$def" | sed 's/[.]def$//'` lib=`echo "$lib" | sed 's@.*/@@'` diff --git a/src/check-has-hidden-symbols.c b/src/check-has-hidden-symbols.c new file mode 100644 index 0000000..1204127 --- /dev/null +++ b/src/check-has-hidden-symbols.c @@ -0,0 +1,3 @@ +#include "cairoint.h" + +CAIRO_HAS_HIDDEN_SYMBOLS diff --git a/src/check-plt.sh b/src/check-plt.sh index 887370c..82ea6de 100755 --- a/src/check-plt.sh +++ b/src/check-plt.sh @@ -2,13 +2,21 @@ LANG=C -status=0 - if ! which readelf 2>/dev/null >/dev/null; then echo "'readelf' not found; skipping test" exit 0 fi +test -z "$srcdir" && srcdir=. +test -z "$MAKE" && MAKE=make +status=0 + +$MAKE check-has-hidden-symbols.i || exit 1 +if tail -1 check-has-hidden-symbols.i | grep CAIRO_HAS_HIDDEN_SYMBOLS >/dev/null; then + echo "Compiler doesn't support symbol visibility; skipping test" + exit 0 +fi + for so in .libs/lib*.so; do echo Checking "$so" for local PLT entries readelf -W -r "$so" | grep 'JU\?MP_SLO' | grep 'cairo' && status=1 diff --git a/src/test-fallback-surface.c b/src/test-fallback-surface.c index f56db45..0bac87e 100644 --- a/src/test-fallback-surface.c +++ b/src/test-fallback-surface.c @@ -76,13 +76,12 @@ _cairo_test_fallback_surface_create (cairo_content_t content, backing = _cairo_image_surface_create_with_content (content, width, height); if (cairo_surface_status (backing)) - return (cairo_surface_t*) &_cairo_surface_nil; + return backing; surface = malloc (sizeof (test_fallback_surface_t)); if (surface == NULL) { cairo_surface_destroy (backing); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } _cairo_surface_init (&surface->base, &test_fallback_surface_backend, diff --git a/src/test-meta-surface.c b/src/test-meta-surface.c index 4c08601..e56efcc 100644 --- a/src/test-meta-surface.c +++ b/src/test-meta-surface.c @@ -74,21 +74,26 @@ _cairo_test_meta_surface_create (cairo_content_t content, int height) { test_meta_surface_t *surface; + cairo_status_t status; surface = malloc (sizeof (test_meta_surface_t)); - if (surface == NULL) + if (surface == NULL) { + status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto FAIL; + } _cairo_surface_init (&surface->base, &test_meta_surface_backend, content); surface->meta = _cairo_meta_surface_create (content, width, height); - if (cairo_surface_status (surface->meta)) + status = cairo_surface_status (surface->meta); + if (status) goto FAIL_CLEANUP_SURFACE; surface->image = _cairo_image_surface_create_with_content (content, width, height); - if (cairo_surface_status (surface->image)) + status = cairo_surface_status (surface->image); + if (status) goto FAIL_CLEANUP_META; surface->image_reflects_meta = FALSE; @@ -100,8 +105,7 @@ _cairo_test_meta_surface_create (cairo_content_t content, FAIL_CLEANUP_SURFACE: free (surface); FAIL: - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); } static cairo_status_t @@ -309,7 +313,7 @@ _test_meta_surface_snapshot (void *abstract_other) status = _cairo_surface_get_extents (other->image, &extents); if (status) - return (cairo_surface_t*) &_cairo_surface_nil; + return _cairo_surface_create_in_error (status); surface = cairo_surface_create_similar (other->image, CAIRO_CONTENT_COLOR_ALPHA, @@ -319,7 +323,7 @@ _test_meta_surface_snapshot (void *abstract_other) status = _cairo_meta_surface_replay (other->meta, surface); if (status) { cairo_surface_destroy (surface); - surface = (cairo_surface_t*) &_cairo_surface_nil; + surface = _cairo_surface_create_in_error (status); } return surface; diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c index 7d341ad..f640b60 100644 --- a/src/test-paginated-surface.c +++ b/src/test-paginated-surface.c @@ -77,13 +77,12 @@ _cairo_test_paginated_surface_create_for_data (unsigned char *data, stride); status = cairo_surface_status (target); if (status) - return (cairo_surface_t *) &_cairo_surface_nil; + return target; surface = malloc (sizeof (test_paginated_surface_t)); if (surface == NULL) { cairo_surface_destroy (target); - _cairo_error_throw (CAIRO_STATUS_NO_MEMORY); - return (cairo_surface_t *) &_cairo_surface_nil; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } _cairo_surface_init (&surface->base, &test_paginated_surface_backend, diff --git a/test/Makefile.am b/test/Makefile.am index ec2d028..805ac16 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,128 +1,130 @@ SUBDIRS=pdiff . # Here are all the tests that are run unconditionally -TESTS = \ -a8-mask \ -big-trap \ -caps-joins \ -caps-joins-alpha \ -caps-sub-paths \ -clip-all \ -clip-empty \ -clip-fill-rule \ -clip-fill-rule-pixel-aligned \ -clip-nesting \ -clip-operator \ -clip-push-group \ -clip-twice \ -clip-zero \ -close-path \ -composite-integer-translate-source \ -composite-integer-translate-over \ -composite-integer-translate-over-repeat \ -copy-path \ -create-for-stream \ -create-from-png \ -create-from-png-stream \ -dash-caps-joins \ -dash-no-dash \ -dash-offset-negative \ -dash-scale \ -dash-zero-length \ -dash-state \ -degenerate-path \ -degenerate-pen \ -device-offset \ -device-offset-positive \ -extend-pad \ -fill-and-stroke \ -fill-and-stroke-alpha \ -fill-and-stroke-alpha-add \ -fill-degenerate-sort-order \ -fill-missed-stop \ -fill-rule \ -filter-nearest-offset \ -font-face-get-type \ -font-matrix-translation \ -glyph-cache-pressure \ -get-and-set \ -get-clip \ -get-group-target \ -get-path-extents \ -gradient-alpha \ -infinite-join \ -in-fill-empty-trapezoid \ -invalid-matrix \ -leaky-dash \ -leaky-polygon \ -line-width \ -line-width-scale \ -line-width-zero \ -linear-gradient \ -linear-gradient-reflect \ -long-lines \ -mask \ -mask-alpha \ -mask-ctm \ -mask-surface-ctm \ -meta-surface-pattern \ -move-to-show-surface \ -new-sub-path \ -nil-surface \ -operator-clear \ -operator-source \ -over-above-source \ -over-around-source \ -over-below-source \ -over-between-source \ -paint \ -paint-repeat \ -paint-source-alpha \ -paint-with-alpha \ -pattern-get-type \ -pattern-getters \ -pixman-rotate \ -radial-gradient \ -random-intersections \ -rectangle-rounding-error \ -rectilinear-stroke \ -rgb24-ignore-alpha \ -rotate-image-surface-paint \ -scale-down-source-surface-paint \ -scale-source-surface-paint \ -select-font-face \ -select-font-no-show-text \ -self-copy \ -self-intersecting \ -set-source \ -show-text-current-point \ -skew-extreme \ -solid-pattern-cache-stress \ -source-clip \ -source-clip-scale \ -source-surface-scale-paint \ -surface-finish-twice \ -surface-pattern \ -surface-pattern-big-scale-down \ -surface-pattern-scale-down \ -surface-pattern-scale-up \ -text-antialias-gray \ -text-antialias-none \ -text-antialias-subpixel \ -text-cache-crash \ -text-pattern \ -text-rotate \ -text-zero-len \ -transforms \ -translate-show-surface \ -trap-clip \ -truetype-tables \ -unantialiased-shapes \ -unbounded-operator \ -user-data \ -rel-path \ -push-group \ -zero-alpha +TESTS = \ +a8-mask$(EXEEXT) \ +big-trap$(EXEEXT) \ +caps-joins$(EXEEXT) \ +caps-joins-alpha$(EXEEXT) \ +caps-sub-paths$(EXEEXT) \ +clip-all$(EXEEXT) \ +clip-empty$(EXEEXT) \ +clip-fill-rule$(EXEEXT) \ +clip-fill-rule-pixel-aligned$(EXEEXT) \ +clip-nesting$(EXEEXT) \ +clip-operator$(EXEEXT) \ +clip-push-group$(EXEEXT) \ +clip-twice$(EXEEXT) \ +clip-zero$(EXEEXT) \ +close-path$(EXEEXT) \ +composite-integer-translate-source$(EXEEXT) \ +composite-integer-translate-over$(EXEEXT) \ +composite-integer-translate-over-repeat$(EXEEXT) \ +copy-path$(EXEEXT) \ +create-for-stream$(EXEEXT) \ +create-from-png$(EXEEXT) \ +create-from-png-stream$(EXEEXT) \ +dash-caps-joins$(EXEEXT) \ +dash-no-dash$(EXEEXT) \ +dash-offset-negative$(EXEEXT) \ +dash-scale$(EXEEXT) \ +dash-state$(EXEEXT) \ +dash-zero-length$(EXEEXT) \ +degenerate-path$(EXEEXT) \ +degenerate-pen$(EXEEXT) \ +device-offset$(EXEEXT) \ +device-offset-positive$(EXEEXT) \ +extend-pad$(EXEEXT) \ +fill-and-stroke$(EXEEXT) \ +fill-and-stroke-alpha$(EXEEXT) \ +fill-and-stroke-alpha-add$(EXEEXT) \ +fill-degenerate-sort-order$(EXEEXT) \ +fill-missed-stop$(EXEEXT) \ +fill-rule$(EXEEXT) \ +filter-nearest-offset$(EXEEXT) \ +font-face-get-type$(EXEEXT) \ +font-matrix-translation$(EXEEXT) \ +glyph-cache-pressure$(EXEEXT) \ +get-and-set$(EXEEXT) \ +get-clip$(EXEEXT) \ +get-group-target$(EXEEXT) \ +get-path-extents$(EXEEXT) \ +gradient-alpha$(EXEEXT) \ +gradient-zero-stops$(EXEEXT) \ +infinite-join$(EXEEXT) \ +in-fill-empty-trapezoid$(EXEEXT) \ +invalid-matrix$(EXEEXT) \ +leaky-dash$(EXEEXT) \ +leaky-polygon$(EXEEXT) \ +line-width$(EXEEXT) \ +line-width-scale$(EXEEXT) \ +line-width-zero$(EXEEXT) \ +linear-gradient$(EXEEXT) \ +linear-gradient-reflect$(EXEEXT) \ +long-lines$(EXEEXT) \ +mask$(EXEEXT) \ +mask-alpha$(EXEEXT) \ +mask-ctm$(EXEEXT) \ +mask-surface-ctm$(EXEEXT) \ +meta-surface-pattern$(EXEEXT) \ +miter-precision$(EXEEXT) \ +move-to-show-surface$(EXEEXT) \ +new-sub-path$(EXEEXT) \ +nil-surface$(EXEEXT) \ +operator-clear$(EXEEXT) \ +operator-source$(EXEEXT) \ +over-above-source$(EXEEXT) \ +over-around-source$(EXEEXT) \ +over-below-source$(EXEEXT) \ +over-between-source$(EXEEXT) \ +paint$(EXEEXT) \ +paint-repeat$(EXEEXT) \ +paint-source-alpha$(EXEEXT) \ +paint-with-alpha$(EXEEXT) \ +pattern-get-type$(EXEEXT) \ +pattern-getters$(EXEEXT) \ +pixman-rotate$(EXEEXT) \ +push-group$(EXEEXT) \ +radial-gradient$(EXEEXT) \ +random-intersections$(EXEEXT) \ +rectangle-rounding-error$(EXEEXT) \ +rectilinear-stroke$(EXEEXT) \ +rel-path$(EXEEXT) \ +rgb24-ignore-alpha$(EXEEXT) \ +rotate-image-surface-paint$(EXEEXT) \ +scale-down-source-surface-paint$(EXEEXT) \ +scale-source-surface-paint$(EXEEXT) \ +select-font-face$(EXEEXT) \ +select-font-no-show-text$(EXEEXT) \ +self-copy$(EXEEXT) \ +self-intersecting$(EXEEXT) \ +set-source$(EXEEXT) \ +show-text-current-point$(EXEEXT) \ +skew-extreme$(EXEEXT) \ +solid-pattern-cache-stress$(EXEEXT) \ +source-clip$(EXEEXT) \ +source-clip-scale$(EXEEXT) \ +source-surface-scale-paint$(EXEEXT) \ +surface-finish-twice$(EXEEXT) \ +surface-pattern$(EXEEXT) \ +surface-pattern-big-scale-down$(EXEEXT) \ +surface-pattern-scale-down$(EXEEXT) \ +surface-pattern-scale-up$(EXEEXT) \ +text-antialias-gray$(EXEEXT) \ +text-antialias-none$(EXEEXT) \ +text-antialias-subpixel$(EXEEXT) \ +text-cache-crash$(EXEEXT) \ +text-pattern$(EXEEXT) \ +text-rotate$(EXEEXT) \ +text-zero-len$(EXEEXT) \ +transforms$(EXEEXT) \ +translate-show-surface$(EXEEXT) \ +trap-clip$(EXEEXT) \ +truetype-tables$(EXEEXT) \ +unantialiased-shapes$(EXEEXT) \ +unbounded-operator$(EXEEXT) \ +user-data$(EXEEXT) \ +zero-alpha$(EXEEXT) # XXX: Here are some existing tests that are currently disabled for # one reason or another. They can still be built and run (manually) @@ -164,49 +166,50 @@ zero-alpha # suite, (in spite of the XFAIL status of the test). So maybe # that's just a bug in the test rig that should just consider # the abort an XFAIL like any other. -DISABLED_TESTS = \ -extend-reflect \ -show-glyphs-many \ -text-glyph-range +DISABLED_TESTS = \ +extend-reflect$(EXEEXT) \ +show-glyphs-many$(EXEEXT) \ +text-glyph-range$(EXEEXT) # Then we have a collection of tests that are only run if certain # features are compiled into cairo if HAVE_PTHREAD -TESTS += pthread-show-text +TESTS += pthread-show-text$(EXEEXT) endif if CAIRO_HAS_FT_FONT -TESTS += bitmap-font -TESTS += ft-font-create-for-ft-face -TESTS += ft-text-vertical-layout-type1 -TESTS += ft-text-vertical-layout-type3 -TESTS += ft-text-antialias-none +TESTS += bitmap-font$(EXEEXT) +TESTS += ft-font-create-for-ft-face$(EXEEXT) +TESTS += ft-text-vertical-layout-type1$(EXEEXT) +TESTS += ft-text-vertical-layout-type3$(EXEEXT) +TESTS += ft-text-antialias-none$(EXEEXT) endif if CAIRO_HAS_SVG_SURFACE -TESTS += svg-surface svg-clip +TESTS += svg-surface$(EXEEXT) +TESTS += svg-clip$(EXEEXT) endif if CAIRO_HAS_PDF_SURFACE -TESTS += pdf-features +TESTS += pdf-features$(EXEEXT) endif if CAIRO_HAS_PS_SURFACE -TESTS += ps-features +TESTS += ps-features$(EXEEXT) endif if CAIRO_HAS_XLIB_SURFACE -TESTS += xlib-surface +TESTS += xlib-surface$(EXEEXT) endif if CAIRO_HAS_MULTI_PAGE_SURFACES -TESTS += multi-page +TESTS += multi-page$(EXEEXT) endif if CAIRO_HAS_SVG_SURFACE if CAIRO_HAS_PDF_SURFACE if CAIRO_HAS_PS_SURFACE -TESTS += fallback-resolution +TESTS += fallback-resolution$(EXEEXT) endif endif endif @@ -227,18 +230,24 @@ REFERENCE_IMAGES = \ clip-fill-rule-pixel-aligned-ref.png \ clip-fill-rule-pixel-aligned-rgb24-ref.png \ clip-fill-rule-ps-argb32-ref.png \ + clip-fill-rule-ps-rgb24-ref.png \ clip-fill-rule-ref.png \ clip-fill-rule-rgb24-ref.png \ clip-nesting-ps-argb32-ref.png \ + clip-nesting-ps-rgb24-ref.png \ clip-nesting-quartz-ref.png \ clip-nesting-quartz-rgb24-ref.png \ clip-nesting-ref.png \ clip-nesting-rgb24-ref.png \ clip-operator-ref.png \ + clip-operator-ps-argb32-ref.png \ clip-operator-rgb24-ref.png \ + clip-push-group-ps-argb32-ref.png \ + clip-push-group-ps-rgb24-ref.png \ clip-push-group-quartz-ref.png \ clip-push-group-ref.png \ clip-twice-ps-argb32-ref.png \ + clip-twice-ps-rgb24-ref.png \ clip-twice-quartz-ref.png \ clip-twice-quartz-rgb24-ref.png \ clip-twice-ref.png \ @@ -248,17 +257,21 @@ REFERENCE_IMAGES = \ composite-integer-translate-over-repeat-ref.png \ composite-integer-translate-source-ref.png \ copy-path-ps-argb32-ref.png \ + copy-path-ps-rgb24-ref.png \ copy-path-ref.png \ create-from-png-ref.png \ create-from-png-stream-ref.png \ dash-caps-joins-ps-argb32-ref.png \ + dash-caps-joins-ps-rgb24-ref.png \ dash-caps-joins-quartz-ref.png \ dash-caps-joins-ref.png \ dash-no-dash-ref.png \ dash-offset-negative-ref.png \ dash-scale-ps-argb32-ref.png \ + dash-scale-ps-rgb24-ref.png \ dash-scale-ref.png \ dash-state-ps-argb32-ref.png \ + dash-state-ps-rgb24-ref.png \ dash-state-ref.png \ dash-zero-length-ps-argb32-ref.png \ dash-zero-length-ref.png \ @@ -266,6 +279,7 @@ REFERENCE_IMAGES = \ degenerate-pen-ref.png \ degenerate-pen-ps-argb32-ref.png \ degenerate-path-ps-argb32-ref.png \ + degenerate-path-ps-rgb24-ref.png \ degenerate-path-ref.png \ degenerate-path-rgb24-ref.png \ device-offset-positive-ref.png \ @@ -279,6 +293,7 @@ REFERENCE_IMAGES = \ fill-and-stroke-alpha-quartz-ref.png \ fill-and-stroke-alpha-ref.png \ fill-and-stroke-ps-argb32-ref.png \ + fill-and-stroke-ps-rgb24-ref.png \ fill-and-stroke-quartz-ref.png \ fill-and-stroke-quartz-rgb24-ref.png \ fill-and-stroke-ref.png \ @@ -288,6 +303,7 @@ REFERENCE_IMAGES = \ fill-degenerate-sort-order-ref.png \ fill-degenerate-sort-order-rgb24-ref.png \ fill-missed-stop-ps-argb32-ref.png \ + fill-missed-stop-ps-rgb24-ref.png \ fill-missed-stop-ref.png \ fill-missed-stop-rgb24-ref.png \ fill-rule-ps-argb32-ref.png \ @@ -297,6 +313,7 @@ REFERENCE_IMAGES = \ fill-rule-rgb24-ref.png \ filter-nearest-offset-ref.png \ font-matrix-translation-ps-argb32-ref.png \ + font-matrix-translation-ps-rgb24-ref.png \ font-matrix-translation-ref.png \ font-matrix-translation-svg-ref.png \ ft-text-antialias-none-ps-argb32-ref.png \ @@ -309,17 +326,25 @@ REFERENCE_IMAGES = \ ft-text-vertical-layout-type3-svg-ref.png \ get-group-target-ref.png \ glyph-cache-pressure-ref.png \ + gradient-alpha-ps-argb32-ref.png \ + gradient-alpha-ps-rgb24-ref.png \ gradient-alpha-ref.png \ gradient-alpha-rgb24-ref.png \ + gradient-zero-stops-ref.png \ + gradient-zero-stops-rgb24-ref.png \ infinite-join-ref.png \ leaky-dash-ps-argb32-ref.png \ + leaky-dash-ps-rgb24-ref.png \ leaky-dash-ref.png \ leaky-polygon-ref.png \ linear-gradient-reflect-ref.png \ + linear-gradient-ps-argb32-ref.png \ + linear-gradient-ps-rgb24-ref.png \ linear-gradient-ref.png \ linear-gradient-svg-ref.png \ line-width-ref.png \ line-width-scale-ps-argb32-ref.png \ + line-width-scale-ps-rgb24-ref.png \ line-width-scale-ref.png \ long-lines-ref.png \ mask-alpha-ref.png \ @@ -336,8 +361,10 @@ REFERENCE_IMAGES = \ mask-svg-argb32-ref.png \ meta-surface-pattern-ref.png \ meta-surface-pattern-rgb24-ref.png \ + miter-precision-ref.png \ move-to-show-surface-ref.png \ new-sub-path-ps-argb32-ref.png \ + new-sub-path-ps-rgb24-ref.png \ new-sub-path-quartz-ref.png \ new-sub-path-quartz-rgb24-ref.png \ new-sub-path-ref.png \ @@ -348,6 +375,8 @@ REFERENCE_IMAGES = \ operator-clear-quartz-rgb24-ref.png \ operator-clear-ref.png \ operator-clear-rgb24-ref.png \ + operator-source-ps-argb32-ref.png \ + operator-source-ps-rgb24-ref.png \ operator-source-ref.png \ operator-source-rgb24-ref.png \ over-above-source-ps-argb32-ref.png \ @@ -370,6 +399,8 @@ REFERENCE_IMAGES = \ paint-with-alpha-ref.png \ paint-with-alpha-svg-ref.png \ pattern-getters-ref.png \ + pixman-rotate-ps-argb32-ref.png \ + pixman-rotate-ps-rgb24-ref.png \ pixman-rotate-ref.png \ pixman-rotate-rgb24-ref.png \ push-group-ref.png \ @@ -378,16 +409,19 @@ REFERENCE_IMAGES = \ radial-gradient-ref.png \ radial-gradient-svg-ref.png \ random-intersections-ps-argb32-ref.png \ + random-intersections-ps-rgb24-ref.png \ random-intersections-ref.png \ rgb24-ignore-alpha-ref.png \ rectangle-rounding-error-ref.png \ rectilinear-stroke-ref.png \ rel-path-quartz-ref.png \ rel-path-quartz-rgb24-ref.png \ + rel-path-ps-rgb24-ref.png \ rel-path-ref.png \ rel-path-rgb24-ref.png \ rotate-image-surface-paint-pdf-argb32-ref.png \ rotate-image-surface-paint-ps-argb32-ref.png \ + rotate-image-surface-paint-ps-rgb24-ref.png \ rotate-image-surface-paint-ref.png \ rotate-image-surface-paint-svg-ref.png \ scale-down-source-surface-paint-ref.png \ @@ -408,10 +442,13 @@ REFERENCE_IMAGES = \ skew-extreme-ref.png \ source-clip-ref.png \ source-clip-scale-quartz-ref.png \ + source-clip-scale-ps-argb32-ref.png \ + source-clip-scale-ps-rgb24-ref.png \ source-clip-scale-ref.png \ source-clip-scale-svg-ref.png \ source-surface-scale-paint-ref.png \ source-surface-scale-paint-rgb24-ref.png \ + surface-pattern-big-scale-down-ref.png \ surface-pattern-pdf-argb32-ref.png \ surface-pattern-ps-argb32-ref.png \ surface-pattern-ref.png \ @@ -427,11 +464,14 @@ REFERENCE_IMAGES = \ text-antialias-subpixel-ref.png \ text-glyph-range-ref.png \ text-glyph-range-rgb24-ref.png \ + text-pattern-ps-argb32-ref.png \ + text-pattern-ps-rgb24-ref.png \ text-pattern-ref.png \ text-pattern-rgb24-ref.png \ text-pattern-svg-argb32-ref.png \ text-pattern-svg-rgb24-ref.png \ text-rotate-ps-argb32-ref.png \ + text-rotate-ps-rgb24-ref.png \ text-rotate-ref.png \ text-rotate-svg-ref.png \ text-zero-len-ref.png \ @@ -440,6 +480,7 @@ REFERENCE_IMAGES = \ trap-clip-quartz-ref.png \ trap-clip-quartz-rgb24-ref.png \ trap-clip-ps-argb32-ref.png \ + trap-clip-ps-rgb24-ref.png \ trap-clip-ref.png \ trap-clip-rgb24-ref.png \ unantialiased-shapes-ref.png \ @@ -466,21 +507,20 @@ $(REFERENCE_IMAGES) # # Also, any test listed here should call cairo_test_expect_failure and # provide an explanation for the expected failure. -XFAIL_TESTS = \ -a8-mask \ -big-trap \ -extend-pad \ -filter-nearest-offset \ -long-lines \ -self-intersecting \ -surface-pattern \ -surface-pattern-big-scale-down \ -surface-pattern-scale-down \ -surface-pattern-scale-up +XFAIL_TESTS = \ +a8-mask$(EXEEXT) \ +big-trap$(EXEEXT) \ +extend-pad$(EXEEXT) \ +filter-nearest-offset$(EXEEXT) \ +long-lines$(EXEEXT) \ +self-intersecting$(EXEEXT) \ +surface-pattern$(EXEEXT) \ +surface-pattern-big-scale-down$(EXEEXT) \ +surface-pattern-scale-down$(EXEEXT) \ +surface-pattern-scale-up$(EXEEXT) # Any test that doesn't generate a log file goes here NOLOG_TESTS = \ -create-for-stream \ user-data \ svg-surface \ svg-clip \ @@ -489,6 +529,24 @@ ps-features \ multi-page \ fallback-resolution +# A hook that summarises the failures +check: AM_MAKEFLAGS+=-k +check-local: + @FAILED_TESTS=""; \ + for t in *.log; do \ + if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \ + FAILED_TESTS="$$FAILED_TESTS $${t%.log}"; \ + fi; \ + done; \ + if test -n "$$FAILED_TESTS"; then \ + echo "Failed tests:"; \ + for t in $$FAILED_TESTS; do \ + echo -n " $$t: "; \ + grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \ + echo; \ + done; \ + fi + check_PROGRAMS = EXTRA_PROGRAMS = @@ -558,7 +616,7 @@ EXTRA_PROGRAMS += $(TESTS) $(DISABLED_TESTS) TARGETS = $(CAIRO_TEST_TARGET) TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE) -TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" +TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS:$(EXEEXT)=)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS) VALGRIND_FLAGS = \ @@ -590,8 +648,8 @@ check-valgrind: $(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute valgrind $(VALGRIND_FLAGS)' 2>&1 | tee valgrind-log # The following definitions both should work. -#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` -FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` +#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` +FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` recheck = check TESTS="$(FAILED_TESTS)" @@ -616,7 +674,7 @@ retest: # Make index.html with no dependency tracking. html: @echo Creating index.html - @perl $(srcdir)/make-html.pl $(TESTS:=.log) > index.html + @perl $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) > index.html # Make index.html with no dependency tracking, containing only the failed tests. rehtml: @@ -630,7 +688,7 @@ NOLOG_TESTS_LOG = $(NOLOG_TESTS:=.log) $(NOLOG_TESTS_LOG): echo dummy > $@ -index.html: $(srcdir)/make-html.pl $(TESTS:=.log) +index.html: $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) @echo Creating index.html @perl $^ > $@ diff --git a/test/Makefile.in b/test/Makefile.in index 2255381..8deb773 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -38,18 +38,19 @@ host_triplet = @host@ # Then we have a collection of tests that are only run if certain # features are compiled into cairo -@HAVE_PTHREAD_TRUE@am__append_1 = pthread-show-text -@CAIRO_HAS_FT_FONT_TRUE@am__append_2 = bitmap-font \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-font-create-for-ft-face \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type1 \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type3 \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-text-antialias-none -@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_3 = svg-surface svg-clip -@CAIRO_HAS_PDF_SURFACE_TRUE@am__append_4 = pdf-features -@CAIRO_HAS_PS_SURFACE_TRUE@am__append_5 = ps-features -@CAIRO_HAS_XLIB_SURFACE_TRUE@am__append_6 = xlib-surface -@CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE@am__append_7 = multi-page -@CAIRO_HAS_PDF_SURFACE_TRUE@@CAIRO_HAS_PS_SURFACE_TRUE@@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_8 = fallback-resolution +@HAVE_PTHREAD_TRUE@am__append_1 = pthread-show-text$(EXEEXT) +@CAIRO_HAS_FT_FONT_TRUE@am__append_2 = bitmap-font$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-font-create-for-ft-face$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type1$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type3$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-text-antialias-none$(EXEEXT) +@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_3 = svg-surface$(EXEEXT) \ +@CAIRO_HAS_SVG_SURFACE_TRUE@ svg-clip$(EXEEXT) +@CAIRO_HAS_PDF_SURFACE_TRUE@am__append_4 = pdf-features$(EXEEXT) +@CAIRO_HAS_PS_SURFACE_TRUE@am__append_5 = ps-features$(EXEEXT) +@CAIRO_HAS_XLIB_SURFACE_TRUE@am__append_6 = xlib-surface$(EXEEXT) +@CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE@am__append_7 = multi-page$(EXEEXT) +@CAIRO_HAS_PDF_SURFACE_TRUE@@CAIRO_HAS_PS_SURFACE_TRUE@@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_8 = fallback-resolution$(EXEEXT) check_PROGRAMS = imagediff$(EXEEXT) png-flatten$(EXEEXT) \ $(am__EXEEXT_11) $(am__EXEEXT_12) EXTRA_PROGRAMS = $(am__EXEEXT_9) $(am__EXEEXT_10) @@ -99,7 +100,7 @@ am__EXEEXT_9 = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ create-from-png$(EXEEXT) create-from-png-stream$(EXEEXT) \ dash-caps-joins$(EXEEXT) dash-no-dash$(EXEEXT) \ dash-offset-negative$(EXEEXT) dash-scale$(EXEEXT) \ - dash-zero-length$(EXEEXT) dash-state$(EXEEXT) \ + dash-state$(EXEEXT) dash-zero-length$(EXEEXT) \ degenerate-path$(EXEEXT) degenerate-pen$(EXEEXT) \ device-offset$(EXEEXT) device-offset-positive$(EXEEXT) \ extend-pad$(EXEEXT) fill-and-stroke$(EXEEXT) \ @@ -111,25 +112,26 @@ am__EXEEXT_9 = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ glyph-cache-pressure$(EXEEXT) get-and-set$(EXEEXT) \ get-clip$(EXEEXT) get-group-target$(EXEEXT) \ get-path-extents$(EXEEXT) gradient-alpha$(EXEEXT) \ - infinite-join$(EXEEXT) in-fill-empty-trapezoid$(EXEEXT) \ - invalid-matrix$(EXEEXT) leaky-dash$(EXEEXT) \ - leaky-polygon$(EXEEXT) line-width$(EXEEXT) \ + gradient-zero-stops$(EXEEXT) infinite-join$(EXEEXT) \ + in-fill-empty-trapezoid$(EXEEXT) invalid-matrix$(EXEEXT) \ + leaky-dash$(EXEEXT) leaky-polygon$(EXEEXT) line-width$(EXEEXT) \ line-width-scale$(EXEEXT) line-width-zero$(EXEEXT) \ linear-gradient$(EXEEXT) linear-gradient-reflect$(EXEEXT) \ long-lines$(EXEEXT) mask$(EXEEXT) mask-alpha$(EXEEXT) \ mask-ctm$(EXEEXT) mask-surface-ctm$(EXEEXT) \ - meta-surface-pattern$(EXEEXT) move-to-show-surface$(EXEEXT) \ - new-sub-path$(EXEEXT) nil-surface$(EXEEXT) \ - operator-clear$(EXEEXT) operator-source$(EXEEXT) \ - over-above-source$(EXEEXT) over-around-source$(EXEEXT) \ - over-below-source$(EXEEXT) over-between-source$(EXEEXT) \ - paint$(EXEEXT) paint-repeat$(EXEEXT) \ - paint-source-alpha$(EXEEXT) paint-with-alpha$(EXEEXT) \ - pattern-get-type$(EXEEXT) pattern-getters$(EXEEXT) \ - pixman-rotate$(EXEEXT) radial-gradient$(EXEEXT) \ + meta-surface-pattern$(EXEEXT) miter-precision$(EXEEXT) \ + move-to-show-surface$(EXEEXT) new-sub-path$(EXEEXT) \ + nil-surface$(EXEEXT) operator-clear$(EXEEXT) \ + operator-source$(EXEEXT) over-above-source$(EXEEXT) \ + over-around-source$(EXEEXT) over-below-source$(EXEEXT) \ + over-between-source$(EXEEXT) paint$(EXEEXT) \ + paint-repeat$(EXEEXT) paint-source-alpha$(EXEEXT) \ + paint-with-alpha$(EXEEXT) pattern-get-type$(EXEEXT) \ + pattern-getters$(EXEEXT) pixman-rotate$(EXEEXT) \ + push-group$(EXEEXT) radial-gradient$(EXEEXT) \ random-intersections$(EXEEXT) \ rectangle-rounding-error$(EXEEXT) rectilinear-stroke$(EXEEXT) \ - rgb24-ignore-alpha$(EXEEXT) \ + rel-path$(EXEEXT) rgb24-ignore-alpha$(EXEEXT) \ rotate-image-surface-paint$(EXEEXT) \ scale-down-source-surface-paint$(EXEEXT) \ scale-source-surface-paint$(EXEEXT) select-font-face$(EXEEXT) \ @@ -148,10 +150,10 @@ am__EXEEXT_9 = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ transforms$(EXEEXT) translate-show-surface$(EXEEXT) \ trap-clip$(EXEEXT) truetype-tables$(EXEEXT) \ unantialiased-shapes$(EXEEXT) unbounded-operator$(EXEEXT) \ - user-data$(EXEEXT) rel-path$(EXEEXT) push-group$(EXEEXT) \ - zero-alpha$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ - $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5) \ - $(am__EXEEXT_6) $(am__EXEEXT_7) $(am__EXEEXT_8) + user-data$(EXEEXT) zero-alpha$(EXEEXT) $(am__EXEEXT_1) \ + $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \ + $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \ + $(am__EXEEXT_8) am__EXEEXT_10 = extend-reflect$(EXEEXT) show-glyphs-many$(EXEEXT) \ text-glyph-range$(EXEEXT) @CAIRO_CAN_TEST_PDF_SURFACE_TRUE@am__EXEEXT_11 = pdf2png$(EXEEXT) @@ -445,6 +447,11 @@ gradient_alpha_OBJECTS = gradient-alpha.$(OBJEXT) gradient_alpha_LDADD = $(LDADD) gradient_alpha_DEPENDENCIES = $(am__DEPENDENCIES_1) libcairotest.la \ $(am__DEPENDENCIES_1) +gradient_zero_stops_SOURCES = gradient-zero-stops.c +gradient_zero_stops_OBJECTS = gradient-zero-stops.$(OBJEXT) +gradient_zero_stops_LDADD = $(LDADD) +gradient_zero_stops_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + libcairotest.la $(am__DEPENDENCIES_1) imagediff_SOURCES = imagediff.c imagediff_OBJECTS = imagediff.$(OBJEXT) imagediff_LDADD = $(LDADD) @@ -530,6 +537,11 @@ meta_surface_pattern_OBJECTS = meta-surface-pattern.$(OBJEXT) meta_surface_pattern_LDADD = $(LDADD) meta_surface_pattern_DEPENDENCIES = $(am__DEPENDENCIES_1) \ libcairotest.la $(am__DEPENDENCIES_1) +miter_precision_SOURCES = miter-precision.c +miter_precision_OBJECTS = miter-precision.$(OBJEXT) +miter_precision_LDADD = $(LDADD) +miter_precision_DEPENDENCIES = $(am__DEPENDENCIES_1) libcairotest.la \ + $(am__DEPENDENCIES_1) move_to_show_surface_SOURCES = move-to-show-surface.c move_to_show_surface_OBJECTS = move-to-show-surface.$(OBJEXT) move_to_show_surface_LDADD = $(LDADD) @@ -918,36 +930,37 @@ SOURCES = $(libcairotest_la_SOURCES) a8-mask.c big-trap.c \ ft-text-vertical-layout-type1.c \ ft-text-vertical-layout-type3.c get-and-set.c get-clip.c \ get-group-target.c get-path-extents.c glyph-cache-pressure.c \ - gradient-alpha.c imagediff.c in-fill-empty-trapezoid.c \ - infinite-join.c invalid-matrix.c leaky-dash.c leaky-polygon.c \ - line-width.c line-width-scale.c line-width-zero.c \ - linear-gradient.c linear-gradient-reflect.c long-lines.c \ - mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ - meta-surface-pattern.c move-to-show-surface.c multi-page.c \ - new-sub-path.c nil-surface.c operator-clear.c \ - operator-source.c over-above-source.c over-around-source.c \ - over-below-source.c over-between-source.c paint.c \ - paint-repeat.c paint-source-alpha.c paint-with-alpha.c \ - pattern-get-type.c pattern-getters.c pdf-features.c pdf2png.c \ - pixman-rotate.c png-flatten.c ps-features.c \ - pthread-show-text.c push-group.c radial-gradient.c \ - random-intersections.c rectangle-rounding-error.c \ - rectilinear-stroke.c rel-path.c rgb24-ignore-alpha.c \ - rotate-image-surface-paint.c scale-down-source-surface-paint.c \ - scale-source-surface-paint.c select-font-face.c \ - select-font-no-show-text.c self-copy.c self-intersecting.c \ - set-source.c show-glyphs-many.c show-text-current-point.c \ - skew-extreme.c solid-pattern-cache-stress.c source-clip.c \ - source-clip-scale.c source-surface-scale-paint.c \ - surface-finish-twice.c surface-pattern.c \ - surface-pattern-big-scale-down.c surface-pattern-scale-down.c \ - surface-pattern-scale-up.c svg-clip.c svg-surface.c svg2png.c \ - text-antialias-gray.c text-antialias-none.c \ - text-antialias-subpixel.c text-cache-crash.c \ - text-glyph-range.c text-pattern.c text-rotate.c \ - text-zero-len.c transforms.c translate-show-surface.c \ - trap-clip.c truetype-tables.c unantialiased-shapes.c \ - unbounded-operator.c user-data.c xlib-surface.c zero-alpha.c + gradient-alpha.c gradient-zero-stops.c imagediff.c \ + in-fill-empty-trapezoid.c infinite-join.c invalid-matrix.c \ + leaky-dash.c leaky-polygon.c line-width.c line-width-scale.c \ + line-width-zero.c linear-gradient.c linear-gradient-reflect.c \ + long-lines.c mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ + meta-surface-pattern.c miter-precision.c \ + move-to-show-surface.c multi-page.c new-sub-path.c \ + nil-surface.c operator-clear.c operator-source.c \ + over-above-source.c over-around-source.c over-below-source.c \ + over-between-source.c paint.c paint-repeat.c \ + paint-source-alpha.c paint-with-alpha.c pattern-get-type.c \ + pattern-getters.c pdf-features.c pdf2png.c pixman-rotate.c \ + png-flatten.c ps-features.c pthread-show-text.c push-group.c \ + radial-gradient.c random-intersections.c \ + rectangle-rounding-error.c rectilinear-stroke.c rel-path.c \ + rgb24-ignore-alpha.c rotate-image-surface-paint.c \ + scale-down-source-surface-paint.c scale-source-surface-paint.c \ + select-font-face.c select-font-no-show-text.c self-copy.c \ + self-intersecting.c set-source.c show-glyphs-many.c \ + show-text-current-point.c skew-extreme.c \ + solid-pattern-cache-stress.c source-clip.c source-clip-scale.c \ + source-surface-scale-paint.c surface-finish-twice.c \ + surface-pattern.c surface-pattern-big-scale-down.c \ + surface-pattern-scale-down.c surface-pattern-scale-up.c \ + svg-clip.c svg-surface.c svg2png.c text-antialias-gray.c \ + text-antialias-none.c text-antialias-subpixel.c \ + text-cache-crash.c text-glyph-range.c text-pattern.c \ + text-rotate.c text-zero-len.c transforms.c \ + translate-show-surface.c trap-clip.c truetype-tables.c \ + unantialiased-shapes.c unbounded-operator.c user-data.c \ + xlib-surface.c zero-alpha.c DIST_SOURCES = $(libcairotest_la_SOURCES) a8-mask.c big-trap.c \ bitmap-font.c caps-joins.c caps-joins-alpha.c caps-sub-paths.c \ clip-all.c clip-empty.c clip-fill-rule.c \ @@ -969,36 +982,37 @@ DIST_SOURCES = $(libcairotest_la_SOURCES) a8-mask.c big-trap.c \ ft-text-vertical-layout-type1.c \ ft-text-vertical-layout-type3.c get-and-set.c get-clip.c \ get-group-target.c get-path-extents.c glyph-cache-pressure.c \ - gradient-alpha.c imagediff.c in-fill-empty-trapezoid.c \ - infinite-join.c invalid-matrix.c leaky-dash.c leaky-polygon.c \ - line-width.c line-width-scale.c line-width-zero.c \ - linear-gradient.c linear-gradient-reflect.c long-lines.c \ - mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ - meta-surface-pattern.c move-to-show-surface.c multi-page.c \ - new-sub-path.c nil-surface.c operator-clear.c \ - operator-source.c over-above-source.c over-around-source.c \ - over-below-source.c over-between-source.c paint.c \ - paint-repeat.c paint-source-alpha.c paint-with-alpha.c \ - pattern-get-type.c pattern-getters.c pdf-features.c pdf2png.c \ - pixman-rotate.c png-flatten.c ps-features.c \ - pthread-show-text.c push-group.c radial-gradient.c \ - random-intersections.c rectangle-rounding-error.c \ - rectilinear-stroke.c rel-path.c rgb24-ignore-alpha.c \ - rotate-image-surface-paint.c scale-down-source-surface-paint.c \ - scale-source-surface-paint.c select-font-face.c \ - select-font-no-show-text.c self-copy.c self-intersecting.c \ - set-source.c show-glyphs-many.c show-text-current-point.c \ - skew-extreme.c solid-pattern-cache-stress.c source-clip.c \ - source-clip-scale.c source-surface-scale-paint.c \ - surface-finish-twice.c surface-pattern.c \ - surface-pattern-big-scale-down.c surface-pattern-scale-down.c \ - surface-pattern-scale-up.c svg-clip.c svg-surface.c svg2png.c \ - text-antialias-gray.c text-antialias-none.c \ - text-antialias-subpixel.c text-cache-crash.c \ - text-glyph-range.c text-pattern.c text-rotate.c \ - text-zero-len.c transforms.c translate-show-surface.c \ - trap-clip.c truetype-tables.c unantialiased-shapes.c \ - unbounded-operator.c user-data.c xlib-surface.c zero-alpha.c + gradient-alpha.c gradient-zero-stops.c imagediff.c \ + in-fill-empty-trapezoid.c infinite-join.c invalid-matrix.c \ + leaky-dash.c leaky-polygon.c line-width.c line-width-scale.c \ + line-width-zero.c linear-gradient.c linear-gradient-reflect.c \ + long-lines.c mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ + meta-surface-pattern.c miter-precision.c \ + move-to-show-surface.c multi-page.c new-sub-path.c \ + nil-surface.c operator-clear.c operator-source.c \ + over-above-source.c over-around-source.c over-below-source.c \ + over-between-source.c paint.c paint-repeat.c \ + paint-source-alpha.c paint-with-alpha.c pattern-get-type.c \ + pattern-getters.c pdf-features.c pdf2png.c pixman-rotate.c \ + png-flatten.c ps-features.c pthread-show-text.c push-group.c \ + radial-gradient.c random-intersections.c \ + rectangle-rounding-error.c rectilinear-stroke.c rel-path.c \ + rgb24-ignore-alpha.c rotate-image-surface-paint.c \ + scale-down-source-surface-paint.c scale-source-surface-paint.c \ + select-font-face.c select-font-no-show-text.c self-copy.c \ + self-intersecting.c set-source.c show-glyphs-many.c \ + show-text-current-point.c skew-extreme.c \ + solid-pattern-cache-stress.c source-clip.c source-clip-scale.c \ + source-surface-scale-paint.c surface-finish-twice.c \ + surface-pattern.c surface-pattern-big-scale-down.c \ + surface-pattern-scale-down.c surface-pattern-scale-up.c \ + svg-clip.c svg-surface.c svg2png.c text-antialias-gray.c \ + text-antialias-none.c text-antialias-subpixel.c \ + text-cache-crash.c text-glyph-range.c text-pattern.c \ + text-rotate.c text-zero-len.c transforms.c \ + translate-show-surface.c trap-clip.c truetype-tables.c \ + unantialiased-shapes.c unbounded-operator.c user-data.c \ + xlib-surface.c zero-alpha.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ @@ -1034,6 +1048,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ @@ -1237,50 +1253,73 @@ xlib_xrender_LIBS = @xlib_xrender_LIBS@ SUBDIRS = pdiff . # Here are all the tests that are run unconditionally -TESTS = a8-mask big-trap caps-joins caps-joins-alpha caps-sub-paths \ - clip-all clip-empty clip-fill-rule \ - clip-fill-rule-pixel-aligned clip-nesting clip-operator \ - clip-push-group clip-twice clip-zero close-path \ - composite-integer-translate-source \ - composite-integer-translate-over \ - composite-integer-translate-over-repeat copy-path \ - create-for-stream create-from-png create-from-png-stream \ - dash-caps-joins dash-no-dash dash-offset-negative dash-scale \ - dash-zero-length dash-state degenerate-path degenerate-pen \ - device-offset device-offset-positive extend-pad \ - fill-and-stroke fill-and-stroke-alpha \ - fill-and-stroke-alpha-add fill-degenerate-sort-order \ - fill-missed-stop fill-rule filter-nearest-offset \ - font-face-get-type font-matrix-translation \ - glyph-cache-pressure get-and-set get-clip get-group-target \ - get-path-extents gradient-alpha infinite-join \ - in-fill-empty-trapezoid invalid-matrix leaky-dash \ - leaky-polygon line-width line-width-scale line-width-zero \ - linear-gradient linear-gradient-reflect long-lines mask \ - mask-alpha mask-ctm mask-surface-ctm meta-surface-pattern \ - move-to-show-surface new-sub-path nil-surface operator-clear \ - operator-source over-above-source over-around-source \ - over-below-source over-between-source paint paint-repeat \ - paint-source-alpha paint-with-alpha pattern-get-type \ - pattern-getters pixman-rotate radial-gradient \ - random-intersections rectangle-rounding-error \ - rectilinear-stroke rgb24-ignore-alpha \ - rotate-image-surface-paint scale-down-source-surface-paint \ - scale-source-surface-paint select-font-face \ - select-font-no-show-text self-copy self-intersecting \ - set-source show-text-current-point skew-extreme \ - solid-pattern-cache-stress source-clip source-clip-scale \ - source-surface-scale-paint surface-finish-twice \ - surface-pattern surface-pattern-big-scale-down \ - surface-pattern-scale-down surface-pattern-scale-up \ - text-antialias-gray text-antialias-none \ - text-antialias-subpixel text-cache-crash text-pattern \ - text-rotate text-zero-len transforms translate-show-surface \ - trap-clip truetype-tables unantialiased-shapes \ - unbounded-operator user-data rel-path push-group zero-alpha \ - $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) $(am__append_6) \ - $(am__append_7) $(am__append_8) +TESTS = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ + caps-joins-alpha$(EXEEXT) caps-sub-paths$(EXEEXT) \ + clip-all$(EXEEXT) clip-empty$(EXEEXT) clip-fill-rule$(EXEEXT) \ + clip-fill-rule-pixel-aligned$(EXEEXT) clip-nesting$(EXEEXT) \ + clip-operator$(EXEEXT) clip-push-group$(EXEEXT) \ + clip-twice$(EXEEXT) clip-zero$(EXEEXT) close-path$(EXEEXT) \ + composite-integer-translate-source$(EXEEXT) \ + composite-integer-translate-over$(EXEEXT) \ + composite-integer-translate-over-repeat$(EXEEXT) \ + copy-path$(EXEEXT) create-for-stream$(EXEEXT) \ + create-from-png$(EXEEXT) create-from-png-stream$(EXEEXT) \ + dash-caps-joins$(EXEEXT) dash-no-dash$(EXEEXT) \ + dash-offset-negative$(EXEEXT) dash-scale$(EXEEXT) \ + dash-state$(EXEEXT) dash-zero-length$(EXEEXT) \ + degenerate-path$(EXEEXT) degenerate-pen$(EXEEXT) \ + device-offset$(EXEEXT) device-offset-positive$(EXEEXT) \ + extend-pad$(EXEEXT) fill-and-stroke$(EXEEXT) \ + fill-and-stroke-alpha$(EXEEXT) \ + fill-and-stroke-alpha-add$(EXEEXT) \ + fill-degenerate-sort-order$(EXEEXT) fill-missed-stop$(EXEEXT) \ + fill-rule$(EXEEXT) filter-nearest-offset$(EXEEXT) \ + font-face-get-type$(EXEEXT) font-matrix-translation$(EXEEXT) \ + glyph-cache-pressure$(EXEEXT) get-and-set$(EXEEXT) \ + get-clip$(EXEEXT) get-group-target$(EXEEXT) \ + get-path-extents$(EXEEXT) gradient-alpha$(EXEEXT) \ + gradient-zero-stops$(EXEEXT) infinite-join$(EXEEXT) \ + in-fill-empty-trapezoid$(EXEEXT) invalid-matrix$(EXEEXT) \ + leaky-dash$(EXEEXT) leaky-polygon$(EXEEXT) line-width$(EXEEXT) \ + line-width-scale$(EXEEXT) line-width-zero$(EXEEXT) \ + linear-gradient$(EXEEXT) linear-gradient-reflect$(EXEEXT) \ + long-lines$(EXEEXT) mask$(EXEEXT) mask-alpha$(EXEEXT) \ + mask-ctm$(EXEEXT) mask-surface-ctm$(EXEEXT) \ + meta-surface-pattern$(EXEEXT) miter-precision$(EXEEXT) \ + move-to-show-surface$(EXEEXT) new-sub-path$(EXEEXT) \ + nil-surface$(EXEEXT) operator-clear$(EXEEXT) \ + operator-source$(EXEEXT) over-above-source$(EXEEXT) \ + over-around-source$(EXEEXT) over-below-source$(EXEEXT) \ + over-between-source$(EXEEXT) paint$(EXEEXT) \ + paint-repeat$(EXEEXT) paint-source-alpha$(EXEEXT) \ + paint-with-alpha$(EXEEXT) pattern-get-type$(EXEEXT) \ + pattern-getters$(EXEEXT) pixman-rotate$(EXEEXT) \ + push-group$(EXEEXT) radial-gradient$(EXEEXT) \ + random-intersections$(EXEEXT) \ + rectangle-rounding-error$(EXEEXT) rectilinear-stroke$(EXEEXT) \ + rel-path$(EXEEXT) rgb24-ignore-alpha$(EXEEXT) \ + rotate-image-surface-paint$(EXEEXT) \ + scale-down-source-surface-paint$(EXEEXT) \ + scale-source-surface-paint$(EXEEXT) select-font-face$(EXEEXT) \ + select-font-no-show-text$(EXEEXT) self-copy$(EXEEXT) \ + self-intersecting$(EXEEXT) set-source$(EXEEXT) \ + show-text-current-point$(EXEEXT) skew-extreme$(EXEEXT) \ + solid-pattern-cache-stress$(EXEEXT) source-clip$(EXEEXT) \ + source-clip-scale$(EXEEXT) source-surface-scale-paint$(EXEEXT) \ + surface-finish-twice$(EXEEXT) surface-pattern$(EXEEXT) \ + surface-pattern-big-scale-down$(EXEEXT) \ + surface-pattern-scale-down$(EXEEXT) \ + surface-pattern-scale-up$(EXEEXT) text-antialias-gray$(EXEEXT) \ + text-antialias-none$(EXEEXT) text-antialias-subpixel$(EXEEXT) \ + text-cache-crash$(EXEEXT) text-pattern$(EXEEXT) \ + text-rotate$(EXEEXT) text-zero-len$(EXEEXT) \ + transforms$(EXEEXT) translate-show-surface$(EXEEXT) \ + trap-clip$(EXEEXT) truetype-tables$(EXEEXT) \ + unantialiased-shapes$(EXEEXT) unbounded-operator$(EXEEXT) \ + user-data$(EXEEXT) zero-alpha$(EXEEXT) $(am__append_1) \ + $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) $(am__append_6) $(am__append_7) \ + $(am__append_8) # XXX: Here are some existing tests that are currently disabled for # one reason or another. They can still be built and run (manually) @@ -1323,9 +1362,9 @@ TESTS = a8-mask big-trap caps-joins caps-joins-alpha caps-sub-paths \ # that's just a bug in the test rig that should just consider # the abort an XFAIL like any other. DISABLED_TESTS = \ -extend-reflect \ -show-glyphs-many \ -text-glyph-range +extend-reflect$(EXEEXT) \ +show-glyphs-many$(EXEEXT) \ +text-glyph-range$(EXEEXT) # All tests which have a reference image go here. @@ -1344,18 +1383,24 @@ REFERENCE_IMAGES = \ clip-fill-rule-pixel-aligned-ref.png \ clip-fill-rule-pixel-aligned-rgb24-ref.png \ clip-fill-rule-ps-argb32-ref.png \ + clip-fill-rule-ps-rgb24-ref.png \ clip-fill-rule-ref.png \ clip-fill-rule-rgb24-ref.png \ clip-nesting-ps-argb32-ref.png \ + clip-nesting-ps-rgb24-ref.png \ clip-nesting-quartz-ref.png \ clip-nesting-quartz-rgb24-ref.png \ clip-nesting-ref.png \ clip-nesting-rgb24-ref.png \ clip-operator-ref.png \ + clip-operator-ps-argb32-ref.png \ clip-operator-rgb24-ref.png \ + clip-push-group-ps-argb32-ref.png \ + clip-push-group-ps-rgb24-ref.png \ clip-push-group-quartz-ref.png \ clip-push-group-ref.png \ clip-twice-ps-argb32-ref.png \ + clip-twice-ps-rgb24-ref.png \ clip-twice-quartz-ref.png \ clip-twice-quartz-rgb24-ref.png \ clip-twice-ref.png \ @@ -1365,17 +1410,21 @@ REFERENCE_IMAGES = \ composite-integer-translate-over-repeat-ref.png \ composite-integer-translate-source-ref.png \ copy-path-ps-argb32-ref.png \ + copy-path-ps-rgb24-ref.png \ copy-path-ref.png \ create-from-png-ref.png \ create-from-png-stream-ref.png \ dash-caps-joins-ps-argb32-ref.png \ + dash-caps-joins-ps-rgb24-ref.png \ dash-caps-joins-quartz-ref.png \ dash-caps-joins-ref.png \ dash-no-dash-ref.png \ dash-offset-negative-ref.png \ dash-scale-ps-argb32-ref.png \ + dash-scale-ps-rgb24-ref.png \ dash-scale-ref.png \ dash-state-ps-argb32-ref.png \ + dash-state-ps-rgb24-ref.png \ dash-state-ref.png \ dash-zero-length-ps-argb32-ref.png \ dash-zero-length-ref.png \ @@ -1383,6 +1432,7 @@ REFERENCE_IMAGES = \ degenerate-pen-ref.png \ degenerate-pen-ps-argb32-ref.png \ degenerate-path-ps-argb32-ref.png \ + degenerate-path-ps-rgb24-ref.png \ degenerate-path-ref.png \ degenerate-path-rgb24-ref.png \ device-offset-positive-ref.png \ @@ -1396,6 +1446,7 @@ REFERENCE_IMAGES = \ fill-and-stroke-alpha-quartz-ref.png \ fill-and-stroke-alpha-ref.png \ fill-and-stroke-ps-argb32-ref.png \ + fill-and-stroke-ps-rgb24-ref.png \ fill-and-stroke-quartz-ref.png \ fill-and-stroke-quartz-rgb24-ref.png \ fill-and-stroke-ref.png \ @@ -1405,6 +1456,7 @@ REFERENCE_IMAGES = \ fill-degenerate-sort-order-ref.png \ fill-degenerate-sort-order-rgb24-ref.png \ fill-missed-stop-ps-argb32-ref.png \ + fill-missed-stop-ps-rgb24-ref.png \ fill-missed-stop-ref.png \ fill-missed-stop-rgb24-ref.png \ fill-rule-ps-argb32-ref.png \ @@ -1414,6 +1466,7 @@ REFERENCE_IMAGES = \ fill-rule-rgb24-ref.png \ filter-nearest-offset-ref.png \ font-matrix-translation-ps-argb32-ref.png \ + font-matrix-translation-ps-rgb24-ref.png \ font-matrix-translation-ref.png \ font-matrix-translation-svg-ref.png \ ft-text-antialias-none-ps-argb32-ref.png \ @@ -1426,17 +1479,25 @@ REFERENCE_IMAGES = \ ft-text-vertical-layout-type3-svg-ref.png \ get-group-target-ref.png \ glyph-cache-pressure-ref.png \ + gradient-alpha-ps-argb32-ref.png \ + gradient-alpha-ps-rgb24-ref.png \ gradient-alpha-ref.png \ gradient-alpha-rgb24-ref.png \ + gradient-zero-stops-ref.png \ + gradient-zero-stops-rgb24-ref.png \ infinite-join-ref.png \ leaky-dash-ps-argb32-ref.png \ + leaky-dash-ps-rgb24-ref.png \ leaky-dash-ref.png \ leaky-polygon-ref.png \ linear-gradient-reflect-ref.png \ + linear-gradient-ps-argb32-ref.png \ + linear-gradient-ps-rgb24-ref.png \ linear-gradient-ref.png \ linear-gradient-svg-ref.png \ line-width-ref.png \ line-width-scale-ps-argb32-ref.png \ + line-width-scale-ps-rgb24-ref.png \ line-width-scale-ref.png \ long-lines-ref.png \ mask-alpha-ref.png \ @@ -1453,8 +1514,10 @@ REFERENCE_IMAGES = \ mask-svg-argb32-ref.png \ meta-surface-pattern-ref.png \ meta-surface-pattern-rgb24-ref.png \ + miter-precision-ref.png \ move-to-show-surface-ref.png \ new-sub-path-ps-argb32-ref.png \ + new-sub-path-ps-rgb24-ref.png \ new-sub-path-quartz-ref.png \ new-sub-path-quartz-rgb24-ref.png \ new-sub-path-ref.png \ @@ -1465,6 +1528,8 @@ REFERENCE_IMAGES = \ operator-clear-quartz-rgb24-ref.png \ operator-clear-ref.png \ operator-clear-rgb24-ref.png \ + operator-source-ps-argb32-ref.png \ + operator-source-ps-rgb24-ref.png \ operator-source-ref.png \ operator-source-rgb24-ref.png \ over-above-source-ps-argb32-ref.png \ @@ -1487,6 +1552,8 @@ REFERENCE_IMAGES = \ paint-with-alpha-ref.png \ paint-with-alpha-svg-ref.png \ pattern-getters-ref.png \ + pixman-rotate-ps-argb32-ref.png \ + pixman-rotate-ps-rgb24-ref.png \ pixman-rotate-ref.png \ pixman-rotate-rgb24-ref.png \ push-group-ref.png \ @@ -1495,16 +1562,19 @@ REFERENCE_IMAGES = \ radial-gradient-ref.png \ radial-gradient-svg-ref.png \ random-intersections-ps-argb32-ref.png \ + random-intersections-ps-rgb24-ref.png \ random-intersections-ref.png \ rgb24-ignore-alpha-ref.png \ rectangle-rounding-error-ref.png \ rectilinear-stroke-ref.png \ rel-path-quartz-ref.png \ rel-path-quartz-rgb24-ref.png \ + rel-path-ps-rgb24-ref.png \ rel-path-ref.png \ rel-path-rgb24-ref.png \ rotate-image-surface-paint-pdf-argb32-ref.png \ rotate-image-surface-paint-ps-argb32-ref.png \ + rotate-image-surface-paint-ps-rgb24-ref.png \ rotate-image-surface-paint-ref.png \ rotate-image-surface-paint-svg-ref.png \ scale-down-source-surface-paint-ref.png \ @@ -1525,10 +1595,13 @@ REFERENCE_IMAGES = \ skew-extreme-ref.png \ source-clip-ref.png \ source-clip-scale-quartz-ref.png \ + source-clip-scale-ps-argb32-ref.png \ + source-clip-scale-ps-rgb24-ref.png \ source-clip-scale-ref.png \ source-clip-scale-svg-ref.png \ source-surface-scale-paint-ref.png \ source-surface-scale-paint-rgb24-ref.png \ + surface-pattern-big-scale-down-ref.png \ surface-pattern-pdf-argb32-ref.png \ surface-pattern-ps-argb32-ref.png \ surface-pattern-ref.png \ @@ -1544,11 +1617,14 @@ REFERENCE_IMAGES = \ text-antialias-subpixel-ref.png \ text-glyph-range-ref.png \ text-glyph-range-rgb24-ref.png \ + text-pattern-ps-argb32-ref.png \ + text-pattern-ps-rgb24-ref.png \ text-pattern-ref.png \ text-pattern-rgb24-ref.png \ text-pattern-svg-argb32-ref.png \ text-pattern-svg-rgb24-ref.png \ text-rotate-ps-argb32-ref.png \ + text-rotate-ps-rgb24-ref.png \ text-rotate-ref.png \ text-rotate-svg-ref.png \ text-zero-len-ref.png \ @@ -1557,6 +1633,7 @@ REFERENCE_IMAGES = \ trap-clip-quartz-ref.png \ trap-clip-quartz-rgb24-ref.png \ trap-clip-ps-argb32-ref.png \ + trap-clip-ps-rgb24-ref.png \ trap-clip-ref.png \ trap-clip-rgb24-ref.png \ unantialiased-shapes-ref.png \ @@ -1585,21 +1662,20 @@ $(REFERENCE_IMAGES) # Also, any test listed here should call cairo_test_expect_failure and # provide an explanation for the expected failure. XFAIL_TESTS = \ -a8-mask \ -big-trap \ -extend-pad \ -filter-nearest-offset \ -long-lines \ -self-intersecting \ -surface-pattern \ -surface-pattern-big-scale-down \ -surface-pattern-scale-down \ -surface-pattern-scale-up +a8-mask$(EXEEXT) \ +big-trap$(EXEEXT) \ +extend-pad$(EXEEXT) \ +filter-nearest-offset$(EXEEXT) \ +long-lines$(EXEEXT) \ +self-intersecting$(EXEEXT) \ +surface-pattern$(EXEEXT) \ +surface-pattern-big-scale-down$(EXEEXT) \ +surface-pattern-scale-down$(EXEEXT) \ +surface-pattern-scale-up$(EXEEXT) # Any test that doesn't generate a log file goes here NOLOG_TESTS = \ -create-for-stream \ user-data \ svg-surface \ svg-clip \ @@ -1649,7 +1725,7 @@ LDADD = $(CAIRO_LDADD) libcairotest.la $(am__append_9) # and TARGETS make var on the command line. Same for the rest. TARGETS = $(CAIRO_TEST_TARGET) TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE) -TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" +TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS:$(EXEEXT)=)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS) VALGRIND_FLAGS = \ --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \ @@ -1664,8 +1740,8 @@ CLEANFILES = \ # The following definitions both should work. -#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` -FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` +#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` +FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` recheck = check TESTS="$(FAILED_TESTS)" NOLOG_TESTS_LOG = $(NOLOG_TESTS:=.log) all: all-recursive @@ -1875,6 +1951,9 @@ glyph-cache-pressure$(EXEEXT): $(glyph_cache_pressure_OBJECTS) $(glyph_cache_pre gradient-alpha$(EXEEXT): $(gradient_alpha_OBJECTS) $(gradient_alpha_DEPENDENCIES) @rm -f gradient-alpha$(EXEEXT) $(LINK) $(gradient_alpha_LDFLAGS) $(gradient_alpha_OBJECTS) $(gradient_alpha_LDADD) $(LIBS) +gradient-zero-stops$(EXEEXT): $(gradient_zero_stops_OBJECTS) $(gradient_zero_stops_DEPENDENCIES) + @rm -f gradient-zero-stops$(EXEEXT) + $(LINK) $(gradient_zero_stops_LDFLAGS) $(gradient_zero_stops_OBJECTS) $(gradient_zero_stops_LDADD) $(LIBS) imagediff$(EXEEXT): $(imagediff_OBJECTS) $(imagediff_DEPENDENCIES) @rm -f imagediff$(EXEEXT) $(LINK) $(imagediff_LDFLAGS) $(imagediff_OBJECTS) $(imagediff_LDADD) $(LIBS) @@ -1926,6 +2005,9 @@ mask-surface-ctm$(EXEEXT): $(mask_surface_ctm_OBJECTS) $(mask_surface_ctm_DEPEND meta-surface-pattern$(EXEEXT): $(meta_surface_pattern_OBJECTS) $(meta_surface_pattern_DEPENDENCIES) @rm -f meta-surface-pattern$(EXEEXT) $(LINK) $(meta_surface_pattern_LDFLAGS) $(meta_surface_pattern_OBJECTS) $(meta_surface_pattern_LDADD) $(LIBS) +miter-precision$(EXEEXT): $(miter_precision_OBJECTS) $(miter_precision_DEPENDENCIES) + @rm -f miter-precision$(EXEEXT) + $(LINK) $(miter_precision_LDFLAGS) $(miter_precision_OBJECTS) $(miter_precision_LDADD) $(LIBS) move-to-show-surface$(EXEEXT): $(move_to_show_surface_OBJECTS) $(move_to_show_surface_DEPENDENCIES) @rm -f move-to-show-surface$(EXEEXT) $(LINK) $(move_to_show_surface_LDFLAGS) $(move_to_show_surface_OBJECTS) $(move_to_show_surface_LDADD) $(LIBS) @@ -2197,6 +2279,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-path-extents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyph-cache-pressure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient-alpha.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient-zero-stops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imagediff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in-fill-empty-trapezoid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/infinite-join.Po@am__quote@ @@ -2214,6 +2297,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask-surface-ctm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta-surface-pattern.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miter-precision.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move-to-show-surface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-page.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/new-sub-path.Po@am__quote@ @@ -2592,7 +2676,7 @@ distdir: $(DISTFILES) done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local check: check-recursive all-am: Makefile installdirs: installdirs-recursive @@ -2674,19 +2758,38 @@ uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - clean-local clean-recursive ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am - + check-am check-local clean clean-checkPROGRAMS clean-generic \ + clean-libtool clean-local clean-recursive ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-recursive distclean-tags distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-info-am + + +# A hook that summarises the failures +check: AM_MAKEFLAGS+=-k +check-local: + @FAILED_TESTS=""; \ + for t in *.log; do \ + if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \ + FAILED_TESTS="$$FAILED_TESTS $${t%.log}"; \ + fi; \ + done; \ + if test -n "$$FAILED_TESTS"; then \ + echo "Failed tests:"; \ + for t in $$FAILED_TESTS; do \ + echo -n " $$t: "; \ + grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \ + echo; \ + done; \ + fi $(top_builddir)/boilerplate/libcairoboilerplate.la: $(top_builddir)/src/libcairo.la cd $(top_builddir)/boilerplate && $(MAKE) $(AM_MAKEFLAGS) libcairoboilerplate.la @@ -2735,7 +2838,7 @@ retest: # Make index.html with no dependency tracking. html: @echo Creating index.html - @perl $(srcdir)/make-html.pl $(TESTS:=.log) > index.html + @perl $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) > index.html # Make index.html with no dependency tracking, containing only the failed tests. rehtml: @@ -2747,7 +2850,7 @@ rehtml: $(NOLOG_TESTS_LOG): echo dummy > $@ -index.html: $(srcdir)/make-html.pl $(TESTS:=.log) +index.html: $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) @echo Creating index.html @perl $^ > $@ diff --git a/test/cairo-test.c b/test/cairo-test.c index f036163..8fbd5e3 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -241,7 +241,7 @@ cairo_test_target_has_similar (const cairo_test_t *test, cairo_boilerplate_targe cairo_t * cr = cairo_create (surface); cairo_surface_t *similar; cairo_push_group_with_content (cr, target->content); - similar = cairo_get_target (cr); + similar = cairo_get_group_target (cr); has_similar = cairo_surface_get_type (similar) == cairo_surface_get_type (surface); cairo_destroy (cr); @@ -373,7 +373,9 @@ cairo_test_for_target (cairo_test_t *test, cairo_set_font_options (cr, font_options); cairo_font_options_destroy (font_options); + cairo_save (cr); status = (test->draw) (cr, test->width, test->height); + cairo_restore (cr); /* Then, check all the different ways it could fail. */ if (status) { @@ -384,6 +386,7 @@ cairo_test_for_target (cairo_test_t *test, if (similar) { cairo_pop_group_to_source (cr); + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); cairo_paint (cr); } diff --git a/test/clip-fill-rule-ps-rgb24-ref.png b/test/clip-fill-rule-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..60e43c4 --- /dev/null +++ b/test/clip-fill-rule-ps-rgb24-ref.png diff --git a/test/clip-nesting-ps-rgb24-ref.png b/test/clip-nesting-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..8238deb --- /dev/null +++ b/test/clip-nesting-ps-rgb24-ref.png diff --git a/test/clip-nesting.c b/test/clip-nesting.c index 2d53782..09f77fd 100644 --- a/test/clip-nesting.c +++ b/test/clip-nesting.c @@ -46,7 +46,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *target_surface; cairo_t *cr2, *cr3; - target_surface = cairo_get_target (cr); + target_surface = cairo_get_group_target (cr); cr2 = cairo_create (target_surface); diff --git a/test/clip-operator-ps-argb32-ref.png b/test/clip-operator-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..1d49920 --- /dev/null +++ b/test/clip-operator-ps-argb32-ref.png diff --git a/test/clip-operator.c b/test/clip-operator.c index 0745e16..3bfb5ba 100644 --- a/test/clip-operator.c +++ b/test/clip-operator.c @@ -42,7 +42,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/clip-push-group-ps-argb32-ref.png b/test/clip-push-group-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..31b3284 --- /dev/null +++ b/test/clip-push-group-ps-argb32-ref.png diff --git a/test/clip-push-group-ps-rgb24-ref.png b/test/clip-push-group-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..31b3284 --- /dev/null +++ b/test/clip-push-group-ps-rgb24-ref.png diff --git a/test/clip-twice-ps-rgb24-ref.png b/test/clip-twice-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..8a121c4 --- /dev/null +++ b/test/clip-twice-ps-rgb24-ref.png diff --git a/test/clip-zero.c b/test/clip-zero.c index ec2dcc8..bf96d8c 100644 --- a/test/clip-zero.c +++ b/test/clip-zero.c @@ -60,7 +60,7 @@ draw (cairo_t *cr, int width, int height) cairo_mask (cr, cairo_get_source (cr)); - surf = cairo_surface_create_similar (cairo_get_target (cr), CAIRO_CONTENT_COLOR_ALPHA, 0, 0); + surf = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, 0, 0); pat = cairo_pattern_create_for_surface (surf); cairo_surface_destroy (surf); diff --git a/test/copy-path-ps-rgb24-ref.png b/test/copy-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..aa27262 --- /dev/null +++ b/test/copy-path-ps-rgb24-ref.png diff --git a/test/create-for-stream.c b/test/create-for-stream.c index d6cb23b..379412f 100644 --- a/test/create-for-stream.c +++ b/test/create-for-stream.c @@ -225,19 +225,22 @@ test_surface (const char *backend, return CAIRO_TEST_SUCCESS; } - int main (void) { cairo_test_status_t status = CAIRO_TEST_SUCCESS; cairo_test_status_t test_status; + const char test_name[] = "create-for-stream"; - cairo_test_init ("create-for-stream"); + cairo_test_init (test_name); #if CAIRO_HAS_PS_SURFACE test_status = test_surface ("ps", "create-for-stream.ps", cairo_ps_surface_create, cairo_ps_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "ps", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif @@ -246,6 +249,9 @@ main (void) test_status = test_surface ("pdf", "create-for-stream.pdf", cairo_pdf_surface_create, cairo_pdf_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "pdf", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif @@ -254,6 +260,9 @@ main (void) test_status = test_surface ("svg", "create-for-stream.svg", cairo_svg_surface_create, cairo_svg_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "svg", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif diff --git a/test/dash-caps-joins-ps-rgb24-ref.png b/test/dash-caps-joins-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..c62f48d --- /dev/null +++ b/test/dash-caps-joins-ps-rgb24-ref.png diff --git a/test/dash-scale-ps-rgb24-ref.png b/test/dash-scale-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..5a92f55 --- /dev/null +++ b/test/dash-scale-ps-rgb24-ref.png diff --git a/test/dash-state-ps-rgb24-ref.png b/test/dash-state-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..e655974 --- /dev/null +++ b/test/dash-state-ps-rgb24-ref.png diff --git a/test/degenerate-path-ps-rgb24-ref.png b/test/degenerate-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..99e6c66 --- /dev/null +++ b/test/degenerate-path-ps-rgb24-ref.png diff --git a/test/device-offset-positive.c b/test/device-offset-positive.c index 9080612..ab1adcf 100644 --- a/test/device-offset-positive.c +++ b/test/device-offset-positive.c @@ -59,7 +59,7 @@ draw (cairo_t *cr, int width, int height) draw_square (cr); /* Then, create an offset surface and repeat the drawing in red. */ - target = cairo_get_target (cr); + target = cairo_get_group_target (cr); surface = cairo_surface_create_similar (target, cairo_surface_get_content (target), SIZE / 2, SIZE / 2); diff --git a/test/device-offset.c b/test/device-offset.c index 5f0eb80..cee603f 100644 --- a/test/device-offset.c +++ b/test/device-offset.c @@ -59,7 +59,7 @@ draw (cairo_t *cr, int width, int height) draw_square (cr); /* Then, create an offset surface and repeat the drawing in red. */ - target = cairo_get_target (cr); + target = cairo_get_group_target (cr); surface = cairo_surface_create_similar (target, cairo_surface_get_content (target), SIZE / 2, SIZE / 2); diff --git a/test/fill-and-stroke-ps-rgb24-ref.png b/test/fill-and-stroke-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..41e3991 --- /dev/null +++ b/test/fill-and-stroke-ps-rgb24-ref.png diff --git a/test/fill-missed-stop-ps-rgb24-ref.png b/test/fill-missed-stop-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..fd54c7b --- /dev/null +++ b/test/fill-missed-stop-ps-rgb24-ref.png diff --git a/test/font-matrix-translation-ps-rgb24-ref.png b/test/font-matrix-translation-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..330a1b5 --- /dev/null +++ b/test/font-matrix-translation-ps-rgb24-ref.png diff --git a/test/get-clip.c b/test/get-clip.c index 0de84e9..bd92e1e 100644 --- a/test/get-clip.c +++ b/test/get-clip.c @@ -119,7 +119,7 @@ draw (cairo_t *cr, int width, int height) const char *phase; cairo_bool_t uses_clip_rects; - surface = cairo_surface_create_similar (cairo_get_target (cr), + surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR, 100, 100); /* don't use cr accidentally */ cr = NULL; diff --git a/test/get-path-extents.c b/test/get-path-extents.c index b5af7fa..917039e 100644 --- a/test/get-path-extents.c +++ b/test/get-path-extents.c @@ -105,7 +105,7 @@ draw (cairo_t *cr, int width, int height) cairo_text_extents_t extents; cairo_test_status_t ret = CAIRO_TEST_SUCCESS; - surface = cairo_surface_create_similar (cairo_get_target (cr), + surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR, 100, 100); /* don't use cr accidentally */ cr = NULL; diff --git a/test/gradient-alpha-ps-argb32-ref.png b/test/gradient-alpha-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..8b93c05 --- /dev/null +++ b/test/gradient-alpha-ps-argb32-ref.png diff --git a/test/gradient-alpha-ps-rgb24-ref.png b/test/gradient-alpha-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..c3c96cb --- /dev/null +++ b/test/gradient-alpha-ps-rgb24-ref.png diff --git a/test/gradient-zero-stops-ref.png b/test/gradient-zero-stops-ref.png Binary files differnew file mode 100644 index 0000000..3f18670 --- /dev/null +++ b/test/gradient-zero-stops-ref.png diff --git a/test/gradient-zero-stops-rgb24-ref.png b/test/gradient-zero-stops-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..eb24e4b --- /dev/null +++ b/test/gradient-zero-stops-rgb24-ref.png diff --git a/test/gradient-zero-stops.c b/test/gradient-zero-stops.c new file mode 100644 index 0000000..0cf145d --- /dev/null +++ b/test/gradient-zero-stops.c @@ -0,0 +1,66 @@ +/* + * Copyright © 2007 Brian Ewins + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Author: Brian Ewins <Brian.Ewins@gmail.com> + */ + +#include "cairo-test.h" + +/* This test case is designed to exercise the following bug: + * + * Crash when trying to paint gradient with no stops + * https://bugzilla.mozilla.org/show_bug.cgi?id=407104 + */ + +static cairo_test_draw_function_t draw; + +cairo_test_t test = { + "gradient-zero-stops", + "Verifies that gradients with no stops dont cause problems.", + 2, 2, + draw +}; + +static cairo_test_status_t +draw (cairo_t *cr, int width, int height) +{ + cairo_pattern_t *pat; + + pat = cairo_pattern_create_linear (0., 0., 1., 1.); + cairo_set_source (cr, pat); + cairo_paint (cr); + cairo_pattern_destroy (pat); + + pat = cairo_pattern_create_radial (0., 0., 0., 1., 1., 1.); + cairo_set_source (cr, pat); + cairo_paint (cr); + cairo_pattern_destroy (pat); + + return CAIRO_TEST_SUCCESS; +} + +int +main (void) +{ + return cairo_test (&test); +} diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c index d6b4f50..8a5a9bf 100644 --- a/test/invalid-matrix.c +++ b/test/invalid-matrix.c @@ -77,7 +77,7 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \ cairo_matrix_init_identity (&identity); - target = cairo_get_target (cr); + target = cairo_get_group_target (cr); /* test cairo_transform with invalid matrix */ cr2 = cairo_create (target); diff --git a/test/leaky-dash-ps-rgb24-ref.png b/test/leaky-dash-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..c11eb48 --- /dev/null +++ b/test/leaky-dash-ps-rgb24-ref.png diff --git a/test/line-width-scale-ps-rgb24-ref.png b/test/line-width-scale-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..12c5b52 --- /dev/null +++ b/test/line-width-scale-ps-rgb24-ref.png diff --git a/test/linear-gradient-ps-argb32-ref.png b/test/linear-gradient-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..e9202d8 --- /dev/null +++ b/test/linear-gradient-ps-argb32-ref.png diff --git a/test/linear-gradient-ps-rgb24-ref.png b/test/linear-gradient-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..e9202d8 --- /dev/null +++ b/test/linear-gradient-ps-rgb24-ref.png diff --git a/test/mask.c b/test/mask.c index 984b82d..14dd8b3 100644 --- a/test/mask.c +++ b/test/mask.c @@ -75,7 +75,7 @@ mask_polygon (cairo_t *cr, int x, int y) cairo_surface_t *mask_surface; cairo_t *cr2; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, WIDTH, HEIGHT); cr2 = cairo_create (mask_surface); @@ -199,7 +199,7 @@ draw (cairo_t *cr, int width, int height) /* Some of our drawing is unbounded, so we draw each test to * a temporary surface and copy over. */ - tmp_surface = cairo_surface_create_similar (cairo_get_target (cr), + tmp_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, IMAGE_WIDTH, IMAGE_HEIGHT); cr2 = cairo_create (tmp_surface); diff --git a/test/meta-surface-pattern.c b/test/meta-surface-pattern.c index 4d280c7..a047b3e 100644 --- a/test/meta-surface-pattern.c +++ b/test/meta-surface-pattern.c @@ -58,7 +58,7 @@ draw (cairo_t *cr, int width, int height) cairo_translate (cr, PAD, PAD); - pat_surface = cairo_surface_create_similar (cairo_get_target (cr), + pat_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, PAT_WIDTH, PAT_HEIGHT); diff --git a/test/miter-precision-ref.png b/test/miter-precision-ref.png Binary files differnew file mode 100644 index 0000000..c9f7f5b --- /dev/null +++ b/test/miter-precision-ref.png diff --git a/test/miter-precision.c b/test/miter-precision.c new file mode 100644 index 0000000..533c30e --- /dev/null +++ b/test/miter-precision.c @@ -0,0 +1,80 @@ +/* + * Copyright © 2007 Keith Packard + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Keith Packard + * + * Contributor(s): + * Keith Packard <keithp@keithp.com> + */ +#include "cairo-test.h" + +static cairo_test_draw_function_t draw; + +cairo_test_t test = { + "miter-precision", + "test how cairo deals with small miters" + "\ncurrent code draws inappropriate bevels at times", + 120, 100, + draw +}; + +static cairo_test_status_t +draw (cairo_t *cr, int width, int height) +{ + double xscale, yscale; + cairo_set_source_rgb (cr, 1, 1, 1); + cairo_paint (cr); + + cairo_set_source_rgb (cr, 0, 0, 0); + cairo_set_miter_limit (cr, 100000); + for (xscale = 1; xscale <= 1000; xscale += 999) + for (yscale = 1; yscale <= 1000; yscale += 999) + { + double max_scale = xscale > yscale ? xscale : yscale; + cairo_save (cr); + if (xscale > 1) + cairo_translate (cr, 50, 0); + if (yscale > 1) + cairo_translate (cr, 0, 50); + cairo_scale (cr, xscale, yscale); + cairo_set_line_width (cr, 10.0 / max_scale); + cairo_move_to (cr, 10.0 / xscale, 10.0 / yscale); + cairo_line_to (cr, 40.0 / xscale, 10.0 / yscale); + cairo_line_to (cr, 10.0 / xscale, 30.0 / yscale); + cairo_stroke (cr); + cairo_restore (cr); + } + + return CAIRO_TEST_SUCCESS; +} + +int +main (void) +{ + return cairo_test (&test); +} diff --git a/test/new-sub-path-ps-rgb24-ref.png b/test/new-sub-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..bceb5b7 --- /dev/null +++ b/test/new-sub-path-ps-rgb24-ref.png diff --git a/test/operator-clear.c b/test/operator-clear.c index d076047..e6cb042 100644 --- a/test/operator-clear.c +++ b/test/operator-clear.c @@ -61,7 +61,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/operator-source-ps-argb32-ref.png b/test/operator-source-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..dda5e66 --- /dev/null +++ b/test/operator-source-ps-argb32-ref.png diff --git a/test/operator-source-ps-rgb24-ref.png b/test/operator-source-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..3137b15 --- /dev/null +++ b/test/operator-source-ps-rgb24-ref.png diff --git a/test/operator-source.c b/test/operator-source.c index 4224c15..e63bcea 100644 --- a/test/operator-source.c +++ b/test/operator-source.c @@ -67,7 +67,7 @@ set_surface_pattern (cairo_t *cr, int x, int y) x += 0.2 * WIDTH; y += 0.2 * HEIGHT; - source_surface = cairo_surface_create_similar (cairo_get_target (cr), + source_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, width, height); cr2 = cairo_create (source_surface); @@ -98,7 +98,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/pdiff/Makefile.in b/test/pdiff/Makefile.in index c011515..bfbde4c 100644 --- a/test/pdiff/Makefile.in +++ b/test/pdiff/Makefile.in @@ -97,6 +97,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ diff --git a/test/pdiff/pdiff.c b/test/pdiff/pdiff.c index 4f3226d..3f472f3 100644 --- a/test/pdiff/pdiff.c +++ b/test/pdiff/pdiff.c @@ -257,19 +257,19 @@ pdiff_compare (cairo_surface_t *surface_a, unsigned int i; /* assuming colorspaces are in Adobe RGB (1998) convert to XYZ */ - float *aX = xmalloc (dim * sizeof (float)); - float *aY = xmalloc (dim * sizeof (float)); - float *aZ = xmalloc (dim * sizeof (float)); - float *bX = xmalloc (dim * sizeof (float)); - float *bY = xmalloc (dim * sizeof (float)); - float *bZ = xmalloc (dim * sizeof (float)); - float *aLum = xmalloc (dim * sizeof (float)); - float *bLum = xmalloc (dim * sizeof (float)); - - float *aA = xmalloc (dim * sizeof (float)); - float *bA = xmalloc (dim * sizeof (float)); - float *aB = xmalloc (dim * sizeof (float)); - float *bB = xmalloc (dim * sizeof (float)); + float *aX; + float *aY; + float *aZ; + float *bX; + float *bY; + float *bZ; + float *aLum; + float *bLum; + + float *aA; + float *bA; + float *aB; + float *bB; unsigned int x, y, w, h; @@ -289,6 +289,20 @@ pdiff_compare (cairo_surface_t *surface_a, if (w < 3 || h < 3) /* too small for the Laplacian convolution */ return -1; + aX = xmalloc (dim * sizeof (float)); + aY = xmalloc (dim * sizeof (float)); + aZ = xmalloc (dim * sizeof (float)); + bX = xmalloc (dim * sizeof (float)); + bY = xmalloc (dim * sizeof (float)); + bZ = xmalloc (dim * sizeof (float)); + aLum = xmalloc (dim * sizeof (float)); + bLum = xmalloc (dim * sizeof (float)); + + aA = xmalloc (dim * sizeof (float)); + bA = xmalloc (dim * sizeof (float)); + aB = xmalloc (dim * sizeof (float)); + bB = xmalloc (dim * sizeof (float)); + for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { float r, g, b, l; diff --git a/test/pixman-rotate-ps-argb32-ref.png b/test/pixman-rotate-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..1d6ad04 --- /dev/null +++ b/test/pixman-rotate-ps-argb32-ref.png diff --git a/test/pixman-rotate-ps-rgb24-ref.png b/test/pixman-rotate-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..d8ecce9 --- /dev/null +++ b/test/pixman-rotate-ps-rgb24-ref.png diff --git a/test/pixman-rotate.c b/test/pixman-rotate.c index 118b82e..4d8e300 100644 --- a/test/pixman-rotate.c +++ b/test/pixman-rotate.c @@ -55,7 +55,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *stamp; cairo_t *cr2; - stamp = cairo_surface_create_similar (cairo_get_target (cr), + stamp = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, WIDTH, HEIGHT); cr2 = cairo_create (stamp); diff --git a/test/random-intersections-ps-rgb24-ref.png b/test/random-intersections-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..2a199ff --- /dev/null +++ b/test/random-intersections-ps-rgb24-ref.png diff --git a/test/rel-path-ps-rgb24-ref.png b/test/rel-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..ccdcebb --- /dev/null +++ b/test/rel-path-ps-rgb24-ref.png diff --git a/test/rel-path.c b/test/rel-path.c index 1da3557..0f42321 100644 --- a/test/rel-path.c +++ b/test/rel-path.c @@ -33,9 +33,75 @@ cairo_test_t test = { draw }; +static cairo_status_t +invalid_rel_move_to (cairo_surface_t *target) +{ + cairo_t *cr; + cairo_status_t status; + + cr = cairo_create (target); + cairo_rel_move_to (cr, SIZE, SIZE/2); + status = cairo_status (cr); + cairo_destroy (cr); + + return status; +} + +static cairo_status_t +invalid_rel_line_to (cairo_surface_t *target) +{ + cairo_t *cr; + cairo_status_t status; + + cr = cairo_create (target); + cairo_rel_line_to (cr, -SIZE, SIZE/2); + status = cairo_status (cr); + cairo_destroy (cr); + + return status; +} + +static cairo_status_t +invalid_rel_curve_to (cairo_surface_t *target) +{ + cairo_t *cr; + cairo_status_t status; + + cr = cairo_create (target); + cairo_rel_curve_to (cr, + SIZE/2, -SIZE/2, + SIZE*2/3, -SIZE/3, + SIZE/2, -SIZE); + status = cairo_status (cr); + cairo_destroy (cr); + + return status; +} + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { + cairo_status_t status; + + /* first test that a relative move without a current point fails... */ + status = invalid_rel_move_to (cairo_get_target (cr)); + if (status != CAIRO_STATUS_NO_CURRENT_POINT) { + cairo_test_log ("Error: invalid cairo_rel_move_to() did not raise NO_CURRENT_POINT\n"); + return CAIRO_TEST_FAILURE; + } + + status = invalid_rel_line_to (cairo_get_target (cr)); + if (status != CAIRO_STATUS_NO_CURRENT_POINT) { + cairo_test_log ("Error: invalid cairo_rel_line_to() did not raise NO_CURRENT_POINT\n"); + return CAIRO_TEST_FAILURE; + } + + status = invalid_rel_curve_to (cairo_get_target (cr)); + if (status != CAIRO_STATUS_NO_CURRENT_POINT) { + cairo_test_log ("Error: invalid cairo_rel_curve_to() did not raise NO_CURRENT_POINT\n"); + return CAIRO_TEST_FAILURE; + } + cairo_set_source_rgb (cr, 1, 1, 1); cairo_move_to (cr, 0, 0); cairo_rel_move_to (cr, SIZE, SIZE/2); diff --git a/test/rotate-image-surface-paint-ps-rgb24-ref.png b/test/rotate-image-surface-paint-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..4ddcfae --- /dev/null +++ b/test/rotate-image-surface-paint-ps-rgb24-ref.png diff --git a/test/self-copy.c b/test/self-copy.c index 0c23855..63e1897 100644 --- a/test/self-copy.c +++ b/test/self-copy.c @@ -58,7 +58,7 @@ draw (cairo_t *cr, int width, int height) /* Create a pattern with the target surface as the source, * offset by SIZE/2 */ - pattern = cairo_pattern_create_for_surface (cairo_get_target (cr)); + pattern = cairo_pattern_create_for_surface (cairo_get_group_target (cr)); cairo_matrix_init_translate (&matrix, - SIZE / 2, - SIZE / 2); cairo_pattern_set_matrix (pattern, &matrix); diff --git a/test/solid-pattern-cache-stress.c b/test/solid-pattern-cache-stress.c index 93e2f69..957b204 100644 --- a/test/solid-pattern-cache-stress.c +++ b/test/solid-pattern-cache-stress.c @@ -1,12 +1,12 @@ /* - * Copyright ? 2007 Chris Wilson. + * Copyright © 2007 Chris Wilson. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of - * Chris Wilson. not be used in advertising or publicity pertaining to + * Chris Wilson. Not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Chris Wilson makes no representations about the * suitability of this software for any purpose. It is provided "as @@ -23,6 +23,10 @@ * Author: Chris Wilson <chris at chris-wilson.co.uk> */ +#if HAVE_CONFIG_H +#include "config.h" +#endif + #include "cairo-test.h" static cairo_test_draw_function_t draw; @@ -39,6 +43,10 @@ cairo_test_t test = { #define LOOPS 10 #define NRAND 100 +#ifndef HAVE_DRAND48 +#define drand48() (rand () / (double) RAND_MAX) +#endif + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { diff --git a/test/source-clip-scale-ps-argb32-ref.png b/test/source-clip-scale-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..be57d77 --- /dev/null +++ b/test/source-clip-scale-ps-argb32-ref.png diff --git a/test/source-clip-scale-ps-rgb24-ref.png b/test/source-clip-scale-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..be57d77 --- /dev/null +++ b/test/source-clip-scale-ps-rgb24-ref.png diff --git a/test/source-clip-scale.c b/test/source-clip-scale.c index cc24969..26684d3 100644 --- a/test/source-clip-scale.c +++ b/test/source-clip-scale.c @@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *source; cairo_t *cr2; - source = cairo_surface_create_similar (cairo_get_target (cr), + source = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, SIZE, SIZE); cr2 = cairo_create (source); diff --git a/test/source-clip.c b/test/source-clip.c index cb9386a..46eb233 100644 --- a/test/source-clip.c +++ b/test/source-clip.c @@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *source; cairo_t *cr2; - source = cairo_surface_create_similar (cairo_get_target (cr), + source = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, SIZE, SIZE); diff --git a/test/surface-pattern-big-scale-down-ref.png b/test/surface-pattern-big-scale-down-ref.png Binary files differnew file mode 100644 index 0000000..7a8f513 --- /dev/null +++ b/test/surface-pattern-big-scale-down-ref.png diff --git a/test/surface-pattern-big-scale-down.c b/test/surface-pattern-big-scale-down.c index d1f818c..c938d99 100644 --- a/test/surface-pattern-big-scale-down.c +++ b/test/surface-pattern-big-scale-down.c @@ -81,7 +81,6 @@ draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; cairo_pattern_t *pat; - int n; cairo_set_source_rgb (cr, 0, 0, 0); cairo_paint (cr); @@ -90,6 +89,7 @@ draw (cairo_t *cr, int width, int height) setup_source_surface (surface, SRC_WIDTH, SRC_HEIGHT); pat = cairo_pattern_create_for_surface (surface); + cairo_surface_destroy (surface); /* We want to draw at a position such that n * SRC_WIDTH * (SRC_WIDTH/16.0) > 32768. * x = n * 16. @@ -107,10 +107,15 @@ draw (cairo_t *cr, int width, int height) /* n = 17 */ draw_n (cr, pat, 16.0, 17); #else - for (n = 0; n < 32; n++) - draw_n (cr, pat, 16.0, n); + { + int n; + for (n = 0; n < 32; n++) + draw_n (cr, pat, 16.0, n); + } #endif + cairo_pattern_destroy (pat); + return CAIRO_TEST_SUCCESS; } diff --git a/test/svg-clip.c b/test/svg-clip.c index 81af104..77ae9e9 100644 --- a/test/svg-clip.c +++ b/test/svg-clip.c @@ -76,7 +76,7 @@ test_clip (cairo_t *cr, double width, double height) /* Create a new context for this surface to test overlapped * drawing from two contexts */ - cr2 = cairo_create (cairo_get_target (cr)); + cr2 = cairo_create (cairo_get_group_target (cr)); /* Using the new context, draw a black vertical line, which should * appear unclipped on top of everything drawn so far. */ @@ -127,7 +127,7 @@ main (void) cairo_destroy (cr); cairo_surface_destroy (surface); - printf ("svg-surface: Please check %s to make sure it looks happy.\n", + printf ("svg-clip: Please check %s to make sure it looks happy.\n", filename); cairo_test_fini (); diff --git a/test/text-pattern-ps-argb32-ref.png b/test/text-pattern-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..fa887f9 --- /dev/null +++ b/test/text-pattern-ps-argb32-ref.png diff --git a/test/text-pattern-ps-rgb24-ref.png b/test/text-pattern-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..2412bcb --- /dev/null +++ b/test/text-pattern-ps-rgb24-ref.png diff --git a/test/text-rotate-ps-rgb24-ref.png b/test/text-rotate-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..3c6759e --- /dev/null +++ b/test/text-rotate-ps-rgb24-ref.png diff --git a/test/text-zero-len.c b/test/text-zero-len.c index 57c36fd..e64daa8 100644 --- a/test/text-zero-len.c +++ b/test/text-zero-len.c @@ -54,10 +54,22 @@ cairo_test_t test = { draw }; -/* Draw the word cairo at NUM_TEXT different angles */ +static cairo_bool_t +text_extents_equal (const cairo_text_extents_t *A, + const cairo_text_extents_t *B) +{ + return A->x_bearing == B->x_bearing && + A->y_bearing == B->y_bearing && + A->width == B->width && + A->height == B->height && + A->x_advance == B->x_advance && + A->y_advance == B->y_advance; +} + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { + cairo_text_extents_t nil_extents; cairo_text_extents_t extents; cairo_select_font_face (cr, "Bitstream Vera Sans", @@ -66,17 +78,48 @@ draw (cairo_t *cr, int width, int height) cairo_set_font_size (cr, 16); cairo_move_to (cr, 10, 25); + cairo_show_text (cr, NULL); cairo_show_text (cr, ""); cairo_show_glyphs (cr, NULL, 0); cairo_show_glyphs (cr, (void*)8, 0); cairo_move_to (cr, 10, 55); + cairo_text_path (cr, NULL); cairo_text_path (cr, ""); cairo_glyph_path (cr, (void*)8, 0); cairo_fill (cr); + memset (&nil_extents, 0, sizeof (cairo_text_extents_t)); + + memset (&extents, 0xff, sizeof (cairo_text_extents_t)); cairo_text_extents (cr, "", &extents); + if (! text_extents_equal (&extents, &nil_extents)) { + cairo_test_log ("Error: cairo_text_extents(\"\"); extents (%g, %g, %g, %g, %g, %g)\n", + extents.x_bearing, extents.y_bearing, + extents.width, extents.height, + extents.x_advance, extents.y_advance); + return CAIRO_TEST_FAILURE; + } + + memset (&extents, 0xff, sizeof (cairo_text_extents_t)); + cairo_text_extents (cr, NULL, &extents); + if (! text_extents_equal (&extents, &nil_extents)) { + cairo_test_log ("Error: cairo_text_extents(NULL); extents (%g, %g, %g, %g, %g, %g)\n", + extents.x_bearing, extents.y_bearing, + extents.width, extents.height, + extents.x_advance, extents.y_advance); + return CAIRO_TEST_FAILURE; + } + + memset (&extents, 0xff, sizeof (cairo_text_extents_t)); cairo_glyph_extents (cr, (void*)8, 0, &extents); + if (! text_extents_equal (&extents, &nil_extents)) { + cairo_test_log ("Error: cairo_glyph_extents(); extents (%g, %g, %g, %g, %g, %g)\n", + extents.x_bearing, extents.y_bearing, + extents.width, extents.height, + extents.x_advance, extents.y_advance); + return CAIRO_TEST_FAILURE; + } return CAIRO_TEST_SUCCESS; } diff --git a/test/trap-clip-ps-rgb24-ref.png b/test/trap-clip-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..5bff374 --- /dev/null +++ b/test/trap-clip-ps-rgb24-ref.png diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c index e04ec80..06f5cb1 100644 --- a/test/unbounded-operator.c +++ b/test/unbounded-operator.c @@ -43,7 +43,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/xlib-surface.c b/test/xlib-surface.c index a1578cd..d958349 100644 --- a/test/xlib-surface.c +++ b/test/xlib-surface.c @@ -28,7 +28,6 @@ #include "cairo.h" #include "cairo-xlib.h" -#include "cairo-xlib-xrender.h" #include "cairo-test.h" #include "cairo-boilerplate-xlib.h" diff --git a/util/Makefile.in b/util/Makefile.in index 9da0cad..49c3047 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -95,6 +95,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ diff --git a/util/malloc-stats.c b/util/malloc-stats.c index 77c2f33..59a7887 100644 --- a/util/malloc-stats.c +++ b/util/malloc-stats.c @@ -275,8 +275,8 @@ merge_similar_entries (void) } __attribute__ ((destructor)) -static void -finish (void) +void +malloc_stats (void) { int i; @@ -298,4 +298,3 @@ finish (void) } } } - |