Commit graph

1900 commits

Author SHA1 Message Date
Carl Worth
35b9e3c45d More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
Carl Worth
9bb1715159 Move surface-specific cairo_t functions to cairo.c.
Remove functions that have now moved to cairo.c.
A few new files to ignore now with new compilation mode using a libtool helper library.
2005-03-23 13:49:32 +00:00
Carl Worth
c629df8616 * src/cairo.c: (cairo_copy_path), (cairo_copy_path_flat), (cairo_append_path): Rename cairo_copy_path_data, cairop_copy_path_data_flat, and cairo_append_path_data to cairo_copy_path, cairo_copy_path_flat, and cairo_append_path.
Add new cairo_path_t, containing a cairo_path_data_t array and an explicit length. Remove CAIRO_PATH_END_PATH terminator from cairo_path_data_t.
Rename the internal path object from cairo_path_t to cairo_path_real_t.
2005-03-18 14:28:53 +00:00
Kristian Høgsberg
58420806bb From Tor Lillqvist <tml@novell.com>:
Open output PNG files in binary mode.
2005-03-17 13:13:56 +00:00
Kristian Høgsberg
0f52fb2289 Dont call user data destroy function if it's NULL.
Add test case for user data with NULL destroy function.
2005-03-16 12:15:29 +00:00
Carl Worth
30e771d811 Add reference image. 2005-03-14 11:49:12 +00:00
Carl Worth
f385e5f3e4 Fixes to force tests to run against locally compiled version (thanks to Manish Singh). 2005-03-14 11:14:13 +00:00
Carl Worth
a98430092f Added some documentation, so we get some churn here.
New functions: cairo_copy_path_data, cairo_copy_path_data_flat, and cairo_append_path_data.
Add new implementation for cairo_copy_path_data and cairo_append_path_data.
New test for new path_data functions.
2005-03-11 14:29:15 +00:00
Kristian Høgsberg
b032d02322 Fix assert()'s using = instead of ==.
Move xunlink call below the xasprintf that builds the filename to unlink.
2005-03-10 09:22:20 +00:00
Carl Worth
c67ba13a6e Originally: 2005-02-24 Carl Worth <cworth@cworth.org>
Add const qualifier to cairo_user_data_key_t arguments.
Originally: 2005-02-15 Kristian Høgsberg <krh@redhat.com>
Add these two functions to set and get user data on an surface.
Function prototypes for new functions.
Test case for user data functions.
2005-03-10 08:59:11 +00:00
Carl Worth
0daf6b1745 Move filename initialization up to before first use.
Add test for the most trivial cairo_get and cairo_set functions.
2005-03-09 14:34:26 +00:00
Carl Worth
c3bd9b1b8d Change the draw function under test to return a cairo_test_status_t so that it can indicate test failure even if there is no result image. 2005-03-09 13:58:20 +00:00
Carl Worth
6d4653fe22 Rename all the cairo_current functions to cairo_get functions instead. Add documentation for all of these functions (and a few others as well).
Add support so that old binarys should still run and old source should still compile, (though we'll rip that out again on the API Shakeup flag day).
2005-03-09 12:35:36 +00:00
Carl Worth
980eff38e4 Commit workaround to prevent make distcheck from making bogus complaints that gtk-doc is not enabled. 2005-03-08 19:30:19 +00:00
Carl Worth
e586688e6b Look for png images in ${srcdir}/filename as well, so that make distcheck can still find them.
Add romedalen.png to EXTRA_DIST so the tests can pass from the tar file.
Fix typo: cairo-win3 -> cairo-win32.
Add cairo-win32.xml to the list, so it gets generated as well.
Add pointer to new win32 documentation.
2005-03-08 19:25:39 +00:00
Carl Worth
627338ab4a Fix accidental commit of diff, rather than ref image. 2005-03-08 14:30:14 +00:00
Carl Worth
c05059f62f Update coverage-ref.png due to seemingly harmless, though not entirely understood changes. 2005-03-08 14:25:54 +00:00
Carl Worth
246a07022a Shared function for checking unlink errrors. (cairo_test): Move all error messages to test-specific log files for quieter test output.
Make pixman_rotate an expected failure.
2005-03-08 13:44:14 +00:00
Owen Taylor
e7607bb379 Comment and clean up the gradient computation. (_cairo_linear_pattern_classify): Determine if a linear gradient is horizontal or vertical. (_cairo_pattern_acquire_surface_for_gradient): Optimize horizontal/vertical gradients with a repeating surface.
Test case for linear gradients at angles and with a rotated pattern matrix.
2005-03-06 12:05:23 +00:00
Carl Worth
de7d69aff9 Add pixman_rotate to ignore list. 2005-02-24 12:30:23 +00:00
Carl Worth
604e333be2 Convert to utf-8 encoding. 2005-02-22 11:32:02 +00:00
Carl Worth
8c8ced2573 Added testsvg script 2005-02-15 15:07:25 +00:00
Kristian Høgsberg
7296349eaa New test case which exposes off-by-one rotation error in pixman. 2005-02-07 09:38:43 +00:00
Owen Taylor
199c41dafe Mostly-functioning Win32 font backend; no glyph paths yet.
Turn on building of the Win32 font backend.
src/cairo-win32-private.h src/Makefile.am: Private header for the Win32 backend.
src/cairo-win32-private.h src/cairo_win32_surface.c: Internally export _cairo_win32_print_gdi_error() for use in the font code.
src/cairo-win32-private.h src/cairo_win32_surface.c: Add _cairo_win32_surface_create_dib to create a DIB surface.
src/cairo-win32-private.h src/cairo_win32_surface.c: Add _cairo_surface_is_win32()
Check for vasnprintf.
Add a simple fixed-buffer size snprintf fallback in the absence of vasnprintf.
2005-02-01 21:45:51 +00:00
Kristian Høgsberg
a24f2f909e Update prototype to eliminate warning.
Remember to reference surfaces when copying patterns.
Don't call _gstate_create_pattern for internally created patterns. (_cairo_gstate_show_surface): Don't change the surface matrix here, it's done later when we set it up as a pattern.
Correct clip_twice-ref.png filename.
Add these.
Fix broken intersection code.
2005-01-28 12:27:23 +00:00
Kristian Høgsberg
56c96d0140 Update these two once again, this time generated using libpixman-0.1.3 without leaky circles. 2005-01-27 12:28:17 +00:00
Kristian Høgsberg
81d03b3048 Fix missing rounding in these two functions.
Update these to versions with properly rounded alpha values.
Move clip_twice out of XFAIL now that rounding works.
Add new test cases.
2005-01-27 11:40:29 +00:00
Kristian Høgsberg
17ec6f1482 The overall idea of this rewrite is that we want to pass the source pattern all the way down into the backends. The motivation for this is that not all backends want a surface for the source operand, and by passing the pattern down, backends can choose to convert it to a surface if they need that.
The patch removes the create_surface function pointer from the surface vtable and moves much of that code into a couple of helper functions. The composite, compsite_trapezoids, and show_glyphs backend functions are updated to take a cairo_pattern_t instead of a surface as the source.
Change these functions to not create a surface for the pattern and just pass the pattern down to the backend functions.
New function to translate a set of trapezoids.
Break out the code to adjust and restore surface transformation and repeat settings into _cairo_pattern_prepare_surface and _cairo_pattern_restore_surface.
Split cairo_pattern_create_for_surface into an init function and a create function.
Utility functions to create a surface from a pattern.
Update these backends to work with the new pattern API. Glitz work by David Reveman.
Update these to pass through the new set of args.
Update this reference image as we now render it correctly.
2005-01-27 10:46:20 +00:00
Kristian Høgsberg
2654df6afb New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
Kristian Høgsberg
79d9b82ff3 Set alpha to 1 before setting clip mask.
Added the right reference PNG. Running test against stock 0.3.0 gives the expected results.
2005-01-26 14:21:53 +00:00
Kristian Høgsberg
d4fb5c9240 New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder.
Added this PNG from cairo-snippets to use for pattern fills.
expose PNG loading to test cases.
2005-01-26 13:41:55 +00:00
Carl Worth
2a7a9d00cc test/imagediff.c
Add new testsvg script and accompanying imagediff program, (for interim SVG-based test suites while we wait for the standard cairo test suite to mature).
Split buffer_diff out into its own file for the purpose of imagediff.
2005-01-25 14:45:31 +00:00
Carl Worth
f697490665 Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
Carl Worth
d466c33d1d Add a bunch of missing include directives, (now that cairo.h has been cleaned up). 2005-01-20 20:45:38 +00:00
Carl Worth
cc58bc3b9b Remove fill_rule and leaky_polygon from expected failures list. Both of these bugs have fixes, (fill_rule is fixed by reverting cairo_traps.c to 1.16, and leaky_polygon is fixed in a newer libpixman). 2005-01-19 07:55:28 +00:00
Kristian Høgsberg
be7b745a43 Take image_rotate-ref.png out of EXTRA_DIST until we can actually render it correctly. (XFAIL_TESTS): Update with new known bugs.
Add font backend selection options.
2005-01-17 09:18:37 +00:00
Carl Worth
3016995b0d test/Makefile.am
Add leaky_polygon test for trapezoid rasterization corner case.
2005-01-13 14:50:35 +00:00
Carl Worth
4796dc0b26 Add big_star_path which shows we still have fill bugs, (even now that little_star_path is working). 2005-01-12 14:38:22 +00:00
Carl Worth
682202fdfa Disabled test that was killing my machine for some reason. Scary. 2004-12-20 08:08:29 +00:00
Carl Worth
a827069cc5 Fix to find reference images in local directory when run directly, (rather than by "make check"). 2004-12-17 13:23:32 +00:00
Carl Worth
5c143241df Note that text_cache_crash is expected to fail.
Add test to demonstrate bug when item is too big for cache.
Really remove that refcount assertion this time.
2004-11-23 13:38:09 +00:00
Carl Worth
7478ea5051 Add note that bug has been fixed. (main): Instrumentation code for testing cache destruction.
Support tests that produce no output, (don't check image if (width,height) == (0,0)).
Add #include <assert.h> here rather than in multiple .c files.
Add const qualifier to static cache_arrangements table. (_cache_sane_state): Remove refcount assertion as it it false during the cairo_cache_destroy. (_cache_sane_state): #include <assert.h> moved up to cairoint.h (_entry_destroy): Fix bug in assertion (used_memory >= entry->memory), not >. (_cairo_cache_destroy): Fix timing of refcount decrement so that the destroy function actually works.
2004-11-23 12:53:46 +00:00
Carl Worth
fe728e5532 (draw): Move x_off, y_off calculation outside of loop to emphasize loop-independence. 2004-11-09 14:27:32 +00:00
Carl Worth
9dacc32fbc Increase size and increase number of different angles drawn. (draw): Fix broken usage of extents (missing bearings), add stroked bounding box (shifted out by 0.5 units to just abut the text), and increase position adjustments to make room for this larger box. 2004-11-09 14:22:37 +00:00
Carl Worth
12a86de2c4 Add new test demonstrating assertion failure in cairo_cache_lookup.
Add new test showing problems with rotated text.
2004-11-04 14:23:50 +00:00
Carl Worth
39d57762a6 Fix to always link tests against locally built library, not installed version. 2004-10-27 11:42:45 +00:00
Carl Worth
667fa8fc15 Add new test for cairo_set_fill_rule. Also demonstrate some of the current tessellation bugs with the version of the code that is in CVS. 2004-10-27 10:48:58 +00:00
Carl Worth
083de72017 Find reference images in so that make distcheck will work.
Add header files so that make distcheck is happy. (INCLUDES): Add -D_GNU_SOURCE for asprintf. Someone motivated may want to find a more portable approach. (EXTRA_DIST): Add reference images for the sake of make distcheck.
2004-10-26 18:19:55 +00:00
Carl Worth
211b19b475 Add paragraph on new features. 2004-10-26 16:31:31 +00:00
Carl Worth
f8e632ab1e Add initial regression test suite.
Don't AC_SUBST a dozen different FOO_CFLAGS and FOO_LIBS. Instead, incrementally build up just CAIRO_CFLAGS and CAIRO_LIBS.
Don't list flags that should get picked up via dependency information through Requires.
Add description of move_to_show_surface.
2004-10-26 14:38:43 +00:00