Commit graph

157 commits

Author SHA1 Message Date
Carl Worth
0f4beab507 Add call to XSynchronize, (the expected clip-all failure isn't occuring without it for some reason).
Note reason for expected failure.
src/cairo-scaled-font.c: Add an optional text_to_glyphs() virtual function that the backend can implement instead of ucs4_to_index().
Protect inclusion of fontconfig.h with HAVE_FCFINI.
2005-08-31 19:11:22 +00:00
Carl Worth
f25ebec368 Add call to XSynchronize, (the expected clip-all failure isn't occuring without it for some reason).
Note reason for expected failure.
2005-08-31 16:17:28 +00:00
Owen Taylor
099060f925 Some fixes for warnings from sparse (Part of #4208, Kjartan Maraas)
Use NULL, not 0.
Fix C99'ism of mixed code and declarations.
2005-08-23 05:18:48 +00:00
Carl Worth
d1bdd1313e Fix for bug #4142:
Disable xlib tests on X servers without the Render, since they currently just crash there. A better long-term fix would be to do some useful tests in this case. Thanks to Tim Mooney.
2005-08-20 07:56:05 +00:00
Carl Worth
7a9d207040 Disable not-yet-implemented quartz stuff. 2005-08-18 09:19:21 +00:00
Carl Worth
e59d1dff7f Ignore cairo-clip-private.h.
Drop non-existent cairo-atsui.xml.
Fix misnamed parameters in comment blocks.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
2005-08-05 10:40:32 +00:00
Carl Worth
a2dc18fd0c Remove include of math.h since cairoint.h does it more carefully, (for annoying platforms for which just including math.h without extra defines is not enough).
Replace Cairo with cairo.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
Fix non-UTF-8 copyright symbol.
2005-08-05 10:05:29 +00:00
Carl Worth
0586daaa29 Patch from John Ehresman <jpe@wingide.com> to aid win32 compilation:
Define snprintf as _snprintf when under the influence of _MSC_VER.
Define int32_t and friends as __int32 and friends when under the influence of _MSC_VER.
Make include of unistd.h conditional on HAVE_UNISTD_H.
2005-08-05 07:48:18 +00:00
Carl Worth
b45f688765 Fix for bug #3951:
Add new _CHECK_FUNCS_WITH_FLAGS to abstract out the pain of temporarily setting flags for AC_CHECK_FUNCS. Use this to check for the existence of FcFini.
Make call to FcFini conditional on HAVE_FCFINI.
Remove stale comment about cleaning up memory which is now handled by cairo-test.c.
2005-08-03 10:32:50 +00:00
Carl Worth
c525c684ca New public header file.
New function to reset all static data (eg. caches) to their initial state.
Fix check-valgrind target to depend on the 'all' target.
Add check for a new, proposed, XrmFinalize function.
Add cairo-debug.c.
Move the definition of CAIRO_BEGIN_DECLS to cairo-features.h so that it can be shared between public header files, and so that it doesn't clutter cairo.h
Implement reset_static_data in all modules as required.
Call cairo_debug_reset_static_data and FcFini so that we can have all tests be valgrind-clean with respect to memory leaks and still-reachable data.
2005-08-01 13:33:47 +00:00
Dave Beckett
e604017c77 Use cairo_surface_status(image) instead of testing for NULL from cairo_image_surface_create_from_png to enable testing when srcdir != builddir again. 2005-07-28 11:22:36 +00:00
Keith Packard
88cf98fe33 Add Screen* arguments to:
cairo_xlib_surface_create_with_xrender_format cairo_xlib_surface_create_for_bitmap
Required to correctly identify when two Xlib surfaces are compatible with Core and Render rendering requests.
cairo_xlib_surface_create can determine the screen given the required Visual *
reviewed by: otaylor
2005-07-20 18:52:31 +00:00
Carl Worth
751e059f5c Note some progress.
New helper function to help create an image surface from a PNG file, while taking the srcdir environment variable into consideration. Rename the pattern creating helper function to match.
Use new cairo_test_create_surface_from_png so that non-srcdir builds work.
Track change in cairo_test_create_pattern_from_png.
2005-07-18 08:04:16 +00:00
Carl Worth
89a9771b60 Remove errant line of code that was inadvertently committed recently. 2005-07-15 00:56:58 +00:00
Carl Worth
40edca337e Rewrite to use cairo_image_surface_create_from_png rather than custom read_png_argb32. In addition to being simpler, this eliminates the leak of the image data buffer.
Add calls to cairo_pattern_destroy to close two memory leaks.
2005-07-14 16:18:39 +00:00
Carl Worth
288f0f7f49 Make the per-backend test results print XFAIL rather than FAIL for expected failures. 2005-07-14 12:50:28 +00:00
Carl Worth
6f6c9196c8 Fix comment describing test result. It's not enough that all tested backends are successful. We also require that at least one backend is actually tested. 2005-07-14 12:25:41 +00:00
Carl Worth
456e3ffc4d Don't consider a test to fail if it can't create a surface at all (eg. no X server is available). Instead mark this backend as untested and only consider the overall test a success if all tested backend are successful. 2005-07-14 12:20:42 +00:00
Carl Worth
c41e9d698f Patch a few memory leaks. 2005-07-14 11:11:15 +00:00
Carl Worth
fac3cd46b3 (cairo_test_for_target): And add missing parenthesis. 2005-06-15 10:58:52 +00:00
Carl Worth
0b122003e7 Track removal of cairo_status_string. 2005-06-15 10:56:31 +00:00
Carl Worth
30d7ede3df Update cairo-xcb.h to provide the same style of interface as cairo-xlib.h.
Update to match new cairo_xcb_surface_t create functions.
2005-05-17 06:11:32 +00:00
Carl Worth
0c05b23b31 Rework of cairo_xlib_surface create functions by Keith Packard:
Add cairo_xlib_surface_create_with_render_format.
Reduce Xlib constructors down to two simple forms. Add width, height to constructors and eliminate any synchronous size queries from the implementation.
Update to match new cairo_xlib_surface_t create functions.
2005-05-17 06:05:13 +00:00
Carl Worth
60b0a05df7 Brush the dust off the XCB backend and get it compiling and working again. This patch makes the XCB surface API match that of the Xlib surface API as of yesterday. But, it's already stale as the Xlib API changed again. So we'll need one more revision of the XCB backend before the next snapshot.
Add support for testing of the xcb backend as well.
2005-05-14 14:01:46 +00:00
Carl Worth
6a1af1999d Cleanup output a bit, move verbose messages to test-specific log file. 2005-05-14 13:51:59 +00:00
Owen Taylor
bef4b13716 src/cairo-xlib-surface.c src/cairo-xlib.h doc/public/cairo-sections.txt: Drop the _for_pixmap() and _for_window() out of the create functions and use some lazy cleverness to sniff the information out as needed.
src/cairo-xlib-surface.c src/cairo-xlib-test.h Makefile.am: add cairo_test_xlib_disable_render() to turn off RENDER for tests.
Test various different types of Xlib surface creation.
Remove left-over include of Xrender.h.
2005-05-13 17:54:43 +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
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
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
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
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
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
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
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
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