Commit graph

815 commits

Author SHA1 Message Date
Carl Worth
d5ca4e37d7 Update xcb backend to compile after recent API changes:
Fix missing return value. (_cairo_xcb_surface_acquire_source_image): Remove calls to non-existent cairo_surface functions. (_cairo_xcb_surface_set_matrix): Update for new matrix member names. (_cairo_xcb_surface_get_extents): Fix typo.
2005-05-12 23:09:58 +00:00
Keith Packard
949daa1bc9 libpixman creates an A8 format object and sometimes forgets to destroy (when the bounds of the trapezoids are empty). Avoids creating the format object in that case.
reviewed by: cworth
2005-05-12 20:25:07 +00:00
Carl Worth
27d9c575a7 Add new test for bug in cairo_paint_with_alpha not transforming the source.
Use a transformed copy of the source just like we do in all the other calls to cairo_surface_composite. Fixes the bug tested by test/paint-with-alpha.
2005-05-12 11:02:35 +00:00
Keith Packard
52f41b7bf0 _get_mask_extents creates a pixman region but neglects to destroy it.
reviewed by: otaylor
2005-05-12 08:04:22 +00:00
Owen Taylor
e4e5b1f00d Handle more cases by assuming no-super-luminescent colors. 2005-05-11 16:32:44 +00:00
T Rowley
b913a81c34 Revive quartz backend.
Set fill type repeat on source surface. (_cairo_glitz_surface_show_glyphs): Add missing cairo operator to glitz operator conversion. (_cairo_glitz_surface_show_glyphs): Only render glyphs with non zero size.
Fix bounding box computation.
2005-05-11 16:01:56 +00:00
Tor Lillqvist
3be31fee9a Revive quartz backend. 2005-05-11 15:39:26 +00:00
David Reveman
ac278285c8 Avoid empty glyphs 2005-05-11 13:53:18 +00:00
David Reveman
bd168e15ca Fix fill_rectangles and show_glyphs in glitz backend 2005-05-11 13:30:56 +00:00
Owen Taylor
59c2730b1d src/cairo-xlib-surface.c src/cairo-xlib.h: Remove leftover cairo_xlib_surface_create(). 2005-05-10 21:06:01 +00:00
Owen Taylor
0c7c224668 src/cairo.c src/cairo-path-data.c src/cairo-path-data-private.h: Pass the gstate to _cairo_path_data_create[_flat] and use _cairo_gstate_backend_to_user() so as to properly handle the surface device offset. 2005-05-10 20:45:54 +00:00
Carl Worth
4e1cce108b Don't use return when calling a void function (thanks to Damien Carbery <damien.carbery@sun.com>). Closes bug #3134. 2005-05-10 20:38:21 +00:00
Carl Worth
b05c85eafb Removing mucking around with stderr and add a cairo_test_log function instead.
Switch all error messages from fprintf(stderr,...) to cairo_test_log(...).
2005-05-10 20:25:38 +00:00
Carl Worth
40796148b8 Fix URLs for glitz and xlibs, (thanks to Jason Dorje Short <jdorje@users.sf.net>). 2005-05-10 14:54:48 +00:00
Carl Worth
6f3215cb7f Update to current canonical URL for XCB. 2005-05-10 14:48:05 +00:00
Carl Worth
3253534a82 Don't guess and make our own definitions for uint8_t, etc. Just error out if we can't find a suitable header file.
Fix to use fixed-size type so that this code works when sizeof(unsigned long) != 32. Thanks to Manish Singh.
2005-05-10 12:42:32 +00:00
Carl Worth
c66ca528e0 Fix cairo_get_font_matrix to actually use its out-parameter. And change the return type to void. 2005-05-10 12:22:41 +00:00
Owen Taylor
7b46c815d2 Get the glyphslot point *after* we get the FT_Face. (Robert O'Callahan) 2005-05-09 16:33:59 +00:00
Carl Worth
01b2526ceb Fix deprecation macro to point to the right function, (thanks to John Ellson). 2005-05-09 10:41:17 +00:00
Carl Worth
14c690472c Push cairo_matrix_t const-correctness down through the entire implmentation, (expanding on preliminary work by Robert O'Callahan <rocallahan@novell.com>) 2005-05-09 09:12:52 +00:00
Carl Worth
31b4e5b4ec Change cairo-features again so that either #if or #ifdef will work to test any feature. 2005-05-09 08:34:57 +00:00
Owen Taylor
2e72b70124 doc/public/language-bindings.xml doc/public/cairo-doc.xml doc/public/Makefile.am: Document suggested conventions and techniques for many aspects of creating a language binding for Cairo. 2005-05-07 14:31:01 +00:00
Owen Taylor
35248a17fd Update. 2005-05-07 10:35:35 +00:00
Carl Worth
bc79406260 Point to both cairo_set_source_rgba and cairo_paint_with_alpha in deprecation of cairo_set_alpha. 2005-05-06 22:42:52 +00:00
Carl Worth
750cc8143d Make idempotent substitutions that extend old names:
cairo_select_font -> cairo_select_font_face cairo_pattern_add_color_stop -> cairo_pattern_add_color_stop_rgba
by only substituting if the old name is not immediately followed by an underscore.
Tweak the substitution slightly to allow the script to be run on the cairo source itself, (eg. avoid changing the REPLACED_BY and DEPRECATED_BY macros that must mention the old names).
2005-05-06 21:59:10 +00:00
Carl Worth
10c88d4244 Change definitions of everything in cairo-features.h to prefer #if over #ifdef.
Track #ifdef -> #if changes.
Add support to automatically change all #ifdef CAIRO_HAS to #if CAIRO_HAS.
2005-05-06 21:33:22 +00:00
Carl Worth
9939e01b69 Remove deprecated cairo_get_rgb_color that was accidentally missed in the recent purge of deprecated functions. 2005-05-06 21:25:56 +00:00
Carl Worth
4fff218fc4 Update to track new CAIRO_OPERATOR names.
Fix documentation to refer to functions by their current names.
Update to track latest API (in currently unused function).
2005-05-06 21:19:49 +00:00
Carl Worth
7bf02c12ab Fix return type from cairo_status_t to cairo_int_status_t. 2005-05-06 14:20:05 +00:00
Carl Worth
c7afce2ffd Note that cairo_mask, and "just eliminate a bunch of functions are now done".
Note that all backwards-compatible and backwards-incompatible cahnges for the API Shakeup are now done. Sort "new functionality" of API Shakeup into its own category.
2005-05-06 13:42:45 +00:00
Carl Worth
d7fe527e0f Eliminate the following deprecated functions from cairo's interface:
cairo_copy cairo_get_path cairo_get_path_flat cairo_matrix_create cairo_matrix_destroy cairo_matrix_copy cairo_matrix_get_affine cairo_surface_set_repeat cairo_surface_set_matrix cairo_surface_get_matrix cairo_surface_set_filter cairo_surface_get_filter
Also, eliminate all support for compiling against, or running with old, deprecated names for functions.
Deal with all of the removals.
2005-05-06 13:32:53 +00:00
Carl Worth
a790a2ea79 Rename and re-order the cairo_operator_t enum to names that abbreviate less and are easier to understand, (eg. CAIRO_OPERATOR_DEST_OVER instead of CAIRO_OPEERATOR_OVER_REVERSE). 2005-05-06 13:26:16 +00:00
Carl Worth
d6fc5ee5e9 Remove cairo_set_target_surface and all other backend-specific cairo_set_target functions. Require a cairo_surface_t* to call cairo_create.
Port to use new cairo_create interface.
Rewrite all tests that were using cairo_set_target_surface to instead create a temporary cairo_t, (eventually to be replaced with cairo_begin_group).
2005-05-06 13:23:41 +00:00
Owen Taylor
cea1de7579 src/cairo.[ch] doc/public/cairo-sections.txt: Add cairo_paint_with_alpha().
Fix segfault when mask == NULL.
test/mask.c test/mask-ref.png: Add testing of cairo_paint_with_alpha().
test/coverage.c test/coverage-ref.png: Remove ... it's not testing anything that mask doesn't test better.
2005-05-06 12:00:22 +00:00
David Reveman
7f79e048b9 Add glyph caching to glitz backend 2005-05-04 05:45:59 +00:00
Kristian Høgsberg
8e485ec8c2 Fills as paths patch originally by Owen Taylor.
Make sure we have a current point for the relative path operators.
Add fill_path backend method.
Implement fill_path in the PDF backend.
2005-05-03 14:28:50 +00:00
Carl Worth
05ccd76854 Originally 2005-04-20 Carl Worth <cworth@cworth.org>
Remove cairo_show_surface. Add new cairo_set_source_surface.
Remove _cairo_gstate_show_surface.
Replace calls to cairo_show_surface with cairo_set_source_surface; cairo_paint.
Fix messages to prefer - over _.
Fix documentation.
Three new tests to exercise set_source_surface more completely, (two of these are expected failures dues to outstanding bugs).
2005-05-03 08:33:32 +00:00
Carl Worth
8283381f12 Add suggestion for copy-on-write regions to fix clip region problems.
Fix check for old headers to respect DESTDIR, (to work better when cross-compiling, etc.). Thanks to Luke-Jr <luke-jr@utopios.org>.
2005-05-03 08:16:47 +00:00
Owen Taylor
e227a10685 Changes the sign of extents->descent to match win32 backend and the conventional convention.
Document cairo_font_extents_t.
2005-05-02 14:20:07 +00:00
Owen Taylor
7dbd1f4401 src/cairo-surface.c src/cairoint.h: Add _cairo_surface_begin/end to save and restore the clip state of a surface. Copy and store clip regions set on a surface so that we can save and restore them.
Add a CAIRO_STATUS_BAD_NESTING error for interleaved use of two cairo_t's on the same surface. Also, add a skeleton doc comment for cairo_status_t.
src/cairo.c src/cairo-gstate.c src/cairoint.h: Use _cairo_surface_begin/end to replace _cairo_gstate_restore_external_state.
Use _cairo_surface_begin/end to save the state of a surface when we start drawing at it and restore it at the end. Check that the save level of the surface is what we expect on drawing operations and fail with CAIRO_STATUS_BAD_NESTING otherwise.
src/cairo-pattern.c src/cairoint.h (_cairo_pattern_acquire_surface_for_surface) (_cairo_pattern_release_surface): Surround use of pattern->surface with _cairo_surface->begin/end so we don't clip surfaces used as sources.
test/clip-nesting.c test/Makefile.am: Test of destinatin clipping with the nested creation of cairo_t's for the same context.
test/source-clip.c test/Makefile.am: Test that clipping on a source as a destination doesn't affect use of it as a source.
XFAIL test for copying from a surface as a source to itself as a destination with a clip.
2005-05-02 13:39:30 +00:00
Keith Packard
4ce3d3fb26 Use correct arguments to compute absolute positions.
Test cairo_rel_move_to, cairo_rel_line_to and cairo_rel_curve_to
reviewed by: cworth
2005-05-02 12:36:20 +00:00
Owen Taylor
1464e35fde not mask.png. (Pointed out by Carl) 2005-05-02 11:42:41 +00:00
Owen Taylor
79b2a79f2d src/cairo.[ch] src/cairo-gstate.c: Add cairo_mask() and cairo_mask_surface().
test/maks.c tests/Makefile.am tests/mask-ref.png: Add a comprehensive tests for cairo_mask().
Updated
2005-05-02 11:01:18 +00:00
Kristian Høgsberg
0c40f66c04 Also call _cairo_gstate_ensure_font() for this function. 2005-05-01 22:30:58 +00:00
Owen Taylor
388a8d491d Add a item about reworking cairo_format_t. 2005-04-28 13:41:00 +00:00
Owen Taylor
2dd5f40bc0 Set image->pCompositeClip here. (IcComputeCompositeRegion) src/icrect.c (pixman_color_rects): Remove workaround clipping to the clientClip. 2005-04-28 11:16:52 +00:00
Carl Worth
2a6e7ef7c3 Replace annoying _ in output image filenames with - for better consistency. 2005-04-28 11:15:47 +00:00
Carl Worth
f3bc5e5554 Use 1 instead of 0 for width and height to avoid BadValue errors from XCreatePixmap. 2005-04-27 14:09:41 +00:00
Carl Worth
2f5b0808b8 Add support for testing multiple backends, courtesy of cairo_surface_write_to_png. Currently, only image and xlib backends are fullk hooked-up, but other backends should be quite easy to add for anyone skilled in the appropriate art. 2005-04-27 13:33:25 +00:00
Owen Taylor
eabc32a011 Don't use pixman_compositeSrc_8888x8888 when the source is x8r8g8b8 or x8b8g8r8. 2005-04-27 13:02:20 +00:00