Commit graph

269 commits

Author SHA1 Message Date
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
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
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
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
35b9e3c45d More _/- renames in the test directory. 2005-03-29 00:02:19 +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
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
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
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
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
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
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
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
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
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
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
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