Commit graph

871 commits

Author SHA1 Message Date
Carl Worth
5699072035 Fix Freudian unwrapped line in paragraph describing why long lines should be wrapped. 2005-06-03 15:54:40 +00:00
Carl Worth
36beed9bf1 Add CODING_STYLE document to standardize on some style issues.
Standardize brace handling around all else clauses according to new CODING_STYLE guidelines.
2005-06-03 14:51:57 +00:00
Kristian Høgsberg
f87fd91bcf Patch from Tomasz Cholewo <cholewo@ieee-cis.org>:
Store the index of the checksum instea of a pointer to the location.
2005-06-03 10:28:42 +00:00
Carl Worth
bb00e0fce5 Move internal convenience up from _cairo_gstate_set_source_solid to _cairo_set_source_solid so that all set_source functions flow through cairo_set_source. 2005-06-03 09:38:39 +00:00
Carl Worth
4914eac983 Remove obsolete _cairo_gstate_set_target_surface, folding its contents into _cairo_gstate_init, most of which disappears due to constant folding. Ensure that gstate->next is initialized even if _cairo_pattern_create_solid fails.
Remove unused _cairo_xcb_surface_set_clip_region.
2005-06-01 13:36:20 +00:00
Carl Worth
c56938e568 Rename CAIRO_OK to STATUS_OK. No intended changes in functionality. 2005-06-01 13:24:10 +00:00
Carl Worth
045ba795da Rename gstate->surface to gstate->target. No intended changes in functionality. 2005-06-01 13:19:52 +00:00
Carl Worth
6c62cf7643 Remove unused fields from cairo_gstate_t, (font_family, font_slant, font_weight). Reorder fields to match between declaration and initialization and to put the most problematic fields (surface and source) at the end. No intended changes in functionality. 2005-06-01 13:13:10 +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
Carl Worth
37a48e674c Fix bug in converting box to rectangle that left clip_rect.height uninitialized, (leading to unpredictable, intermittent test failures). 2005-06-01 00:29:24 +00:00
Carl Worth
7bb6dfdaa2 Add new function cairo_status_to_string an reimplement cairo_status_string in terms of the new function. 2005-05-31 16:05:06 +00:00
Olivier Andrieu
63428d3cc7 : Fix memory leak 2005-05-26 17:35:35 +00:00
Keith Packard
ae96f5db6c Split clipping into separate source and destination operand clips. By default, source operands are not affected by any client clipping. This matches the desired semantics for cairo. When this code is ported back to the X server, that will have to select the clipping option which clip source operands to the client clip. 2005-05-26 13:02:31 +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
Olivier Andrieu
be903f4c22 trivial doc fixes. 2005-05-26 03:31:28 +00:00
Carl Worth
17a5c3a3da Re-synch with latest from gtk-doc CVS tree.
Add --only-section-tmpl option so that changes to inline documentation does not lead to churn in the .sgml template files.
Commit new templates now that gtk-doc has ripped all the inline portions out.
New template files added for new sections.
Update to match current API.
Make parameter names match those in the .c file and its documentation.
2005-05-24 16:08:39 +00:00
Carl Worth
d41465d89a Protect less-than and greater-than symbols in documentation string. 2005-05-22 11:12:46 +00:00
Carl Worth
e90a5c8990 Not that a patch has been submitted for consistent error handling.
Fix documentation string for cairo_create so that it might actualyl appear in the manual.
2005-05-22 09:08:23 +00:00
Carl Worth
b16dafe553 Add -head to CAIRO_VERSION after tagging with SNAPSHOT_0_1_5. 2005-05-18 10:23:48 +00:00
Carl Worth
17c740eb6b Add notes for snapshot 0.1.5.
Increment version to 0.1.5.
2005-05-18 10:13:14 +00:00
Carl Worth
b1301f4013 Add -head to CAIRO_VERSION after tagging with SNAPSHOT_0_5_0. 2005-05-18 09:41:47 +00:00
Carl Worth
f083b21c76 Clear pointers to NULL after destroying/freeing them. 2005-05-18 09:27:24 +00:00
Carl Worth
55a7bb718f Declare pixman_fixed16_16_t properly as int32_t rather than just int. Reported by Lance Fetters. 2005-05-18 09:25:54 +00:00
Carl Worth
f030aec810 Added porting guide to help with transition to cairo 0.5 API.
Added notes for snapshot 0.5.0
Increment CAIRO_VERSION to 0.5.0
2005-05-17 18:39:56 +00:00
Carl Worth
3f9573b7bb Bring up to date with Keith's latest improvements to cairo-xlib-surface.c: Add some comments about how and why masks are computed. Generalize overflow detection in mask computation. Expand on pixman format conversion comment. Fix the broken visual->format case. 2005-05-17 15:23:53 +00:00
Carl Worth
f0923288c5 Two fixes from Kristion Høgsberg:
Fix to close the file if we opened it.
Grab the status from out of the stream _before_ we destroy the stream.
2005-05-17 12:40:55 +00:00
Keith Packard
b4710711b8 Add some comments about how and why masks are computed. Generalize overflow detection in mask computation. Expand on pixman format conversion comment. 2005-05-17 12:21:56 +00:00
Carl Worth
e72c41f95b Fix documentation to not mention set_size for the _for_bitmap functions. 2005-05-17 11:28:26 +00:00
Carl Worth
5cc39a708c Remove #ifdef munging since we once again support either #if or #ifdef. 2005-05-17 09:13:02 +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
366aa98a79 Fix more deprecation macros 2005-05-17 08:34:44 +00:00
Carl Worth
23b7ac25ed Add a few more REPLACED_BY and DEPRECATED_BY definitions.
Add some helpful warnings.
2005-05-17 08:26:37 +00:00
Carl Worth
f82a3b2b55 Add cairo-xlib-xrender.h which was missed from an earlier commit. 2005-05-17 06:12:52 +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
f67f5003df Avoid shifting 32-bit quanity by 32 bits, which is undefined behavior. 2005-05-17 06:08:01 +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
9bf669a790 Fix to include cairo-xlib.h, (which also fixes test/xlib-surface.c). 2005-05-17 00:39:17 +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
Keith Packard
200bcda188 Initialize op->stops[0].scale = 0.
This scale value is used only when computing gradient values before the defined range, in which case stop 0 is used for both ends of the interpolation, making the value of 'scale' not actually matter, except that valgrind notices we're using an undefined value.
2005-05-16 22:31:36 +00:00
Carl Worth
e5b31bca7c Remove quarter-over test name accidentally added to Makefile. 2005-05-16 15:05:56 +00:00
Kristian Høgsberg
ea410111d3 Take a filename instead of a FILE pointer. 2005-05-16 11:41:42 +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
Carl Worth
53e6fdb885 Fix the last commit so it actually compiles now. 2005-05-14 13:22:25 +00:00
Carl Worth
55366995b6 Fix a few documentation typos in the recent xlib surface rework. 2005-05-14 10:15:11 +00:00
Carl Worth
95859dc2c6 Add an #error if cairo-foo.h is included when cairo was compiled without support for the foo backend. 2005-05-14 10:03:56 +00:00