Commit graph

896 commits

Author SHA1 Message Date
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
Carl Worth
663e39a63c Remove Boolean 'drawable' parameter from the create_similar surface backend function since nothing anywhere is actually using this parameter. 2005-06-14 15:38:15 +00:00
Tor Lillqvist
d2ddfe42a9 Correct extents for text with a general tranform. 2005-06-14 14:12:00 +00:00
Carl Worth
bb7eeeb749 Remove comment suggesting ambiguity of whether cairo_get_target references the surface, (we decided as part of the API shakeup that cairo functions returning pointers to internal objects do not automatically take a reference). 2005-06-14 11:58:14 +00:00
Carl Worth
8084fb9b09 Add new _cairo_pattern_create_in_error.
Propagate error values from cr->status to pattern->status.
2005-06-13 16:53:52 +00:00
Carl Worth
14ae3ce3ad No longer need to check for NULL after creating a pattern.
Propagate status errors from pattern->status to cr->status.
Originally 2005-05-08 Owen Taylor <otaylor@redhat.com>:
src/cairo-pattern.c src/cairoint.h: If allocation of pattern objects fails, return special static nil pattern objects.
If adding a color stop fails to allocate memory, set pattern->status. (And fix a memory leak.) Make public functions return when pattern->status is set, (and no longer return a cairo_status_t).
src/cairo-pattern.c src/cairo.h doc/public/cairo-sections.txt: Add cairo_pattern_status()
Check the status of gstate->source and of mask patterns passed in.
2005-06-13 16:36:40 +00:00
Carl Worth
15fb5e0d27 Originally 2005-05-08 Owen Taylor <otaylor@redhat.com>:
If cairo_create() fails, return a special static object, cairo_nil.
Don't return early if cr->status is set. cr->status should not affect reference counting.
Ignore any magic object with a reference count of -1.
2005-06-13 16:35:03 +00:00
Carl Worth
01e1844e9c Originally 2005-06-02 Carl Worth <cworth@cworth.org>:
Add a status field to cairo_path_t.
Add documentation for the new approach for handling errors in these functions---always returning a valid pointer with at least a status. (cairo_append_path): Propagate path status errors to the context. Add note to documentation on initializing path->status.
Add missing cairo_private qualifier to a couple functions.
Track new status field in cairo_path_t. (cairo_path_destroy): Don't destroy cairo_path_nil. Add documentation. (_cairo_path_data_create): (_cairo_path_data_create_flat): (_cairo_path_data_append_to_context): Add documentation. (_cairo_path_data_create_in_error): New function to create a placeholder cairo_path_t just to propagate a cairo_status_t error.
2005-06-13 16:29:26 +00:00
Carl Worth
730fb40455 Make these functions static, which allows slightly less awkward error handling within them. 2005-06-11 01:09:15 +00:00
Carl Worth
df19a5aa7e Provide font-backend-specific macros for FONT_FAMILY_DEFAULT. Change CAIRO_FT_FONT_FAMILY_DEFAULT from "serif" to "" to allow the actual default to come from the system/user configuration. 2005-06-11 00:06:04 +00:00
Carl Worth
ff2dee65bd Pull the enum out from inside cairo_path_data_t and give it a name of cairo_path_data_type_t. This allows C++ programs to see the enum values. It also allows variables to be declared of this type for manually constructing a cairo_path_t. 2005-06-10 23:47:23 +00:00
Carl Worth
4c37790a22 Add 'consistent error handling' to 1.0 roadmap. (This isn't new, we just forgot to list it here before).
Big cleanup to remove finished items. Also, split the file up to separate TODO items that affect the API from items that do not.
2005-06-10 13:23:24 +00:00
Carl Worth
2a1c880645 Big cleanup to remove finished items. Also, split the file up to separate TODO items that affect the API from items that do not. 2005-06-10 13:19:45 +00:00
Carl Worth
6cd484a4c0 Originally: 2005-06-09 Carl Worth <cworth@cworth.org>
Rework occurrences of 'if (status == CAIRO_STATUS_SUCCESS)' to use 'if (status)' instead where trivial.
2005-06-10 12:46:49 +00:00
Carl Worth
31dcb954fe Remove STATUS_OK macro which was not being used universally. 2005-06-10 12:18:20 +00:00
Carl Worth
e6eef09115 Remove trailing comma from enum values which gcc 4.0 does not want to see (Luis Villa). Closes bug #3502. 2005-06-09 12:27:02 +00:00
Owen Taylor
23976d00b2 Add
-I$(top_builddir)/src for cairo-features.h (Tomasz Cholewo)
2005-06-09 07:26:40 +00:00
Keith Packard
c1c8c57b90 Font matrix was output incorrectly; the implicit mirror-in-y transformation was not computed correctly, missing a negation of the 'xy' component. 2005-06-07 23:28:12 +00:00
Carl Worth
4f2f520dce Allow NULL as a valid value for several objects. That is, calling reference or destroy on these objects will simply do nothing, successfully.
Remove extra whitespace.
2005-06-03 16:45:46 +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
7c47633b2c Remove unused cache->refcount and _cairo_cache_reference().
Remove gratuitous nesting as recommended in CODING_STYLE.
2005-06-03 16:22:26 +00:00
Carl Worth
756e991b91 Fix name of _cairo_user_data_array_destroy to be _cairo_user_data_array_fini. 2005-06-03 16:16:44 +00:00
Carl Worth
42c1fb7c91 Rename functions to match the naming scheme used by cairo-cache.c and all other users of it. Though it's quite likely that glitz had this right and now everything could be changed to match it instead. I'll save that for some day when we're cleaning up the cache code. 2005-06-03 16:08:28 +00:00
Carl Worth
97ac61700a Fix spelling errors. 2005-06-03 15:56:52 +00:00
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