Commit graph

1395 commits

Author SHA1 Message Date
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
21268bc359 Fix a comment from last commit 2005-04-13 14:04:33 +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
Carl Worth
1de5ace6c2 Fix typo 2005-04-13 13:01:54 +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
df997b3f5b Indentation changes 2005-04-11 06:56:10 +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
Dave Beckett
7aa5b71e8c Update to track changes to cairo_matrix_t interface. 2005-04-08 12:42:28 +00:00
Carl Worth
30f0d517aa Eliminate internal use of deprecated cairo_matrix_copy.
Change cairo_get_matrix to accept a pointer to the return value cairo_matrix_t rather than returning the value directly.
2005-04-08 10:03:17 +00:00
Carl Worth
745627ff1b Don't try to return a value (even a void value) from a void function. Closes bug #2931. 2005-04-08 04:43:06 +00:00
Carl Worth
43435b69e1 Remove broken code for defining uint64_t. 2005-04-07 15:00:46 +00:00
Carl Worth
9bef5b6f14 Change to allow NULL backend function pointers to indicate unsupported functions.
Eliminate stub functions and replace with NULL in surface backend table.
2005-04-07 14:25:00 +00:00
Owen Taylor
ac6f15e245 src/cairo.[ch] src/cairoint.h src/cairo-gstate.c docs/public/cairo-sections.txt: cairo_select_font() => cairo_select_font_face() cairo_scale_font() => cairo_set_font_size() cairo_transform_font() => cairo_set_font_matrix() Add cairo_get_font_matrix(). Make cairo_set_font_face() not reset the font matrix. Default the font matrix to SCALE(10). Document cairo_select_font_face().
test/text-cache-crash.c (draw) test/text-rotate.c (draw): Use cairo_set_font_size().
src/cairo-font.c src/cairo.h: Fix up some parameter names for docs.
2005-04-07 13:29:32 +00:00
Carl Worth
62212867d4 Minor changes to header file inclusion recommended by Oleg Smolsky for better portability to MSVC. 2005-04-07 12:56:43 +00:00
Owen Taylor
4a3a6e8719 Fix various compilation errors. 2005-04-07 12:38:02 +00:00
Carl Worth
3ea3186f16 Use a preprocessor macro to get a literal value in the array size declaration, (for better portability to lame compilers that can't deal with a const int variable for the array size). Reported by Oleg Smolsky. 2005-04-07 12:35:33 +00:00
Carl Worth
88a62f07df Use a preprocessor macro to get a literal value in the array size declaration, (for better portability to lame compilers that can't deal with a const int variable for the array size). Reported by Oleg Smolsky. 2005-04-07 12:33:06 +00:00
Carl Worth
d4209c331f Use configure-time checks for stdint.h vs. inttypes.h vs. sys/int_types.h rather than ad-hoc system-specific macros. Also define these types manually none of these header are available. (Thanks to Jason Dorje Short <jdorje@users.sf.net>). 2005-04-07 12:05:52 +00:00
Carl Worth
945e6c2458 Fix to return non-zero status on error. 2005-04-07 11:18:40 +00:00
Owen Taylor
47824dee31 src/cairo.h src/cairo-gstate.c src/cairo-font.c: Add a cairo_font_face_t type to hold a description of a font face. Replace cairo_set_font() with cairo_set_font_face().
src/cairoint.h src/cairo-font.c src/cairo-gstate.c: Add "cairo_simple_font_face" for family/weight/slant and use it to implement font naming for the toy API.
src/cairo-ft.h src/cairo-ft-font.c cairo-win32.h cairo-win32-font.c: Switch the FreeType and Win32 backends over to using cairo_font_face_t.
src/cairo.h src/cairo-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Pass in font matrix and CTM separately rather than as a composite scale when creating fonts; allows removing font_matrix argument to metrics functions.
src/cairoint.h src/cairo-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Remove cairo_font_scale_t type, just use cairo_matrix_t and ignore translations.
src/cairo-ft.h src/cairo-ft-font.c: Remove cairo_ft_font_get_pattern() -- it can't work for all FreeType backend fonts and doesn't seem particularly useful.
Rename cairo_font_get_extents() to cairo_font_extents()
split font functions into a separate section.
Fix locking order problem.
Add caches for simple font faces and from cairo_font_face_t to cairo_scaled_font_t.
src/cairo.h src/cairoint.h src/cairo-font.c src/cairo-win32-font.c src/cairo-ft-font.c src/cairo-gstate.c src/cairo-gstate-private.h: Rename cairo_font_t to cairo_scaled_font_t.
2005-04-07 11:03:59 +00:00
Carl Worth
d135938efd Rework the cairo_matrix_t interface in several ways. Expose a struct for cairo_matrix_t.
Add new function to return current matrix: cairo_get_matrix
Deprecate the following functions (in documentation): cairo_matrix_create cairo_matrix_destroy cairo_matrix_get_affine
Rename: cairo_matrix_set_affine -> cairo_matrix_init cairo_matrix_set_identity -> cairo_matrix_init_identity
Add other new matrix initialization functions: cairo_matrix_init_translate cairo_matrix_init_scale cairo_matrix_init_rotate
Change return type of almost all cairo_matrix functions from cairo_status_t to void.
Track changes to cairo_matrix_t interface.
Add a test case showing the same path drawn under various transforms, (including skews set directly by initializing a cairo_matrix_t).
2005-04-07 10:01:49 +00:00
Carl Worth
92060c12ee Make handling of unsigned char* vs. char* consistent. Change all parameters that are actual string data from unsigned char* to char* (cairo_text_extents, cairo_show_text, cairo_text_path). Change all data buffers from char* to unsigned char* (cairo_write_func_t).
Track changes from unsigned char* to char*. Convert to unsigned only at the internal interface to unicode processing.
Track change from char* to unsigned char*.
2005-04-06 13:01:13 +00:00
Carl Worth
957ceac0c6 Fix reversed arguments in call to calloc. 2005-04-06 12:20:02 +00:00
Carl Worth
a6d9b6a671 Change type of data parameter from char* to unsigned char*.
Propagate the unsigned char* change down the stack.
Add cast since XImage uses char* rather than unsigned char*.
Fix memory leak of image data.
Switch to use cairo_surface_write_png rather than a custom write_png_argb32.
Add test to exercise the cairo_image_surface_create_for_png function.
2005-04-04 09:47:12 +00:00
Carl Worth
770d4c55b4 Remove items for PNG backend removal and trapezoid reasterization re-implementation since they have been completed. 2005-04-04 09:25:47 +00:00
Carl Worth
027057bf62 Drop cairo_default_matrix since it is now always identical to cairo_identity_matrix.
Remove gstate->pixels_per inch. Change default matrix to always be the identity matrix.
Drop pixels_per_inch function from surface backend interface as it is no longer needed.
2005-04-04 06:49:19 +00:00
Carl Worth
5778c77382 Use the current point to offset just the destination, not the source and destination. With this fix, cairo_show_surface should work with the current point at places other than the origin.
Move move-to-show-surface off the expected failure list.
Add comment indicating that bug is resolved.
Don't use diff to compare images, just imagediff.
2005-04-02 06:00:32 +00:00
Carl Worth
9e405876e8 Style and indentation fixes.
cast to quiet new gcc-4 warnings.
Initialize variables to quiet new gcc-4 warnings.
Use unsigned char* as expected by freetype, libpng, Xlib, and zlib.
Propagate unsigned char* down from cairo_text_extents.
2005-04-02 05:18:11 +00:00
Carl Worth
7636e90184 Update API shakeup chart.
Add a standin for the function that should be cairo_set_target_image which should then have some other name. We can straighten that mess out when we eliminate the set_target functions. Add deprecation alias for cairo_current_pattern.
Deprecate cairo_surface_create_for_image in favor of cairo_image_surface_create_for_data.
2005-04-01 18:00:00 +00:00
Kristian Høgsberg
5abf7786c0 Remove this function now that the PNG backend is gone. 2005-03-31 13:25:44 +00:00