Commit graph

1900 commits

Author SHA1 Message Date
Owen Taylor
500cc6fed1 src/cairo-gstate.c src/cairo-gstate-private.h: Store the inverse CTM at the time of cairo_gstate_set_source() to "lock" the user space matrix.
Move the source pattern transformation to the outside of _cairo_gstate_clip_and_composite_trapezoids() instead of doing it at the leaves.
Change size of output surface for aesthetics.
Updated to correspond to the current definition.
Remove source-surface-scale-paint.
reviewed by: cworth
2005-08-01 14:39:01 +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
Carl Worth
26289b3664 Add two new tests: mask-ctm mask-surface-ctm demonstrating that masks are not currently being modified by the CTM. 2005-07-28 15:55:00 +00:00
Carl Worth
08e810f5c1 Remove text-antialias-subpixel-ref.png from the list since it doesn't exist yet. 2005-07-28 11:41:37 +00:00
Carl Worth
1481fa5132 Add text-antialias-{gray|none|subpixel}-ref.png so they get distributed. 2005-07-28 11:33:11 +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
Carl Worth
a83124a3ee Fix so that one of three different error status values will be returned:
CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_READ_ERROR
Add new CAIRO_STATUS_FILE_NOT_FOUND.
Add new _cairo_surface_nil_read_error and _cairo_surface_nil_file_not_found.
Test the new FILE_NOT_FOUND error.
2005-07-28 10:41:08 +00:00
Owen Taylor
d7699f0c07 Remove text-antialias-none which is now fixed.
No longer xfail.
2005-07-27 19:13:39 +00:00
Carl Worth
2b5d9c8e00 Add CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_FORMAT, and CAIRO_STATUS_INVALID_VISUAL.
Change functions to return type of void:
cairo_scaled_font_extents cairo_surface_finish
Add new functions to query object status:
cairo_scaled_font_status cairo_surface_status
Implementation of new error handling scheme for cairo_surface_t and cairo_scaled_font_t.
Track change in return value of cairo_surface_finish.
2005-07-27 15:39:34 +00:00
Carl Worth
255913de9e Note that the XFAIL tests all need to be fixed before 1.0.
Add three new tests for testing the various antialiasing options for text rendering.
2005-07-27 13:28:15 +00:00
Carl Worth
8cb451962b Fix typo that caused cairo_image_surface_create_from_png_stream to segfault. Closes bug #3863 (thanks to Steve Chaplin).
Add a test to actually call cairo_image_surface_create_from_png_stream.
2005-07-27 09:23:29 +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
cd587375e3 Add valgrind suppressions for libpng/libz use of uninitialized data. There are clearly bugs here that are not cairo's fault as zeroing the buffer before writing the png image actually causes more errors(\!). And, notably, setting all the data to random bytes usually makes the errors go away.
Change the check-valgrind target to include the .valgrind-suppresions file and to tee output into valgrind.log.
2005-07-18 14:35:54 +00:00
Carl Worth
f0fae1d1bc Fix leak of pattern. 2005-07-18 08:23:21 +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
Vladimir Vukicevic
8ad8aa6360 Use XCopyArea when possible, for optimization and bug workaround.
Exercise XCopyArea, XRenderComposite, and XSetTile/XFillRectangle paths for _cairo_xlib_surface_composite
2005-07-15 13:45:19 +00:00
Carl Worth
2534057cb5 Add new check-valgrind target for running the test suite under the influence of valgrind.
Fix memory leak when reference image is not found.
2005-07-15 10:39:59 +00:00
Carl Worth
07d09acf2a Fix a few memory leaks (missing cairo_pattern_destroy in 3 places). 2005-07-15 01:38:38 +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
3e05319bf8 Fix leak of surface. 2005-07-14 17:55: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
3cd006bb2b Fix to accept a cairo_pattern_t rather than a cairo_surface_t as the primary argument.
Track change in _cairo_pattern_release_surface and also pass the appropriate pattern for each acquired surface. The previous backend mismatch was causing memory leaks.
Remove stale comment.
Add missing fclose to keep valgrind happy about memory leaks.
2005-07-14 15:10:47 +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
574b702029 Rename create-for-png test to create-from-png to match the naming of the cairo_image_surface_create_from_png function. 2005-07-14 11:17:12 +00:00
Carl Worth
c41e9d698f Patch a few memory leaks. 2005-07-14 11:11:15 +00:00
Carl Worth
9a2ba48b29 Give enum tags an underscore prefix to match the style of the struct tags. Add new cairo_content_t and change cairo_surface_create_similar to accept a cairo_content_t rather than a cairo_format_t.
Change surface backend create_similar call to accept a cairo_content_t rather than a cairo_format_t.
Fix all calls into create_similar to pass a cairo_content_t rather than a cairo_format_t.
2005-07-08 10:12:28 +00:00
Carl Worth
f766e06d25 Remove CAIRO_STATUS_NO_TARGET_SURFAC and add CAIRO_STATUS_INVALID_STATUS.
Don't check for gstate->target == NULL anymore as the API now guarantees it never occurs.
Check that path->status is a valid status value and cause an INVALID_STATUS error otherwise.
Test the new CAIRO_STATUS_INVALID_STATUS error case in cairo_append_path.
2005-07-06 14:52:01 +00:00
Carl Worth
13a27d19d4 From: J. Ali Harlow" <ali@avrc.city.ac.uk> Reviewed by: Vladimir Vukicevic <vladimirv@gmail.com>
Update win32 backend to match current API, so it actually builds once again.
2005-06-25 02:00:17 +00:00
Carl Worth
f15ec64e7f Rip out cairo_set_error_notfiy function as it is clear that it is not the right approach.
Remove error-notify test.
2005-06-20 09:59:23 +00:00
Carl Worth
d6eca5a45f Reorder fields of cairo_private_t to match initialization order.
Call error_notify callback if set. (cairo_create): Initialize error_notify callback to NULL. (cairo_set_error_notify): New function to allow the user to set an error notify callback.
New cairo_set_error_notify prototye.
New test for cairo_set_error_notify.
2005-06-16 12:20:46 +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
e749cf524c Remove cairo-atsui section since cairo-atsui.h is currently empty. Add cairo_path_data_type_t and cairo_path_data_t.
Add pdf-clip and pdf-clip.pdf.
2005-06-15 10:41:41 +00:00
Kristian Høgsberg
476fe9a66e Implement path clipping and refactor _cairo_gstate_clip() out in three different functions corresponding to the three different clipping modes.
Add NULL pointers for intersect_clip_path.
New test case to exercise PDF clipping code.
2005-06-14 19:45:22 +00:00
Owen Taylor
23976d00b2 Add
-I$(top_builddir)/src for cairo-features.h (Tomasz Cholewo)
2005-06-09 07:26:40 +00:00
Kristian Høgsberg
7b4a65dba4 When clipping, update the clip surface to a new surface the size of the intersection of the old clip surface and the extents of the new clip path. 2005-06-03 16:40:15 +00:00
Carl Worth
707a2c97a1 Add self-intersecting to the list of expected failures. 2005-06-01 13:10:57 +00:00
Carl Worth
48fbc201c7 Add self-intersecting test which demonstrates the long-standing bug with stroking self-intersecting paths. 2005-06-01 11:03:50 +00:00
Keith Packard
45a966f695 Replace nesting-only surface clipping with gstate contained serial-number tracked clipping sets that are loaded into the surface on demand just before each rendering operation. This permits multiple cairo_t contexts to reference a surface without regard to ordering of operations among the contexts.
Also in this patch is a change to the xlib surface that creates two separate Pictures, one for source and one for destination operands which separates the source clipping from destination clipping. Cairo now specifies that sources are never clipped by any clipping applied to them as destinations.
Move cairo_clip_t (renamed from cairo_clip_rec_t) from cairoint.h to cairo-gstate-private.h. Eliminate stack of clip state from surfaces. Add new surface clipping API.
Manage clip objects entirely within the gstate, loading the whole thing into the surface just before drawing.
Source surfaces need not have clipping modified as the surface interface now specifies that source surfaces are always unclipped.
Eliminate nested clipping contexts, leaving clip management entirely to the gstate. Create new clip API for the gstate which uses per-surface serial numbers to match gstate clipping against current surface clipping values.
Surfaces no longer track clipping regions at all, so the old _cairo_surface_get_clip_extents has been replaced with _cairo_surface_get_extents. For PDF/PS surfaces, this function is expected to return a rectangle covering the entire fixed point coordinate space to leave rendering unclipped by the surface.
Region clipping capability is now signalled by a non-NULL function pointer in set_clip_region.
Each surface now contains two Pictures, one for source and one for destination operands so that source operands are never clipped by destination clipping.
CAIRO_STATUS_BAD_NESTING removed
self-copy now passes (Xlib only, until libpixman changes land)
reviewed by: krh, otaylor, cworth
2005-05-26 11:35:44 +00:00
Carl Worth
ec84ace5a6 Update instructions to match output of 'make distcheck'
Add private headers and flesh out CLEANFILES so that 'make distcheck' actually passes.
2005-05-17 09:08:23 +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
84bc5a32d6 Remove destroy_closure from cairo_output_stream_t interface.
Remove destroy_closure argument from cairo_pdf_surface_create_for_stream. Rename width,height to width_in_points, height_in_points for better clarity.
Brush a bunch of dust off of the PS backend and bring it up to date with the latest API conventions from the PDF backend. These include: accepting a filename rather than a FILE in the primary constructor, providing a stream-based interface for more flexibility, and accepting a surface size in device-space units (points) rather than inches.
Make it a little more clear that the width and height being passed around are in units of points.
Update to the latest cairo-ps.h changes as described above. Notice how much more sane things become now that the surface size is described in device-space units.
2005-05-17 05:58:01 +00:00
Carl Worth
9bf26e8e73 Add simple test for ps surface backend (modeled after pdf-surface.c).
Add print message telling user to examine resulting file.
2005-05-17 01:05:35 +00:00
Carl Worth
189161118f Update PDF test case to make sure we're actually getting the right paper size, image scaling etc. And it should now be easier to see if cairo is happy by manually viewing the resulting PDF file. 2005-05-17 00:54:09 +00:00
Carl Worth
91dcaea6a2 Update to the latest PDF surface API changes: use filename not FILE* and use surface dimension in points, not inches. 2005-05-17 00:34:10 +00:00
Carl Worth
e5b31bca7c Remove quarter-over test name accidentally added to Makefile. 2005-05-16 15:05:56 +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