Commit graph

537 commits

Author SHA1 Message Date
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
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
c382f9daf0 src/cairo-traps.c src/cairoint.h (_cairo_traps_init_box): New function to create a single trapezoid box.
src/cairo.c src/cairo-gstate.c src/cairoint.h: Move the implementation of cairo_paint() into cairo-gstate.c for a better fix for the problem with backend/user coordinate confusion. Also no longer clear the current path on cairo_paint()
2005-04-27 10:16:47 +00:00
Carl Worth
153e0c5eab Build rectangle with an identity matrix in place so that the entire target surface will be filled even when there is a transformation in place. 2005-04-26 19:04:48 +00:00
Carl Worth
1c316ca07a Add test to demonstrate bug in cairo_paint when under a non-identity transformation. 2005-04-26 18:56:37 +00:00
Owen Taylor
86a17d5357 Updated.
src/cairo-png.c src/cairo.h: Fix up some doc build issues.
2005-04-26 15:28:01 +00:00
Carl Worth
2847ff9d6e Note that cairo_paint and cairo_clip/fill/stroke_preserve are all done now. 2005-04-26 13:05:51 +00:00
Carl Worth
1baa4d1329 Originally: 2005-04-19 Carl Worth <cworth@cworth.org>
Add cairo_stroke_preserve, cairo_fill_preserve, and cairo_clip_preserve.
Rip the path out of cairo_gstate_t.
Add path to cairo_t.
Bring in most of the path code that used to live in cairo-gstate.c
Move arc generation code into its own file.
Accept path+ctm_inverse+tolerance instead of gstate. Absorb flattening and device space->user space conversion that used to be in _cairo_gstate_intepret_path.
Prefer cairo_fixed_t parameters over ciaro_point_t for cross-file interfaces.
Track changes in _cairo_path_fixed interfaces.
Port to use cairo_fill_preserve rather than cairo_save/cairo_restore which no longer work for saving the path.
Remove get and set of current point since it is no longer affected by cairo_save and cairo_restore. Add get and set testing for cairo_matrix_t.
2005-04-26 12:38:06 +00:00
Carl Worth
618792c8c0 Add very simple test to generate PDF output, (no automated verification yet).
Track PNG interface changes, (no more include of cairo-png.h, cairo_surface_write_png renamed to cairo_surface_write_to_png).
2005-04-26 09:43:39 +00:00
Kristian Høgsberg
a5f734455c Prototypes moved to cairo.h, this file removed. 2005-04-25 21:52:13 +00:00
Kristian Høgsberg
28e7bbea65 Renamed from cairo_surface_write_png_to_stream() for consistency. (cairo_surface_write_to_png): Renamed from cairo_surface_write_png() for consistency. 2005-04-25 21:36:38 +00:00
Kristian Høgsberg
87009d692b Factor out bulk of the code into a new callback based function, write_png(). Call it with a stdio write callback. (cairo_surface_write_png_to_stream): New function to write a surface to a PNG stream. (cairo_image_surface_create_from_png): Likewise, move most of the code to read_png(), clean up error handling and reduce this function to calling read_png() with a stdio based read function. (cairo_image_surface_create_from_png_stream): New function to create an image surface from a PNG stream.
New functions to get widht and height of an image surface.
Add new prototype and error codes.
Adjust to new PNG API.
2005-04-25 20:42:54 +00:00
Owen Taylor
e55161d2b2 Initialize the saved_dc_bitmap field here as well ... not strictly needed, but cleaner. (Reported by Peter Arsoff) 2005-04-25 19:38:44 +00:00
Kristian Høgsberg
1c756648fc Finalize the correct pattern. 2005-04-23 11:58:18 +00:00
Kristian Høgsberg
70211bdbca Only check PNG signature if we read all the bytes. Don't fclose() the FILE argument (Steve Chaplin <stevech1097@yahoo.com.au>).
Rename to cairo_image_surface_create_for_png() to cairo_image_surface_create_from_png() and change FILE arguments for this function and cairo_surface_write_png() to be a filename argument instead.
2005-04-22 17:32:12 +00:00
Kristian Høgsberg
0f0a6a57a3 Handle backends that don't have a set_clip_region implementation (PDF). 2005-04-21 15:18:14 +00:00
Carl Worth
9c10b54e5e Add new cairo_paint function.
Add new get_extents function to the surface backend interface.
Add function to query current clip_extents.
Implement the new get_extents function for each backend.
Save the clip extents from set_clip_region and implement _cairo_surface_get_clip_extents.
Abstract away the evil XGetGeometry roundtrip in _cairo_xlib_surface_get_size.
Rewrite a couple of tests to call cairo_paint.
2005-04-19 16:29:04 +00:00
Carl Worth
60ec322241 Update API Shakeup chart to indicate that cairo_paint and cairo_fill_preserve patches have been sent. 2005-04-19 06:38:07 +00:00
Carl Worth
f13b13a70e Add a test of a repeating surface pattern. 2005-04-18 16:26:14 +00:00
Carl Worth
aef8f9b1a0 Mark a couple of items that are now complete.
Add test case that fills and strokes the same shapes, (in preparation for testing cairo_fill_preserve patch).
2005-04-18 05:25:57 +00:00
Carl Worth
ea82928aa7 Update API Shakeup chart to indicate that cairo_set_source is done. 2005-04-14 15:02:47 +00:00
Carl Worth
828094aef8 and delete:
cairo_set_pattern -> cairo_set_source cairo_get_pattern -> cairo_get_source cairo_set_rgb_color -> cairo_set_source_rgb
-> cairo_set_source_rgba cairo_set_alpha -> cairo_get_alpha ->
Note that we'll likely want to add cairo_set_source_surface.
Add _cairo_stock_color helper function. Improve some interfaces:
_cairo_color_init _cairo_color_init_rgb _cairo_color_set_rgb -> _cairo_color_init_rgba _cairo_color_set_alpha _cairo_color_multiply_alpha
_cairo_color_get_rgb -> _cairo_color_get_rbga _cairo_color_get_rgba_premultiplied
Add cairo_stock_t and some helper macros:
CAIRO_COLOR_WHITE CAIRO_COLOR_BLACK CAIRO_COLOR_TRANSPARENT
Fix cairo_pattern_t by eliminating pattern->alpha. Fix cairo_solid_pattern_t to use cairo_color_t rather than three doubles.
Track removal of pattern->alpha, simplifying the code considerably
Track _cairo_color interface changes. Remove gstate->alpha. Propagate down set_source renamings.
cairo_pattern_add_color_stop -> cairo_pattern_add_color_stop_rgba
and add:
cairo_pattern_add_color_stop_rgb
Remove pattern->alpha, simplifying the code considerably.
Track pattern and color interface changes.
Add const where appropriate on cairo_color_t*.
Add private type inspection predicate. (cairo_xlib_surface_set_size): Add check for surface type mismatch, (no useful error reporting yet, though).
Note coverage as en expected failure.
Improve line wrap on expected failure messages.
Port all tests to new cairo_set_source interfaces.
2005-04-14 14:42:26 +00:00
Carl Worth
c0d9c13d04 Make gradient change color in addition to just changing alpha in order to highlight distinction between interpolating in premultiplied vs. non-premultiplied space. 2005-04-14 14:02:03 +00:00
Carl Worth
65209fc39c Improve instructions for when to add a test to the XFAIL list.
Print explanations for expected failures.
2005-04-14 10:02:58 +00:00
Carl Worth
d1eb620a19 Add gradient-alpha test in preparation for upcoming cairo_set_source patch. 2005-04-14 09:31:21 +00:00
Carl Worth
95a6f1941a Add set-source test in preparation for upcoming cairo_set_source patch. 2005-04-14 09:13:48 +00:00
Owen Taylor
080f331edd Remove a stray free() (#3029, Carl Worth)
Note that the bug is fixed.
2005-04-14 06:05:59 +00:00
Carl Worth
66688da5e4 Set freed pointer to NULL.
Fix to actually set surface->finished when done. Closes bug #2950 as documented in test/surface-finish-twice.c.
Note that this bug is fixed.
2005-04-13 14:51:59 +00:00
Carl Worth
0fe6378bdb Add new test to exercise crash when calling cairo_surface_finish twice on the same surface. 2005-04-13 14:48:02 +00:00
Carl Worth
f4b2f59c05 Add new set-surface-no-show-text test.
Be sure to call cairo_destroy even if the image size is 0,0 so that we can test bugs triggered during cleanup.
2005-04-13 14:45:05 +00:00
Carl Worth
f3af02bb0e Temporarily remove all text from this test case until we come up with an approach for drawing the same text with different freetype configurations. 2005-04-13 14:24:20 +00:00
Owen Taylor
8feb2717eb Fix ChangeLog entry 2005-04-13 14:03:17 +00:00
Owen Taylor
542e6c8c90 Work around a pair of libpixman bugs (denegerate trapezoids from tesellator, pixman_region_union_rect() failing on width/height zero rectangles) 2005-04-13 14:01:50 +00:00
Owen Taylor
a16a634f97 src/cairoint.h src/cairo-traps.c: Add _cairo_traps_extract_region for converting trapezoids into a pixman region.
Represent all rectangular pixel-aligned regions as regions, not just single rectangles.
Split into manageable pieces, optimize rectangular pixel- aligned regions by using _cairo_surface_fill_rectangles() or _cairo_surface_set_clip_region() as appropriate.
tests/trap-clip.c tests/trap-clip-ref.png tests/Makefile.am: Add a test for trapezoids clipping.
Add an index.
2005-04-13 11:23:43 +00:00
Carl Worth
3bec073a7c Note that bug is now fixed. 2005-04-12 13:24:48 +00:00
Carl Worth
173bc22a62 Replace errant use of aclocal with , as reported by Martin Hedenfalk. Closes bug #3000. 2005-04-12 11:50:25 +00:00
Carl Worth
369d1bf28f Default to CAIRO_FILTER_GOOD rather than CAIRO_FILTER_BEST.
Optimize to use CAIRO_FILTER_NEAREST when the pattern matrix is an integer translation.
2005-04-12 09:14:14 +00:00
Carl Worth
439a94cc7b Use CAIRO_FILTER_BEST by default rather than CAIRO_FILTER_NEAREST. 2005-04-12 07:57:46 +00:00
Carl Worth
8f6fc777d1 Offset the src pattern by (0,0)->CTM. This fixes test/translate-show-surface.
Use unsigned cahr* to match new prototype for cairo_image_surface_create_for_data.
2005-04-12 07:12:08 +00:00
Carl Worth
8f7ea593ba Add new test demonstrating bug in the sequence: cairo_translate; cairo_show_surface. 2005-04-11 14:04:56 +00:00
Carl Worth
a70e8f7c9e Add deprecation alias from cairo_scale_font to cairo_set_font_size. 2005-04-11 11:30:28 +00:00
Carl Worth
9ba4dce811 Add deprecation alias from cairo_select_font to cairo_select_font_face. 2005-04-11 11:20:08 +00:00
Owen Taylor
cf9ea30078 src/cairo.h doc/public/cairo-sections.txt src/cairo-matrix.c: Update.
Include cairo-font.xml
2005-04-11 09:18:51 +00:00
Carl Worth
2a616d6842 Move include of pixman.h from cairo.h to cairoint.h since libpixman isn't part of cairo's public interface.
Use unsigned long rather than uint32_t since we no longer have pixman.h setting that type up for us.
Remove unused variable user_data_copy.
2005-04-08 14:06:32 +00:00
Carl Worth
584cb30145 Add ROADMAP file with an initial stab at 1.0 items. 2005-04-08 13:44:22 +00:00
Owen Taylor
c803908d95 src/cairo.h src/cairo-font.c src/cairoint.h doc/public/cairo-sections.txt: Add cairo_font_face_set/get_user_data().
src/cairo-array.c src/cairoint.h src/cairo-surface.c: Refactor user data code from cairo-surface.c into cairo_user_data_array_t.
Switch these types to be like cairo_surface_t where the generic code frees the wrapper object.
src/cairo-atsui-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Fix up for the above changes.
Implement a complicated mutual-referencing scheme to make sure that a face from cairo_ft_font_face_create_for_ft_face() is freed only when the FT_Face is no longer needed.
Update the docs to describe how to figure out when the FT_Face can be freed.
Fix refcount leaks when creating fonts.
Remove excess call to _cairo_unscaled_font_reference().
Remove stray initialization of font matrix to the identity.
test/user-data.c: Fix a bug when setting/unsetting a key with a free key slot before it, add that to the test case.
Don't append an element when user_data is NULL.
2005-04-08 13:14:17 +00:00