diff options
-rw-r--r-- | CODING_STYLE | 2 | ||||
-rw-r--r-- | ChangeLog | 88 | ||||
-rw-r--r-- | src/cairo-atsui-font.c | 2 | ||||
-rw-r--r-- | src/cairo-clip-private.h | 2 | ||||
-rw-r--r-- | src/cairo-clip.c | 4 | ||||
-rw-r--r-- | src/cairo-ft-font.c | 2 | ||||
-rw-r--r-- | src/cairo-gstate-private.h | 2 | ||||
-rw-r--r-- | src/cairo-gstate.c | 90 | ||||
-rw-r--r-- | src/cairo-image-surface.c | 24 | ||||
-rw-r--r-- | src/cairo-meta-surface-private.h | 16 | ||||
-rw-r--r-- | src/cairo-meta-surface.c | 30 | ||||
-rw-r--r-- | src/cairo-pdf-surface.c | 10 | ||||
-rw-r--r-- | src/cairo-ps-surface.c | 90 | ||||
-rw-r--r-- | src/cairo-scaled-font.c | 10 | ||||
-rw-r--r-- | src/cairo-surface.c | 122 | ||||
-rw-r--r-- | src/cairo-svg-surface.c | 20 | ||||
-rw-r--r-- | src/cairo-win32-font.c | 8 | ||||
-rw-r--r-- | src/cairo-win32-surface.c | 16 | ||||
-rw-r--r-- | src/cairo-xcb-surface.c | 18 | ||||
-rw-r--r-- | src/cairo-xlib-surface.c | 80 | ||||
-rw-r--r-- | src/cairoint.h | 56 | ||||
-rw-r--r-- | test/get-and-set.c | 8 |
22 files changed, 394 insertions, 306 deletions
diff --git a/CODING_STYLE b/CODING_STYLE index 268d8bcab..ab6e067aa 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -131,7 +131,7 @@ function or block and can even be used to good effect within a structure definition: struct _cairo_gstate { - cairo_operator_t operator; + cairo_operator_t op; double tolerance; @@ -1,3 +1,91 @@ +2005-12-16 Christian Biesinger <cbiesinger@web.de> + + reviewed by: cworth + + * CODING_STYLE: + * src/cairo-atsui-font.c: (_cairo_atsui_font_old_show_glyphs): + * src/cairo-clip-private.h: + * src/cairo-clip.c: (_cairo_clip_combine_to_surface): + * src/cairo-ft-font.c: (_cairo_ft_show_glyphs): + * src/cairo-gstate-private.h: + * src/cairo-gstate.c: (_cairo_gstate_init), + (_cairo_gstate_init_copy), (_cairo_gstate_set_operator), + (_cairo_gstate_get_operator), (_cairo_gstate_paint), + (_cairo_operator_bounded_by_mask), + (_cairo_operator_bounded_by_source), + (_cairo_gstate_clip_and_composite_with_mask), + (_cairo_gstate_clip_and_composite_combine), + (_cairo_gstate_clip_and_composite), (_cairo_gstate_mask), + (_cairo_gstate_stroke), (_composite_trap_region), + (_composite_traps_draw_func), + (_cairo_surface_clip_and_composite_trapezoids), + (_cairo_gstate_fill), (_cairo_gstate_show_glyphs): + * src/cairo-image-surface.c: (_pixman_operator), + (_cairo_image_surface_composite), + (_cairo_image_surface_fill_rectangles), + (_cairo_image_surface_composite_trapezoids): + * src/cairo-meta-surface-private.h: + * src/cairo-meta-surface.c: (_cairo_meta_surface_paint), + (_cairo_meta_surface_mask), (_cairo_meta_surface_stroke), + (_cairo_meta_surface_fill), (_cairo_meta_surface_show_glyphs), + (_cairo_meta_surface_replay): + * src/cairo-pdf-surface.c: (_cairo_pdf_surface_composite), + (_cairo_pdf_surface_fill_rectangles), (_cairo_pdf_surface_fill), + (_cairo_pdf_surface_composite_trapezoids), + (_cairo_pdf_surface_old_show_glyphs): + * src/cairo-ps-surface.c: (_cairo_ps_surface_composite), + (_cairo_ps_surface_fill_rectangles), + (_cairo_ps_surface_composite_trapezoids), + (_cairo_ps_surface_old_show_glyphs), (_cairo_ps_surface_paint), + (_cairo_ps_surface_mask), (_cairo_ps_surface_stroke), + (_cairo_ps_surface_fill), (_cairo_ps_surface_show_glyphs), + (operator_always_opaque), (operator_always_translucent), + (color_operation_needs_fallback), + (pattern_operation_needs_fallback), (_ps_output_composite), + (_ps_output_fill_rectangles), (_ps_output_composite_trapezoids), + (_ps_output_old_show_glyphs), (_ps_output_paint), + (_ps_output_mask), (_ps_output_stroke), (_ps_output_fill), + (_ps_output_show_glyphs): + * src/cairo-scaled-font.c: (_cairo_scaled_font_show_glyphs): + * src/cairo-surface.c: (_fallback_composite), + (_cairo_surface_composite), (_cairo_surface_fill_rectangle), + (_cairo_surface_fill_region), (_fallback_fill_rectangles), + (_cairo_surface_fill_rectangles), (_fallback_paint), + (_cairo_surface_paint), (_cairo_surface_mask_draw_func), + (_fallback_mask), (_cairo_surface_mask), (_fallback_stroke), + (_cairo_surface_stroke), (_fallback_fill), (_cairo_surface_fill), + (_fallback_composite_trapezoids), + (_cairo_surface_composite_trapezoids), + (_cairo_surface_old_show_glyphs_draw_func), + (_fallback_show_glyphs), (_cairo_surface_show_glyphs), + (_cairo_surface_old_show_glyphs): + * src/cairo-svg-surface.c: (_cairo_svg_surface_composite), + (emit_operator), (_cairo_svg_surface_fill), + (_cairo_svg_surface_composite_trapezoids), + (_cairo_svg_surface_stroke), (_cairo_svg_surface_old_show_glyphs): + * src/cairo-win32-font.c: (_cairo_win32_scaled_font_show_glyphs): + * src/cairo-win32-surface.c: (_cairo_win32_surface_composite), + (categorize_solid_dest_operator), + (_cairo_win32_surface_fill_rectangles): + * src/cairo-xcb-surface.c: (_render_operator), + (_cairo_xcb_surface_composite), + (_cairo_xcb_surface_fill_rectangles), + (_cairo_xcb_surface_composite_trapezoids): + * src/cairo-xlib-surface.c: (_operator_needs_alpha_composite), + (_categorize_composite_operation), + (_recategorize_composite_operation), (_render_operator), + (_cairo_xlib_surface_composite), + (_cairo_xlib_surface_fill_rectangles), + (_cairo_xlib_surface_composite_trapezoids), + (_cairo_xlib_surface_old_show_glyphs8), + (_cairo_xlib_surface_old_show_glyphs16), + (_cairo_xlib_surface_old_show_glyphs32), + (_cairo_xlib_surface_old_show_glyphs): + * src/cairoint.h: + * test/get-and-set.c: (settings_set), (settings_get), + (settings_equal): Globally rename "operator" to "op", to allow + writing backends in C++ + 2005-12-15 Carl Worth <cworth@cworth.org> * configure.in: Make poppler check require poppler >= 0.4.1. diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c index 274fe3970..85db5bb2c 100644 --- a/src/cairo-atsui-font.c +++ b/src/cairo-atsui-font.c @@ -542,7 +542,7 @@ _cairo_atsui_font_text_to_glyphs (void *abstract_font, static cairo_int_status_t _cairo_atsui_font_old_show_glyphs (void *abstract_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *generic_surface, int source_x, diff --git a/src/cairo-clip-private.h b/src/cairo-clip-private.h index 23eb78c90..dc35f870e 100644 --- a/src/cairo-clip-private.h +++ b/src/cairo-clip-private.h @@ -114,7 +114,7 @@ _cairo_clip_intersect_to_region (cairo_clip_t *clip, cairo_private cairo_status_t _cairo_clip_combine_to_surface (cairo_clip_t *clip, - cairo_operator_t operator, + cairo_operator_t op, cairo_surface_t *dst, int dst_x, int dst_y, diff --git a/src/cairo-clip.c b/src/cairo-clip.c index e10e17abc..bcb90c1f6 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -196,7 +196,7 @@ _cairo_clip_intersect_to_region (cairo_clip_t *clip, */ cairo_status_t _cairo_clip_combine_to_surface (cairo_clip_t *clip, - cairo_operator_t operator, + cairo_operator_t op, cairo_surface_t *dst, int dst_x, int dst_y, @@ -207,7 +207,7 @@ _cairo_clip_combine_to_surface (cairo_clip_t *clip, _cairo_pattern_init_for_surface (&pattern.surface, clip->surface); - status = _cairo_surface_composite (operator, + status = _cairo_surface_composite (op, &pattern.base, NULL, dst, diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index a150881f0..1d01414e7 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -1890,7 +1890,7 @@ _cairo_ft_ucs4_to_index (void *abstract_font, static cairo_int_status_t _cairo_ft_show_glyphs (void *abstract_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *surface, int source_x, diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h index e96ba8dd9..a5d4c0606 100644 --- a/src/cairo-gstate-private.h +++ b/src/cairo-gstate-private.h @@ -39,7 +39,7 @@ #include "cairo-clip-private.h" struct _cairo_gstate { - cairo_operator_t operator; + cairo_operator_t op; double tolerance; cairo_antialias_t antialias; diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index 02fe33780..e9030a69a 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -98,7 +98,7 @@ static cairo_status_t _cairo_gstate_init (cairo_gstate_t *gstate, cairo_surface_t *target) { - gstate->operator = CAIRO_GSTATE_OPERATOR_DEFAULT; + gstate->op = CAIRO_GSTATE_OPERATOR_DEFAULT; gstate->tolerance = CAIRO_GSTATE_TOLERANCE_DEFAULT; gstate->antialias = CAIRO_ANTIALIAS_DEFAULT; @@ -144,7 +144,7 @@ _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other) { cairo_status_t status; - gstate->operator = other->operator; + gstate->op = other->op; gstate->tolerance = other->tolerance; gstate->antialias = other->antialias; @@ -300,7 +300,7 @@ _cairo_gstate_end_group (cairo_gstate_t *gstate) * XXX: This could be made much more efficient by using _cairo_surface_get_damaged_width/Height if cairo_surface_t actually kept track of such informaton. * - _cairo_surface_composite (gstate->operator, + _cairo_surface_composite (gstate->op, gstate->target, mask, gstate->parent_surface, @@ -354,9 +354,9 @@ _cairo_gstate_get_source (cairo_gstate_t *gstate) } cairo_status_t -_cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator) +_cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t op) { - gstate->operator = operator; + gstate->op = op; return CAIRO_STATUS_SUCCESS; } @@ -364,7 +364,7 @@ _cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator) cairo_operator_t _cairo_gstate_get_operator (cairo_gstate_t *gstate) { - return gstate->operator; + return gstate->op; } cairo_status_t @@ -751,7 +751,7 @@ _cairo_gstate_paint (cairo_gstate_t *gstate) _cairo_gstate_copy_transformed_source (gstate, &pattern.base); status = _cairo_surface_paint (gstate->target, - gstate->operator, + gstate->op, &pattern.base); _cairo_pattern_fini (&pattern.base); @@ -761,7 +761,7 @@ _cairo_gstate_paint (cairo_gstate_t *gstate) /** * _cairo_operator_bounded_by_mask: - * @operator: a #cairo_operator_t + * @op: a #cairo_operator_t * * A bounded operator is one where mask pixel * of zero results in no effect on the destination image. @@ -773,9 +773,9 @@ _cairo_gstate_paint (cairo_gstate_t *gstate) * Return value: %TRUE if the operator is bounded by the mask operand **/ cairo_bool_t -_cairo_operator_bounded_by_mask (cairo_operator_t operator) +_cairo_operator_bounded_by_mask (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: case CAIRO_OPERATOR_SOURCE: case CAIRO_OPERATOR_OVER: @@ -800,7 +800,7 @@ _cairo_operator_bounded_by_mask (cairo_operator_t operator) /** * _cairo_operator_bounded_by_source: - * @operator: a #cairo_operator_t + * @op: a #cairo_operator_t * * A bounded operator is one where source pixels of zero * (in all four components, r, g, b and a) effect no change @@ -813,9 +813,9 @@ _cairo_operator_bounded_by_mask (cairo_operator_t operator) * Return value: %TRUE if the operator is bounded by the source operand **/ cairo_bool_t -_cairo_operator_bounded_by_source (cairo_operator_t operator) +_cairo_operator_bounded_by_source (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_OVER: case CAIRO_OPERATOR_ATOP: case CAIRO_OPERATOR_DEST: @@ -884,7 +884,7 @@ _create_composite_mask_pattern (cairo_surface_pattern_t *mask_pattern, */ static cairo_status_t _cairo_gstate_clip_and_composite_with_mask (cairo_clip_t *clip, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_draw_func_t draw_func, void *draw_closure, @@ -901,7 +901,7 @@ _cairo_gstate_clip_and_composite_with_mask (cairo_clip_t *clip, if (status) return status; - status = _cairo_surface_composite (operator, + status = _cairo_surface_composite (op, src, &mask_pattern.base, dst, extents->x, extents->y, 0, 0, @@ -918,7 +918,7 @@ _cairo_gstate_clip_and_composite_with_mask (cairo_clip_t *clip, */ static cairo_status_t _cairo_gstate_clip_and_composite_combine (cairo_clip_t *clip, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_draw_func_t draw_func, void *draw_closure, @@ -958,7 +958,7 @@ _cairo_gstate_clip_and_composite_combine (cairo_clip_t *clip, if (status) goto CLEANUP_SURFACE; - status = (*draw_func) (draw_closure, operator, + status = (*draw_func) (draw_closure, op, src, intermediate, extents->x, extents->y, extents); @@ -1060,7 +1060,7 @@ _cairo_rectangle_empty (const cairo_rectangle_t *rect) /** * _cairo_gstate_clip_and_composite: * @gstate: a #cairo_gstate_t - * @operator: the operator to draw with + * @op: the operator to draw with * @src: source pattern * @draw_func: function that can be called to draw with the mask onto a surface. * @draw_closure: data to pass to @draw_func. @@ -1080,7 +1080,7 @@ _cairo_rectangle_empty (const cairo_rectangle_t *rect) **/ cairo_status_t _cairo_gstate_clip_and_composite (cairo_clip_t *clip, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_draw_func_t draw_func, void *draw_closure, @@ -1094,33 +1094,33 @@ _cairo_gstate_clip_and_composite (cairo_clip_t *clip, /* Nothing to do */ return CAIRO_STATUS_SUCCESS; - if (operator == CAIRO_OPERATOR_CLEAR) { + if (op == CAIRO_OPERATOR_CLEAR) { _cairo_pattern_init_solid (&solid_pattern.solid, CAIRO_COLOR_WHITE); src = &solid_pattern.base; - operator = CAIRO_OPERATOR_DEST_OUT; + op = CAIRO_OPERATOR_DEST_OUT; } - if (clip->surface || operator == CAIRO_OPERATOR_SOURCE) + if (clip->surface || op == CAIRO_OPERATOR_SOURCE) { - if (operator == CAIRO_OPERATOR_SOURCE) + if (op == CAIRO_OPERATOR_SOURCE) status = _cairo_gstate_clip_and_composite_source (clip, src, draw_func, draw_closure, dst, extents); - else if (_cairo_operator_bounded_by_mask (operator)) - status = _cairo_gstate_clip_and_composite_with_mask (clip, operator, + else if (_cairo_operator_bounded_by_mask (op)) + status = _cairo_gstate_clip_and_composite_with_mask (clip, op, src, draw_func, draw_closure, dst, extents); else - status = _cairo_gstate_clip_and_composite_combine (clip, operator, + status = _cairo_gstate_clip_and_composite_combine (clip, op, src, draw_func, draw_closure, dst, extents); } else { - status = (*draw_func) (draw_closure, operator, + status = (*draw_func) (draw_closure, op, src, dst, 0, 0, extents); @@ -1153,7 +1153,7 @@ _cairo_gstate_mask (cairo_gstate_t *gstate, _cairo_gstate_copy_transformed_mask (gstate, &mask_pattern.base, mask); status = _cairo_surface_mask (gstate->target, - gstate->operator, + gstate->op, &source_pattern.base, &mask_pattern.base); @@ -1182,7 +1182,7 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path) _cairo_gstate_copy_transformed_source (gstate, &source_pattern.base); status = _cairo_surface_stroke (gstate->target, - gstate->operator, + gstate->op, &source_pattern.base, path, &gstate->stroke_style, @@ -1279,7 +1279,7 @@ _cairo_rectangle_intersect (cairo_rectangle_t *dest, cairo_rectangle_t *src) static cairo_status_t _composite_trap_region (cairo_clip_t *clip, cairo_pattern_t *src, - cairo_operator_t operator, + cairo_operator_t op, cairo_surface_t *dst, pixman_region16_t *trap_region, cairo_rectangle_t *extents) @@ -1290,10 +1290,10 @@ _composite_trap_region (cairo_clip_t *clip, int num_rects = pixman_region_num_rects (trap_region); unsigned int clip_serial; - if (clip->surface && operator == CAIRO_OPERATOR_CLEAR) { + if (clip->surface && op == CAIRO_OPERATOR_CLEAR) { _cairo_pattern_init_solid (&solid_pattern.solid, CAIRO_COLOR_WHITE); src = &solid_pattern.base; - operator = CAIRO_OPERATOR_DEST_OUT; + op = CAIRO_OPERATOR_DEST_OUT; } if (num_rects == 0) @@ -1314,7 +1314,7 @@ _composite_trap_region (cairo_clip_t *clip, if (clip->surface) _cairo_pattern_init_for_surface (&mask.surface, clip->surface); - status = _cairo_surface_composite (operator, + status = _cairo_surface_composite (op, src, clip->surface ? &mask.base : NULL, dst, @@ -1340,7 +1340,7 @@ typedef struct { static cairo_status_t _composite_traps_draw_func (void *closure, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_surface_t *dst, int dst_x, @@ -1358,7 +1358,7 @@ _composite_traps_draw_func (void *closure, if (!src) src = &pattern.base; - status = _cairo_surface_composite_trapezoids (operator, + status = _cairo_surface_composite_trapezoids (op, src, dst, info->antialias, extents->x, extents->y, extents->x - dst_x, extents->y - dst_y, @@ -1373,7 +1373,7 @@ _composite_traps_draw_func (void *closure, /* Warning: This call modifies the coordinates of traps */ cairo_status_t _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, - cairo_operator_t operator, + cairo_operator_t op, cairo_surface_t *dst, cairo_traps_t *traps, cairo_clip_t *clip, @@ -1392,7 +1392,7 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, if (status) return status; - if (_cairo_operator_bounded_by_mask (operator)) + if (_cairo_operator_bounded_by_mask (op)) { if (trap_region) { status = _cairo_clip_intersect_to_region (clip, trap_region); @@ -1445,18 +1445,18 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, if (trap_region) { - if ((src->type == CAIRO_PATTERN_SOLID || operator == CAIRO_OPERATOR_CLEAR) && + if ((src->type == CAIRO_PATTERN_SOLID || op == CAIRO_OPERATOR_CLEAR) && !clip->surface) { const cairo_color_t *color; - if (operator == CAIRO_OPERATOR_CLEAR) + if (op == CAIRO_OPERATOR_CLEAR) color = CAIRO_COLOR_TRANSPARENT; else color = &((cairo_solid_pattern_t *)src)->color; /* Solid rectangles special case */ - status = _cairo_surface_fill_region (dst, operator, color, trap_region); + status = _cairo_surface_fill_region (dst, op, color, trap_region); if (!status && clear_region) status = _cairo_surface_fill_region (dst, CAIRO_OPERATOR_CLEAR, CAIRO_COLOR_TRANSPARENT, @@ -1465,7 +1465,7 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, goto out; } - if ((_cairo_operator_bounded_by_mask (operator) && operator != CAIRO_OPERATOR_SOURCE) || + if ((_cairo_operator_bounded_by_mask (op) && op != CAIRO_OPERATOR_SOURCE) || !clip->surface) { /* For a simple rectangle, we can just use composite(), for more @@ -1483,7 +1483,7 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, * more than rectangle and the destination doesn't support clip * regions. In that case, we fall through. */ - status = _composite_trap_region (clip, src, operator, dst, + status = _composite_trap_region (clip, src, op, dst, trap_region, &extents); if (status != CAIRO_INT_STATUS_UNSUPPORTED) { @@ -1499,7 +1499,7 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, traps_info.traps = traps; traps_info.antialias = antialias; - status = _cairo_gstate_clip_and_composite (clip, operator, src, + status = _cairo_gstate_clip_and_composite (clip, op, src, _composite_traps_draw_func, &traps_info, dst, &extents); @@ -1528,7 +1528,7 @@ _cairo_gstate_fill (cairo_gstate_t *gstate, cairo_path_fixed_t *path) _cairo_gstate_copy_transformed_source (gstate, &pattern.base); status = _cairo_surface_fill (gstate->target, - gstate->operator, + gstate->op, &pattern.base, path, gstate->fill_rule, @@ -1985,7 +1985,7 @@ _cairo_gstate_show_glyphs (cairo_gstate_t *gstate, _cairo_gstate_copy_transformed_source (gstate, &source_pattern.base); status = _cairo_surface_show_glyphs (gstate->target, - gstate->operator, + gstate->op, &source_pattern.base, transformed_glyphs, num_glyphs, diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 469affe92..10d39b583 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -516,9 +516,9 @@ _cairo_image_surface_set_attributes (cairo_image_surface_t *surface, * things in pixman I think). */ static pixman_operator_t -_pixman_operator (cairo_operator_t operator) +_pixman_operator (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: return PIXMAN_OPERATOR_CLEAR; @@ -556,7 +556,7 @@ _pixman_operator (cairo_operator_t operator) } static cairo_int_status_t -_cairo_image_surface_composite (cairo_operator_t operator, +_cairo_image_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -596,7 +596,7 @@ _cairo_image_surface_composite (cairo_operator_t operator, if (status) goto CLEANUP_SURFACES; - pixman_composite (_pixman_operator (operator), + pixman_composite (_pixman_operator (op), src->pixman_image, mask->pixman_image, dst->pixman_image, @@ -609,7 +609,7 @@ _cairo_image_surface_composite (cairo_operator_t operator, } else { - pixman_composite (_pixman_operator (operator), + pixman_composite (_pixman_operator (op), src->pixman_image, NULL, dst->pixman_image, @@ -620,7 +620,7 @@ _cairo_image_surface_composite (cairo_operator_t operator, width, height); } - if (!_cairo_operator_bounded_by_source (operator)) + if (!_cairo_operator_bounded_by_source (op)) status = _cairo_surface_composite_fixup_unbounded (&dst->base, &src_attr, src->width, src->height, mask ? &mask_attr : NULL, @@ -641,7 +641,7 @@ _cairo_image_surface_composite (cairo_operator_t operator, static cairo_int_status_t _cairo_image_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -656,7 +656,7 @@ _cairo_image_surface_fill_rectangles (void *abstract_surface, pixman_color.alpha = color->alpha_short; /* XXX: The pixman_rectangle_t cast is evil... it needs to go away somehow. */ - pixman_fill_rectangles (_pixman_operator(operator), surface->pixman_image, + pixman_fill_rectangles (_pixman_operator(op), surface->pixman_image, &pixman_color, (pixman_rectangle_t *) rects, num_rects); return CAIRO_STATUS_SUCCESS; @@ -677,7 +677,7 @@ _cairo_image_surface_is_alpha_only (cairo_image_surface_t *surface) } static cairo_int_status_t -_cairo_image_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_image_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -713,7 +713,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t operator, * falling through to the general case when the surface is clipped * since libpixman would have to generate an intermediate mask anyways. */ - if (operator == CAIRO_OPERATOR_ADD && + if (op == CAIRO_OPERATOR_ADD && _cairo_pattern_is_opaque_solid (pattern) && _cairo_image_surface_is_alpha_only (dst) && !dst->has_clip && @@ -773,7 +773,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t operator, pixman_add_trapezoids (mask, - dst_x, - dst_y, (pixman_trapezoid_t *) traps, num_traps); - pixman_composite (_pixman_operator (operator), + pixman_composite (_pixman_operator (op), src->pixman_image, mask, dst->pixman_image, @@ -783,7 +783,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t operator, dst_x, dst_y, width, height); - if (!_cairo_operator_bounded_by_mask (operator)) + if (!_cairo_operator_bounded_by_mask (op)) status = _cairo_surface_composite_shape_fixup_unbounded (&dst->base, &attributes, src->width, src->height, width, height, diff --git a/src/cairo-meta-surface-private.h b/src/cairo-meta-surface-private.h index 11021a5a9..49c6972fa 100644 --- a/src/cairo-meta-surface-private.h +++ b/src/cairo-meta-surface-private.h @@ -59,20 +59,20 @@ typedef enum { typedef struct _cairo_command_paint { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t source; } cairo_command_paint_t; typedef struct _cairo_command_mask { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t source; cairo_pattern_union_t mask; } cairo_command_mask_t; typedef struct _cairo_command_stroke { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t source; cairo_path_fixed_t path; cairo_stroke_style_t style; @@ -84,7 +84,7 @@ typedef struct _cairo_command_stroke { typedef struct _cairo_command_fill { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t source; cairo_path_fixed_t path; cairo_fill_rule_t fill_rule; @@ -94,7 +94,7 @@ typedef struct _cairo_command_fill { typedef struct _cairo_command_show_glyphs { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t source; cairo_glyph_t *glyphs; int num_glyphs; @@ -103,7 +103,7 @@ typedef struct _cairo_command_show_glyphs { typedef struct _cairo_command_composite { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t src_pattern; cairo_pattern_union_t mask_pattern; cairo_pattern_t *mask_pattern_pointer; @@ -119,7 +119,7 @@ typedef struct _cairo_command_composite { typedef struct _cairo_command_fill_rectangles { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_color_t color; cairo_rectangle_t *rects; int num_rects; @@ -127,7 +127,7 @@ typedef struct _cairo_command_fill_rectangles { typedef struct _cairo_command_composite_trapezoids { cairo_command_type_t type; - cairo_operator_t operator; + cairo_operator_t op; cairo_pattern_union_t pattern; cairo_antialias_t antialias; int x_src; diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c index ade379568..ef30f6d95 100644 --- a/src/cairo-meta-surface.c +++ b/src/cairo-meta-surface.c @@ -197,7 +197,7 @@ _init_pattern_with_snapshot (cairo_pattern_t *pattern, static cairo_int_status_t _cairo_meta_surface_paint (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source) { cairo_status_t status; @@ -209,7 +209,7 @@ _cairo_meta_surface_paint (void *abstract_surface, return CAIRO_STATUS_NO_MEMORY; command->type = CAIRO_COMMAND_PAINT; - command->operator = operator; + command->op = op; status = _init_pattern_with_snapshot (&command->source.base, source); if (status) @@ -230,7 +230,7 @@ _cairo_meta_surface_paint (void *abstract_surface, static cairo_int_status_t _cairo_meta_surface_mask (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask) { @@ -243,7 +243,7 @@ _cairo_meta_surface_mask (void *abstract_surface, return CAIRO_STATUS_NO_MEMORY; command->type = CAIRO_COMMAND_MASK; - command->operator = operator; + command->op = op; status = _init_pattern_with_snapshot (&command->source.base, source); if (status) @@ -270,7 +270,7 @@ _cairo_meta_surface_mask (void *abstract_surface, static cairo_int_status_t _cairo_meta_surface_stroke (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *style, @@ -288,7 +288,7 @@ _cairo_meta_surface_stroke (void *abstract_surface, return CAIRO_STATUS_NO_MEMORY; command->type = CAIRO_COMMAND_STROKE; - command->operator = operator; + command->op = op; status = _init_pattern_with_snapshot (&command->source.base, source); if (status) @@ -326,7 +326,7 @@ _cairo_meta_surface_stroke (void *abstract_surface, static cairo_int_status_t _cairo_meta_surface_fill (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -342,7 +342,7 @@ _cairo_meta_surface_fill (void *abstract_surface, return CAIRO_STATUS_NO_MEMORY; command->type = CAIRO_COMMAND_FILL; - command->operator = operator; + command->op = op; status = _init_pattern_with_snapshot (&command->source.base, source); if (status) @@ -373,7 +373,7 @@ _cairo_meta_surface_fill (void *abstract_surface, static cairo_int_status_t _cairo_meta_surface_show_glyphs (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, @@ -388,7 +388,7 @@ _cairo_meta_surface_show_glyphs (void *abstract_surface, return CAIRO_STATUS_NO_MEMORY; command->type = CAIRO_COMMAND_SHOW_GLYPHS; - command->operator = operator; + command->op = op; status = _init_pattern_with_snapshot (&command->source.base, source); if (status) @@ -596,7 +596,7 @@ _cairo_meta_surface_replay (cairo_surface_t *surface, break; status = _cairo_surface_paint (target, - command->paint.operator, + command->paint.op, &command->paint.source.base); break; @@ -606,7 +606,7 @@ _cairo_meta_surface_replay (cairo_surface_t *surface, break; status = _cairo_surface_mask (target, - command->mask.operator, + command->mask.op, &command->mask.source.base, &command->mask.mask.base); break; @@ -617,7 +617,7 @@ _cairo_meta_surface_replay (cairo_surface_t *surface, break; status = _cairo_surface_stroke (target, - command->stroke.operator, + command->stroke.op, &command->stroke.source.base, &command->stroke.path, &command->stroke.style, @@ -633,7 +633,7 @@ _cairo_meta_surface_replay (cairo_surface_t *surface, break; status = _cairo_surface_fill (target, - command->fill.operator, + command->fill.op, &command->fill.source.base, &command->fill.path, command->fill.fill_rule, @@ -647,7 +647,7 @@ _cairo_meta_surface_replay (cairo_surface_t *surface, break; status = _cairo_surface_show_glyphs (target, - command->show_glyphs.operator, + command->show_glyphs.op, &command->show_glyphs.source.base, command->show_glyphs.glyphs, command->show_glyphs.num_glyphs, diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index df2f35b36..db5efee09 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -713,7 +713,7 @@ _cairo_pdf_surface_composite_pdf (cairo_pdf_surface_t *dst, } static cairo_int_status_t -_cairo_pdf_surface_composite (cairo_operator_t operator, +_cairo_pdf_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -743,7 +743,7 @@ _cairo_pdf_surface_composite (cairo_operator_t operator, static cairo_int_status_t _cairo_pdf_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -1249,7 +1249,7 @@ _cairo_pdf_path_close_path (void *closure) static cairo_int_status_t _cairo_pdf_surface_fill (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -1301,7 +1301,7 @@ _cairo_pdf_surface_fill (void *abstract_surface, } static cairo_int_status_t -_cairo_pdf_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_pdf_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -1437,7 +1437,7 @@ _cairo_pdf_document_get_font (cairo_pdf_document_t *document, static cairo_int_status_t _cairo_pdf_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_surface, int source_x, diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index c1db92b84..287ca1420 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -249,7 +249,7 @@ _cairo_ps_surface_finish (void *abstract_surface) } static cairo_int_status_t -_cairo_ps_surface_composite (cairo_operator_t operator, +_cairo_ps_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -264,7 +264,7 @@ _cairo_ps_surface_composite (cairo_operator_t operator, { cairo_ps_surface_t *surface = abstract_dst; - return _cairo_surface_composite (operator, + return _cairo_surface_composite (op, src_pattern, mask_pattern, surface->current_page, @@ -280,7 +280,7 @@ _cairo_ps_surface_composite (cairo_operator_t operator, static cairo_int_status_t _cairo_ps_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -288,14 +288,14 @@ _cairo_ps_surface_fill_rectangles (void *abstract_surface, cairo_ps_surface_t *surface = abstract_surface; return _cairo_surface_fill_rectangles (surface->current_page, - operator, + op, color, rects, num_rects); } static cairo_int_status_t -_cairo_ps_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_ps_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -310,7 +310,7 @@ _cairo_ps_surface_composite_trapezoids (cairo_operator_t operator, { cairo_ps_surface_t *surface = abstract_dst; - return _cairo_surface_composite_trapezoids (operator, + return _cairo_surface_composite_trapezoids (op, pattern, surface->current_page, antialias, @@ -427,7 +427,7 @@ _cairo_ps_surface_get_font (cairo_ps_surface_t *surface, static cairo_int_status_t _cairo_ps_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_surface, int source_x, @@ -456,7 +456,7 @@ _cairo_ps_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, _cairo_font_subset_use_glyph (subset, glyphs[i].index); return _cairo_surface_old_show_glyphs (scaled_font, - operator, + op, pattern, surface->current_page, source_x, @@ -471,19 +471,19 @@ _cairo_ps_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, static cairo_int_status_t _cairo_ps_surface_paint (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source) { cairo_ps_surface_t *surface = abstract_surface; assert (_cairo_surface_is_meta (surface->current_page)); - return _cairo_surface_paint (surface->current_page, operator, source); + return _cairo_surface_paint (surface->current_page, op, source); } static cairo_int_status_t _cairo_ps_surface_mask (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask) { @@ -491,13 +491,13 @@ _cairo_ps_surface_mask (void *abstract_surface, assert (_cairo_surface_is_meta (surface->current_page)); - return _cairo_surface_mask (surface->current_page, operator, source, + return _cairo_surface_mask (surface->current_page, op, source, mask); } static cairo_int_status_t _cairo_ps_surface_stroke (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *style, @@ -510,7 +510,7 @@ _cairo_ps_surface_stroke (void *abstract_surface, assert (_cairo_surface_is_meta (surface->current_page)); - return _cairo_surface_stroke (surface->current_page, operator, source, + return _cairo_surface_stroke (surface->current_page, op, source, path, style, ctm, ctm_inverse, tolerance, antialias); @@ -518,7 +518,7 @@ _cairo_ps_surface_stroke (void *abstract_surface, static cairo_int_status_t _cairo_ps_surface_fill (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -529,14 +529,14 @@ _cairo_ps_surface_fill (void *abstract_surface, assert (_cairo_surface_is_meta (surface->current_page)); - return _cairo_surface_fill (surface->current_page, operator, source, + return _cairo_surface_fill (surface->current_page, op, source, path, fill_rule, tolerance, antialias); } static cairo_int_status_t _cairo_ps_surface_show_glyphs (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, @@ -546,7 +546,7 @@ _cairo_ps_surface_show_glyphs (void *abstract_surface, assert (_cairo_surface_is_meta (surface->current_page)); - return _cairo_surface_show_glyphs (surface->current_page, operator, source, + return _cairo_surface_show_glyphs (surface->current_page, op, source, glyphs, num_glyphs, scaled_font); } @@ -772,9 +772,9 @@ pattern_is_translucent (const cairo_pattern_t *abstract_pattern) } static cairo_bool_t -operator_always_opaque (cairo_operator_t operator) +operator_always_opaque (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: case CAIRO_OPERATOR_SOURCE: @@ -804,9 +804,9 @@ operator_always_opaque (cairo_operator_t operator) } static cairo_bool_t -operator_always_translucent (cairo_operator_t operator) +operator_always_translucent (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: case CAIRO_OPERATOR_SOURCE: @@ -836,12 +836,12 @@ operator_always_translucent (cairo_operator_t operator) } static cairo_bool_t -color_operation_needs_fallback (cairo_operator_t operator, +color_operation_needs_fallback (cairo_operator_t op, const cairo_color_t *color) { - if (operator_always_opaque (operator)) + if (operator_always_opaque (op)) return FALSE; - if (operator_always_translucent (operator)) + if (operator_always_translucent (op)) return TRUE; return color_is_translucent (color); } @@ -855,14 +855,14 @@ pattern_type_supported (const cairo_pattern_t *pattern) } static cairo_bool_t -pattern_operation_needs_fallback (cairo_operator_t operator, +pattern_operation_needs_fallback (cairo_operator_t op, const cairo_pattern_t *pattern) { if (! pattern_type_supported (pattern)) return TRUE; - if (operator_always_opaque (operator)) + if (operator_always_opaque (op)) return FALSE; - if (operator_always_translucent (operator)) + if (operator_always_translucent (op)) return TRUE; return pattern_is_translucent (pattern); } @@ -1069,7 +1069,7 @@ emit_pattern (cairo_ps_surface_t *surface, cairo_pattern_t *pattern) static cairo_int_status_t -_ps_output_composite (cairo_operator_t operator, +_ps_output_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -1146,7 +1146,7 @@ bail: static cairo_int_status_t _ps_output_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -1162,7 +1162,7 @@ _ps_output_fill_rectangles (void *abstract_surface, if (!num_rects) return CAIRO_STATUS_SUCCESS; - if (color_operation_needs_fallback (operator, color)) { + if (color_operation_needs_fallback (op, color)) { int min_x = rects[0].x; int min_y = rects[0].y; int max_x = rects[0].x + rects[0].width; @@ -1207,7 +1207,7 @@ intersect (cairo_line_t *line, cairo_fixed_t y) } static cairo_int_status_t -_ps_output_composite_trapezoids (cairo_operator_t operator, +_ps_output_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -1227,7 +1227,7 @@ _ps_output_composite_trapezoids (cairo_operator_t operator, if (surface->fallback) return CAIRO_STATUS_SUCCESS; - if (pattern_operation_needs_fallback (operator, pattern)) + if (pattern_operation_needs_fallback (op, pattern)) return _ps_output_add_fallback_area (surface, x_dst, y_dst, width, height); _cairo_output_stream_printf (stream, @@ -1390,7 +1390,7 @@ _ps_output_intersect_clip_path (void *abstract_surface, static cairo_int_status_t _ps_output_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_surface, int source_x, @@ -1417,7 +1417,7 @@ _ps_output_old_show_glyphs (cairo_scaled_font_t *scaled_font, if (surface->fallback) return CAIRO_STATUS_SUCCESS; - if (pattern_operation_needs_fallback (operator, pattern)) + if (pattern_operation_needs_fallback (op, pattern)) return _ps_output_add_fallback_area (surface, dest_x, dest_y, width, height); _cairo_output_stream_printf (stream, @@ -1460,12 +1460,12 @@ _ps_output_old_show_glyphs (cairo_scaled_font_t *scaled_font, * better here. */ static cairo_int_status_t _ps_output_paint (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source) { ps_output_surface_t *surface = abstract_surface; - if (pattern_operation_needs_fallback (operator, source)) + if (pattern_operation_needs_fallback (op, source)) return _ps_output_add_fallback_area (surface, 0, 0, surface->parent->width, @@ -1482,13 +1482,13 @@ _ps_output_paint (void *abstract_surface, * better here. */ static cairo_int_status_t _ps_output_mask (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask) { ps_output_surface_t *surface = abstract_surface; - if (pattern_operation_needs_fallback (operator, source)) + if (pattern_operation_needs_fallback (op, source)) return _ps_output_add_fallback_area (surface, 0, 0, surface->parent->width, @@ -1505,7 +1505,7 @@ _ps_output_mask (void *abstract_surface, * better here. */ static cairo_int_status_t _ps_output_stroke (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *style, @@ -1516,7 +1516,7 @@ _ps_output_stroke (void *abstract_surface, { ps_output_surface_t *surface = abstract_surface; - if (pattern_operation_needs_fallback (operator, source)) + if (pattern_operation_needs_fallback (op, source)) return _ps_output_add_fallback_area (surface, 0, 0, surface->parent->width, @@ -1531,7 +1531,7 @@ _ps_output_stroke (void *abstract_surface, static cairo_int_status_t _ps_output_fill (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -1544,7 +1544,7 @@ _ps_output_fill (void *abstract_surface, ps_output_path_info_t info; const char *ps_operator; - if (pattern_operation_needs_fallback (operator, source)) + if (pattern_operation_needs_fallback (op, source)) return _ps_output_add_fallback_area (surface, 0, 0, surface->parent->width, @@ -1586,7 +1586,7 @@ _ps_output_fill (void *abstract_surface, * better here. */ static cairo_int_status_t _ps_output_show_glyphs (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, @@ -1594,7 +1594,7 @@ _ps_output_show_glyphs (void *abstract_surface, { ps_output_surface_t *surface = abstract_surface; - if (pattern_operation_needs_fallback (operator, source)) + if (pattern_operation_needs_fallback (op, source)) return _ps_output_add_fallback_area (surface, 0, 0, surface->parent->width, diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 3fc619878..df1f71872 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -1,4 +1,4 @@ -/* $Id: cairo-scaled-font.c,v 1.8 2005-11-09 01:16:21 cworth Exp $ +/* $Id: cairo-scaled-font.c,v 1.9 2005-12-16 11:02:35 biesi Exp $ * * Copyright © 2005 Keith Packard * @@ -776,7 +776,7 @@ _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t *scaled_font, cairo_status_t _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *surface, int source_x, @@ -795,14 +795,14 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, /* These operators aren't interpreted the same way by the backends; * they are implemented in terms of other operators in cairo-gstate.c */ - assert (operator != CAIRO_OPERATOR_SOURCE && operator != CAIRO_OPERATOR_CLEAR); + assert (op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_CLEAR); if (scaled_font->status) return scaled_font->status; if (scaled_font->backend->show_glyphs != NULL) { status = scaled_font->backend->show_glyphs (scaled_font, - operator, pattern, + op, pattern, surface, source_x, source_y, dest_x, dest_y, @@ -887,7 +887,7 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, _cairo_pattern_init_for_surface (&mask_pattern, mask); - status = _cairo_surface_composite (operator, pattern, &mask_pattern.base, + status = _cairo_surface_composite (op, pattern, &mask_pattern.base, surface, source_x, source_y, 0, 0, diff --git a/src/cairo-surface.c b/src/cairo-surface.c index 8c17405e7..002e4bef5 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -855,7 +855,7 @@ _fallback_fini (fallback_state_t *state) } static cairo_status_t -_fallback_composite (cairo_operator_t operator, +_fallback_composite (cairo_operator_t op, cairo_pattern_t *src, cairo_pattern_t *mask, cairo_surface_t *dst, @@ -878,7 +878,7 @@ _fallback_composite (cairo_operator_t operator, return status; } - status = state.image->base.backend->composite (operator, src, mask, + status = state.image->base.backend->composite (op, src, mask, &state.image->base, src_x, src_y, mask_x, mask_y, dst_x - state.image_rect.x, @@ -890,7 +890,7 @@ _fallback_composite (cairo_operator_t operator, } cairo_status_t -_cairo_surface_composite (cairo_operator_t operator, +_cairo_surface_composite (cairo_operator_t op, cairo_pattern_t *src, cairo_pattern_t *mask, cairo_surface_t *dst, @@ -911,7 +911,7 @@ _cairo_surface_composite (cairo_operator_t operator, /* These operators aren't interpreted the same way by the backends; * they are implemented in terms of other operators in cairo-gstate.c */ - assert (operator != CAIRO_OPERATOR_SOURCE && operator != CAIRO_OPERATOR_CLEAR); + assert (op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_CLEAR); } if (dst->status) @@ -921,7 +921,7 @@ _cairo_surface_composite (cairo_operator_t operator, return CAIRO_STATUS_SURFACE_FINISHED; if (dst->backend->composite) { - status = dst->backend->composite (operator, + status = dst->backend->composite (op, src, mask, dst, src_x, src_y, mask_x, mask_y, @@ -931,7 +931,7 @@ _cairo_surface_composite (cairo_operator_t operator, return status; } - return _fallback_composite (operator, + return _fallback_composite (op, src, mask, dst, src_x, src_y, mask_x, mask_y, @@ -942,7 +942,7 @@ _cairo_surface_composite (cairo_operator_t operator, /** * _cairo_surface_fill_rectangle: * @surface: a #cairo_surface_t - * @operator: the operator to apply to the rectangle + * @op: the operator to apply to the rectangle * @color: the source color * @x: X coordinate of rectangle, in backend coordinates * @y: Y coordinate of rectangle, in backend coordinates @@ -956,7 +956,7 @@ _cairo_surface_composite (cairo_operator_t operator, **/ cairo_status_t _cairo_surface_fill_rectangle (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, int x, int y, @@ -978,13 +978,13 @@ _cairo_surface_fill_rectangle (cairo_surface_t *surface, rect.width = width; rect.height = height; - return _cairo_surface_fill_rectangles (surface, operator, color, &rect, 1); + return _cairo_surface_fill_rectangles (surface, op, color, &rect, 1); } /** * _cairo_surface_fill_region: * @surface: a #cairo_surface_t - * @operator: the operator to apply to the region + * @op: the operator to apply to the region * @color: the source color * @region: the region to modify, in backend coordinates * @@ -996,7 +996,7 @@ _cairo_surface_fill_rectangle (cairo_surface_t *surface, **/ cairo_status_t _cairo_surface_fill_region (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, pixman_region16_t *region) { @@ -1022,7 +1022,7 @@ _cairo_surface_fill_region (cairo_surface_t *surface, rects[i].height = boxes[i].y2 - boxes[i].y1; } - status = _cairo_surface_fill_rectangles (surface, operator, + status = _cairo_surface_fill_rectangles (surface, op, color, rects, num_rects); free (rects); @@ -1032,7 +1032,7 @@ _cairo_surface_fill_region (cairo_surface_t *surface, static cairo_status_t _fallback_fill_rectangles (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -1095,7 +1095,7 @@ _fallback_fill_rectangles (cairo_surface_t *surface, } status = state.image->base.backend->fill_rectangles (&state.image->base, - operator, color, + op, color, rects, num_rects); free (offset_rects); @@ -1109,7 +1109,7 @@ _fallback_fill_rectangles (cairo_surface_t *surface, /** * _cairo_surface_fill_rectangles: * @surface: a #cairo_surface_t - * @operator: the operator to apply to the region + * @op: the operator to apply to the region * @color: the source color * @rects: the rectangles to modify, in backend coordinates * @num_rects: the number of rectangles in @rects @@ -1124,7 +1124,7 @@ _fallback_fill_rectangles (cairo_surface_t *surface, **/ cairo_status_t _cairo_surface_fill_rectangles (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -1144,19 +1144,19 @@ _cairo_surface_fill_rectangles (cairo_surface_t *surface, if (surface->backend->fill_rectangles) { status = surface->backend->fill_rectangles (surface, - operator, + op, color, rects, num_rects); if (status != CAIRO_INT_STATUS_UNSUPPORTED) return status; } - return _fallback_fill_rectangles (surface, operator, color, rects, num_rects); + return _fallback_fill_rectangles (surface, op, color, rects, num_rects); } static cairo_status_t _fallback_paint (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source) { cairo_status_t status; @@ -1168,7 +1168,7 @@ _fallback_paint (cairo_surface_t *surface, if (status) return status; - if (_cairo_operator_bounded_by_source (operator)) { + if (_cairo_operator_bounded_by_source (op)) { cairo_rectangle_t source_extents; status = _cairo_pattern_get_extents (source, &source_extents); if (status) @@ -1191,7 +1191,7 @@ _fallback_paint (cairo_surface_t *surface, return status; _cairo_surface_clip_and_composite_trapezoids (source, - operator, + op, surface, &traps, surface->clip, @@ -1204,7 +1204,7 @@ _fallback_paint (cairo_surface_t *surface, cairo_status_t _cairo_surface_paint (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source) { cairo_status_t status; @@ -1212,17 +1212,17 @@ _cairo_surface_paint (cairo_surface_t *surface, assert (! surface->is_snapshot); if (surface->backend->paint) { - status = surface->backend->paint (surface, operator, source); + status = surface->backend->paint (surface, op, source); if (status != CAIRO_INT_STATUS_UNSUPPORTED) return status; } - return _fallback_paint (surface, operator, source); + return _fallback_paint (surface, op, source); } static cairo_status_t _cairo_surface_mask_draw_func (void *closure, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_surface_t *dst, int dst_x, @@ -1232,14 +1232,14 @@ _cairo_surface_mask_draw_func (void *closure, cairo_pattern_t *mask = closure; if (src) - return _cairo_surface_composite (operator, + return _cairo_surface_composite (op, src, mask, dst, extents->x, extents->y, extents->x, extents->y, extents->x - dst_x, extents->y - dst_y, extents->width, extents->height); else - return _cairo_surface_composite (operator, + return _cairo_surface_composite (op, mask, NULL, dst, extents->x, extents->y, 0, 0, /* unused */ @@ -1249,7 +1249,7 @@ _cairo_surface_mask_draw_func (void *closure, static cairo_status_t _fallback_mask (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask) { @@ -1260,7 +1260,7 @@ _fallback_mask (cairo_surface_t *surface, if (status) return status; - if (_cairo_operator_bounded_by_source (operator)) { + if (_cairo_operator_bounded_by_source (op)) { status = _cairo_pattern_get_extents (source, &source_extents); if (status) return status; @@ -1268,7 +1268,7 @@ _fallback_mask (cairo_surface_t *surface, _cairo_rectangle_intersect (&extents, &source_extents); } - if (_cairo_operator_bounded_by_mask (operator)) { + if (_cairo_operator_bounded_by_mask (op)) { status = _cairo_pattern_get_extents (mask, &mask_extents); if (status) return status; @@ -1280,7 +1280,7 @@ _fallback_mask (cairo_surface_t *surface, if (status) return status; - status = _cairo_gstate_clip_and_composite (surface->clip, operator, + status = _cairo_gstate_clip_and_composite (surface->clip, op, source, _cairo_surface_mask_draw_func, mask, @@ -1292,7 +1292,7 @@ _fallback_mask (cairo_surface_t *surface, cairo_status_t _cairo_surface_mask (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask) { @@ -1301,17 +1301,17 @@ _cairo_surface_mask (cairo_surface_t *surface, assert (! surface->is_snapshot); if (surface->backend->mask) { - status = surface->backend->mask (surface, operator, source, mask); + status = surface->backend->mask (surface, op, source, mask); if (status != CAIRO_INT_STATUS_UNSUPPORTED) return status; } - return _fallback_mask (surface, operator, source, mask); + return _fallback_mask (surface, op, source, mask); } static cairo_status_t _fallback_stroke (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *stroke_style, @@ -1336,7 +1336,7 @@ _fallback_stroke (cairo_surface_t *surface, } _cairo_surface_clip_and_composite_trapezoids (source, - operator, + op, surface, &traps, surface->clip, @@ -1349,7 +1349,7 @@ _fallback_stroke (cairo_surface_t *surface, cairo_status_t _cairo_surface_stroke (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *stroke_style, @@ -1362,7 +1362,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, if (surface->backend->stroke) { cairo_status_t status; - status = surface->backend->stroke (surface, operator, source, + status = surface->backend->stroke (surface, op, source, path, stroke_style, ctm, ctm_inverse, tolerance, antialias); @@ -1370,7 +1370,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, return status; } - return _fallback_stroke (surface, operator, source, + return _fallback_stroke (surface, op, source, path, stroke_style, ctm, ctm_inverse, tolerance, antialias); @@ -1378,7 +1378,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, static cairo_status_t _fallback_fill (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -1400,7 +1400,7 @@ _fallback_fill (cairo_surface_t *surface, } status = _cairo_surface_clip_and_composite_trapezoids (source, - operator, + op, surface, &traps, surface->clip, @@ -1413,7 +1413,7 @@ _fallback_fill (cairo_surface_t *surface, cairo_status_t _cairo_surface_fill (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -1425,20 +1425,20 @@ _cairo_surface_fill (cairo_surface_t *surface, assert (! surface->is_snapshot); if (surface->backend->fill) { - status = surface->backend->fill (surface, operator, source, + status = surface->backend->fill (surface, op, source, path, fill_rule, tolerance, antialias); if (status != CAIRO_INT_STATUS_UNSUPPORTED) return status; } - return _fallback_fill (surface, operator, source, + return _fallback_fill (surface, op, source, path, fill_rule, tolerance, antialias); } static cairo_status_t -_fallback_composite_trapezoids (cairo_operator_t operator, +_fallback_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *dst, cairo_antialias_t antialias, @@ -1492,7 +1492,7 @@ _fallback_composite_trapezoids (cairo_operator_t operator, traps = offset_traps; } - state.image->base.backend->composite_trapezoids (operator, pattern, + state.image->base.backend->composite_trapezoids (op, pattern, &state.image->base, antialias, src_x, src_y, @@ -1509,7 +1509,7 @@ _fallback_composite_trapezoids (cairo_operator_t operator, } cairo_status_t -_cairo_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *dst, cairo_antialias_t antialias, @@ -1529,7 +1529,7 @@ _cairo_surface_composite_trapezoids (cairo_operator_t operator, /* These operators aren't interpreted the same way by the backends; * they are implemented in terms of other operators in cairo-gstate.c */ - assert (operator != CAIRO_OPERATOR_SOURCE && operator != CAIRO_OPERATOR_CLEAR); + assert (op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_CLEAR); if (dst->status) return dst->status; @@ -1538,7 +1538,7 @@ _cairo_surface_composite_trapezoids (cairo_operator_t operator, return CAIRO_STATUS_SURFACE_FINISHED; if (dst->backend->composite_trapezoids) { - status = dst->backend->composite_trapezoids (operator, + status = dst->backend->composite_trapezoids (op, pattern, dst, antialias, src_x, src_y, @@ -1549,7 +1549,7 @@ _cairo_surface_composite_trapezoids (cairo_operator_t operator, return status; } - return _fallback_composite_trapezoids (operator, pattern, dst, + return _fallback_composite_trapezoids (op, pattern, dst, antialias, src_x, src_y, dst_x, dst_y, @@ -1843,7 +1843,7 @@ typedef struct { static cairo_status_t _cairo_surface_old_show_glyphs_draw_func (void *closure, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_surface_t *dst, int dst_x, @@ -1872,7 +1872,7 @@ _cairo_surface_old_show_glyphs_draw_func (void *closure, if (!src) src = &pattern.base; - status = _cairo_surface_old_show_glyphs (glyph_info->font, operator, src, + status = _cairo_surface_old_show_glyphs (glyph_info->font, op, src, dst, extents->x, extents->y, extents->x - dst_x, @@ -1886,7 +1886,7 @@ _cairo_surface_old_show_glyphs_draw_func (void *closure, return status; status = _cairo_scaled_font_show_glyphs (glyph_info->font, - operator, + op, src, dst, extents->x, extents->y, extents->x - dst_x, extents->y - dst_y, @@ -1902,7 +1902,7 @@ _cairo_surface_old_show_glyphs_draw_func (void *closure, static cairo_status_t _fallback_show_glyphs (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, @@ -1916,7 +1916,7 @@ _fallback_show_glyphs (cairo_surface_t *surface, if (status) return status; - if (_cairo_operator_bounded_by_mask (operator)) { + if (_cairo_operator_bounded_by_mask (op)) { status = _cairo_scaled_font_glyph_device_extents (scaled_font, glyphs, num_glyphs, @@ -1936,7 +1936,7 @@ _fallback_show_glyphs (cairo_surface_t *surface, glyph_info.num_glyphs = num_glyphs; status = _cairo_gstate_clip_and_composite (surface->clip, - operator, + op, source, _cairo_surface_old_show_glyphs_draw_func, &glyph_info, @@ -1948,7 +1948,7 @@ _fallback_show_glyphs (cairo_surface_t *surface, cairo_status_t _cairo_surface_show_glyphs (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, @@ -1959,14 +1959,14 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, assert (! surface->is_snapshot); if (surface->backend->show_glyphs) { - status = surface->backend->show_glyphs (surface, operator, source, + status = surface->backend->show_glyphs (surface, op, source, glyphs, num_glyphs, scaled_font); if (status != CAIRO_INT_STATUS_UNSUPPORTED) return status; } - return _fallback_show_glyphs (surface, operator, source, + return _fallback_show_glyphs (surface, op, source, glyphs, num_glyphs, scaled_font); } @@ -1978,7 +1978,7 @@ _cairo_surface_show_glyphs (cairo_surface_t *surface, * cleaned up in terms of both semantics and naming). */ cairo_status_t _cairo_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *dst, int source_x, @@ -2002,7 +2002,7 @@ _cairo_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, if (dst->backend->old_show_glyphs) status = dst->backend->old_show_glyphs (scaled_font, - operator, pattern, dst, + op, pattern, dst, source_x, source_y, dest_x, dest_y, width, height, diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 17483c95e..7edfe4e10 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -421,7 +421,7 @@ emit_composite_pattern (xmlNodePtr node, } static cairo_int_status_t -_cairo_svg_surface_composite (cairo_operator_t operator, +_cairo_svg_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -448,7 +448,7 @@ _cairo_svg_surface_composite (cairo_operator_t operator, } static void -emit_operator (cairo_operator_t operator, cairo_svg_surface_t *surface, +emit_operator (cairo_operator_t op, cairo_svg_surface_t *surface, xmlBufferPtr style) { char const *op_str[] = { @@ -462,12 +462,12 @@ emit_operator (cairo_operator_t operator, cairo_svg_surface_t *surface, xmlBufferPtr id; char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN]; - if (op_str[operator] == NULL) + if (op_str[op] == NULL) return; child = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("filter"), NULL); primitive = xmlNewChild (child, NULL, CC2XML ("feComposite"), NULL); - xmlSetProp (primitive, CC2XML ("operator"), CC2XML (op_str[operator])); + xmlSetProp (primitive, CC2XML ("operator"), CC2XML (op_str[op])); xmlSetProp (primitive, CC2XML ("in"), CC2XML ("SourceGraphic")); xmlSetProp (primitive, CC2XML ("in2"), CC2XML ("BackgroundImage")); @@ -852,7 +852,7 @@ _cairo_svg_path_close_path (void *closure) static cairo_int_status_t _cairo_svg_surface_fill (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -873,7 +873,7 @@ _cairo_svg_surface_fill (void *abstract_surface, style = xmlBufferCreate (); emit_pattern (surface, source, style, 0); xmlBufferCat (style, " stroke: none;"); - emit_operator (operator, surface, style); + emit_operator (op, surface, style); status = _cairo_path_fixed_interpret (path, CAIRO_DIRECTION_FORWARD, @@ -903,7 +903,7 @@ intersect (cairo_line_t *line, cairo_fixed_t y) } static cairo_int_status_t -_cairo_svg_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_svg_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -1000,7 +1000,7 @@ _cairo_svg_surface_get_extents (void *abstract_surface, static cairo_int_status_t _cairo_svg_surface_stroke (void *abstract_dst, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *stroke_style, @@ -1097,7 +1097,7 @@ _cairo_svg_surface_stroke (void *abstract_dst, static cairo_int_status_t _cairo_svg_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_surface, int source_x, @@ -1127,7 +1127,7 @@ _cairo_svg_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, if (status) return status; - status = _cairo_svg_surface_fill (abstract_surface, operator, pattern, + status = _cairo_svg_surface_fill (abstract_surface, op, pattern, &path, CAIRO_FILL_RULE_WINDING, 0.0, CAIRO_ANTIALIAS_SUBPIXEL); _cairo_path_fixed_fini (&path); diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index ab2deec2f..0b687e428 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -1103,7 +1103,7 @@ _cairo_win32_scaled_font_glyph_init (void *abstract_font, static cairo_int_status_t _cairo_win32_scaled_font_show_glyphs (void *abstract_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *generic_surface, int source_x, @@ -1124,7 +1124,7 @@ _cairo_win32_scaled_font_show_glyphs (void *abstract_font, if (_cairo_surface_is_win32 (generic_surface) && surface->format == CAIRO_FORMAT_RGB24 && - operator == CAIRO_OPERATOR_OVER && + op == CAIRO_OPERATOR_OVER && _cairo_pattern_is_opaque_solid (pattern)) { cairo_solid_pattern_t *solid_pattern = (cairo_solid_pattern_t *)pattern; @@ -1193,13 +1193,13 @@ _cairo_win32_scaled_font_show_glyphs (void *abstract_font, return CAIRO_STATUS_NO_MEMORY; } - /* For operator == OVER, no-cleartype, a possible optimization here is to + /* For op == OVER, no-cleartype, a possible optimization here is to * draw onto an intermediate ARGB32 surface and alpha-blend that with the * destination */ _cairo_pattern_init_for_surface (&mask, mask_surface); - status = _cairo_surface_composite (operator, pattern, + status = _cairo_surface_composite (op, pattern, &mask.base, &surface->base, source_x, source_y, diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c index dbb8e0fd8..b1811a134 100644 --- a/src/cairo-win32-surface.c +++ b/src/cairo-win32-surface.c @@ -614,7 +614,7 @@ _composite_alpha_blend (cairo_win32_surface_t *dst, } static cairo_int_status_t -_cairo_win32_surface_composite (cairo_operator_t operator, +_cairo_win32_surface_composite (cairo_operator_t op, cairo_pattern_t *pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -662,8 +662,8 @@ _cairo_win32_surface_composite (cairo_operator_t operator, if (alpha == 255 && src->format == dst->format && - (operator == CAIRO_OPERATOR_SOURCE || - (src->format == CAIRO_FORMAT_RGB24 && operator == CAIRO_OPERATOR_OVER))) { + (op == CAIRO_OPERATOR_SOURCE || + (src->format == CAIRO_FORMAT_RGB24 && op == CAIRO_OPERATOR_OVER))) { if (!BitBlt (dst->dc, dst_x, dst_y, @@ -678,7 +678,7 @@ _cairo_win32_surface_composite (cairo_operator_t operator, } else if (integer_transform && (src->format == CAIRO_FORMAT_RGB24 || src->format == CAIRO_FORMAT_ARGB32) && dst->format == CAIRO_FORMAT_RGB24 && - operator == CAIRO_OPERATOR_OVER) { + op == CAIRO_OPERATOR_OVER) { return _composite_alpha_blend (dst, src, alpha, src_x + itx, src_y + ity, @@ -695,7 +695,7 @@ _cairo_win32_surface_composite (cairo_operator_t operator, * super-luminescent colors (a == 0, r,g,b > 0) */ static enum { DO_CLEAR, DO_SOURCE, DO_NOTHING, DO_UNSUPPORTED } -categorize_solid_dest_operator (cairo_operator_t operator, +categorize_solid_dest_operator (cairo_operator_t op, unsigned short alpha) { enum { SOURCE_TRANSPARENT, SOURCE_LIGHT, SOURCE_SOLID, SOURCE_OTHER } source; @@ -707,7 +707,7 @@ categorize_solid_dest_operator (cairo_operator_t operator, else source = SOURCE_OTHER; - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: /* 0 0 */ case CAIRO_OPERATOR_OUT: /* 1 - Ab 0 */ return DO_CLEAR; @@ -768,7 +768,7 @@ categorize_solid_dest_operator (cairo_operator_t operator, static cairo_int_status_t _cairo_win32_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -788,7 +788,7 @@ _cairo_win32_surface_fill_rectangles (void *abstract_surface, /* Optimize for no destination alpha (surface->pixman_image is non-NULL for all * surfaces with alpha.) */ - switch (categorize_solid_dest_operator (operator, color->alpha_short)) { + switch (categorize_solid_dest_operator (op, color->alpha_short)) { case DO_CLEAR: new_color = RGB (0, 0, 0); break; diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c index afb0ddb70..f7e65ff08 100644 --- a/src/cairo-xcb-surface.c +++ b/src/cairo-xcb-surface.c @@ -799,9 +799,9 @@ _cairo_xcb_surface_set_attributes (cairo_xcb_surface_t *surface, } static int -_render_operator (cairo_operator_t operator) +_render_operator (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: return XCBRenderPictOpClear; case CAIRO_OPERATOR_SOURCE: @@ -836,7 +836,7 @@ _render_operator (cairo_operator_t operator) } static cairo_int_status_t -_cairo_xcb_surface_composite (cairo_operator_t operator, +_cairo_xcb_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -877,7 +877,7 @@ _cairo_xcb_surface_composite (cairo_operator_t operator, status = _cairo_xcb_surface_set_attributes (mask, &mask_attr); if (status == CAIRO_STATUS_SUCCESS) XCBRenderComposite (dst->dpy, - _render_operator (operator), + _render_operator (op), src->picture, mask->picture, dst->picture, @@ -893,7 +893,7 @@ _cairo_xcb_surface_composite (cairo_operator_t operator, static XCBRenderPICTURE maskpict = { 0 }; XCBRenderComposite (dst->dpy, - _render_operator (operator), + _render_operator (op), src->picture, maskpict, dst->picture, @@ -915,7 +915,7 @@ _cairo_xcb_surface_composite (cairo_operator_t operator, static cairo_int_status_t _cairo_xcb_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -933,7 +933,7 @@ _cairo_xcb_surface_fill_rectangles (void *abstract_surface, /* XXX: This XCBRECTANGLE cast is evil... it needs to go away somehow. */ XCBRenderFillRectangles (surface->dpy, - _render_operator (operator), + _render_operator (op), surface->picture, render_color, num_rects, (XCBRECTANGLE *) rects); @@ -941,7 +941,7 @@ _cairo_xcb_surface_fill_rectangles (void *abstract_surface, } static cairo_int_status_t -_cairo_xcb_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_xcb_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -997,7 +997,7 @@ _cairo_xcb_surface_composite_trapezoids (cairo_operator_t operator, status = _cairo_xcb_surface_set_attributes (src, &attributes); if (status == CAIRO_STATUS_SUCCESS) XCBRenderTrapezoids (dst->dpy, - _render_operator (operator), + _render_operator (op), src->picture, dst->picture, render_format.id, render_src_x + attributes.x_offset, diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index 3176cbc95..38c7c76b6 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -995,14 +995,14 @@ _surface_has_alpha (cairo_xlib_surface_t *surface) * requires alpha compositing to complete. */ static cairo_bool_t -_operator_needs_alpha_composite (cairo_operator_t operator, +_operator_needs_alpha_composite (cairo_operator_t op, cairo_bool_t surface_has_alpha) { - if (operator == CAIRO_OPERATOR_SOURCE || + if (op == CAIRO_OPERATOR_SOURCE || (!surface_has_alpha && - (operator == CAIRO_OPERATOR_OVER || - operator == CAIRO_OPERATOR_ATOP || - operator == CAIRO_OPERATOR_IN))) + (op == CAIRO_OPERATOR_OVER || + op == CAIRO_OPERATOR_ATOP || + op == CAIRO_OPERATOR_IN))) return FALSE; return TRUE; @@ -1039,7 +1039,7 @@ typedef enum { */ static composite_operation_t _categorize_composite_operation (cairo_xlib_surface_t *dst, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_bool_t have_mask) @@ -1060,13 +1060,13 @@ _categorize_composite_operation (cairo_xlib_surface_t *dst, * fallback is impossible. */ if (have_mask || - !(operator == CAIRO_OPERATOR_SOURCE || operator == CAIRO_OPERATOR_OVER)) + !(op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_OVER)) return DO_UNSUPPORTED; if (_cairo_surface_is_xlib (surface_pattern->surface)) { cairo_xlib_surface_t *src = (cairo_xlib_surface_t *)surface_pattern->surface; - if (operator == CAIRO_OPERATOR_OVER && _surface_has_alpha (src)) + if (op == CAIRO_OPERATOR_OVER && _surface_has_alpha (src)) return DO_UNSUPPORTED; /* If these are on the same screen but otherwise incompatible, @@ -1099,7 +1099,7 @@ _categorize_composite_operation (cairo_xlib_surface_t *dst, */ static composite_operation_t _recategorize_composite_operation (cairo_xlib_surface_t *dst, - cairo_operator_t operator, + cairo_operator_t op, cairo_xlib_surface_t *src, cairo_surface_attributes_t *src_attr, cairo_bool_t have_mask) @@ -1107,7 +1107,7 @@ _recategorize_composite_operation (cairo_xlib_surface_t *dst, cairo_bool_t is_integer_translation = _cairo_matrix_is_integer_translation (&src_attr->matrix, NULL, NULL); cairo_bool_t needs_alpha_composite = - _operator_needs_alpha_composite (operator, _surface_has_alpha (src)); + _operator_needs_alpha_composite (op, _surface_has_alpha (src)); if (!have_mask && is_integer_translation && @@ -1139,9 +1139,9 @@ _recategorize_composite_operation (cairo_xlib_surface_t *dst, } static int -_render_operator (cairo_operator_t operator) +_render_operator (cairo_operator_t op) { - switch (operator) { + switch (op) { case CAIRO_OPERATOR_CLEAR: return PictOpClear; @@ -1179,7 +1179,7 @@ _render_operator (cairo_operator_t operator) } static cairo_int_status_t -_cairo_xlib_surface_composite (cairo_operator_t operator, +_cairo_xlib_surface_composite (cairo_operator_t op, cairo_pattern_t *src_pattern, cairo_pattern_t *mask_pattern, void *abstract_dst, @@ -1203,7 +1203,7 @@ _cairo_xlib_surface_composite (cairo_operator_t operator, if (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE (dst)) return CAIRO_INT_STATUS_UNSUPPORTED; - operation = _categorize_composite_operation (dst, operator, src_pattern, + operation = _categorize_composite_operation (dst, op, src_pattern, mask_pattern != NULL); if (operation == DO_UNSUPPORTED) return CAIRO_INT_STATUS_UNSUPPORTED; @@ -1219,7 +1219,7 @@ _cairo_xlib_surface_composite (cairo_operator_t operator, if (status) return status; - operation = _recategorize_composite_operation (dst, operator, src, &src_attr, + operation = _recategorize_composite_operation (dst, op, src, &src_attr, mask_pattern != NULL); if (operation == DO_UNSUPPORTED) { status = CAIRO_INT_STATUS_UNSUPPORTED; @@ -1240,7 +1240,7 @@ _cairo_xlib_surface_composite (cairo_operator_t operator, goto FAIL; XRenderComposite (dst->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, mask->src_picture, dst->dst_picture, @@ -1252,7 +1252,7 @@ _cairo_xlib_surface_composite (cairo_operator_t operator, width, height); } else { XRenderComposite (dst->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, 0, dst->dst_picture, @@ -1302,7 +1302,7 @@ _cairo_xlib_surface_composite (cairo_operator_t operator, ASSERT_NOT_REACHED; } - if (!_cairo_operator_bounded_by_source (operator)) + if (!_cairo_operator_bounded_by_source (op)) status = _cairo_surface_composite_fixup_unbounded (&dst->base, &src_attr, src->width, src->height, mask ? &mask_attr : NULL, @@ -1324,7 +1324,7 @@ _cairo_xlib_surface_composite (cairo_operator_t operator, static cairo_int_status_t _cairo_xlib_surface_fill_rectangles (void *abstract_surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects) @@ -1343,7 +1343,7 @@ _cairo_xlib_surface_fill_rectangles (void *abstract_surface, /* XXX: This XRectangle cast is evil... it needs to go away somehow. */ _cairo_xlib_surface_ensure_dst_picture (surface); XRenderFillRectangles (surface->dpy, - _render_operator (operator), + _render_operator (op), surface->dst_picture, &render_color, (XRectangle *) rects, num_rects); @@ -1442,7 +1442,7 @@ _create_trapezoid_mask (cairo_xlib_surface_t *dst, } static cairo_int_status_t -_cairo_xlib_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_xlib_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_dst, cairo_antialias_t antialias, @@ -1467,7 +1467,7 @@ _cairo_xlib_surface_composite_trapezoids (cairo_operator_t operator, if (!CAIRO_SURFACE_RENDER_HAS_TRAPEZOIDS (dst)) return CAIRO_INT_STATUS_UNSUPPORTED; - operation = _categorize_composite_operation (dst, operator, pattern, TRUE); + operation = _categorize_composite_operation (dst, op, pattern, TRUE); if (operation == DO_UNSUPPORTED) return CAIRO_INT_STATUS_UNSUPPORTED; @@ -1478,7 +1478,7 @@ _cairo_xlib_surface_composite_trapezoids (cairo_operator_t operator, if (status) return status; - operation = _recategorize_composite_operation (dst, operator, src, &attributes, TRUE); + operation = _recategorize_composite_operation (dst, op, src, &attributes, TRUE); if (operation == DO_UNSUPPORTED) { status = CAIRO_INT_STATUS_UNSUPPORTED; goto FAIL; @@ -1509,7 +1509,7 @@ _cairo_xlib_surface_composite_trapezoids (cairo_operator_t operator, if (status) goto FAIL; - if (!_cairo_operator_bounded_by_mask (operator)) { + if (!_cairo_operator_bounded_by_mask (op)) { /* XRenderCompositeTrapezoids() creates a mask only large enough for the * trapezoids themselves, but if the operator is unbounded, then we need * to actually composite all the way out to the bounds, so we create @@ -1528,7 +1528,7 @@ _cairo_xlib_surface_composite_trapezoids (cairo_operator_t operator, } XRenderComposite (dst->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, mask_picture, dst->dst_picture, @@ -1551,7 +1551,7 @@ _cairo_xlib_surface_composite_trapezoids (cairo_operator_t operator, } else { /* XXX: The XTrapezoid cast is evil and needs to go away somehow. */ XRenderCompositeTrapezoids (dst->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, dst->dst_picture, pict_format, render_src_x + attributes.x_offset, @@ -1655,7 +1655,7 @@ _cairo_xlib_surface_get_font_options (void *abstract_surface, static cairo_int_status_t _cairo_xlib_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_surface, int source_x, @@ -2201,7 +2201,7 @@ _cairo_xlib_surface_add_glyph (Display *dpy, static cairo_status_t _cairo_xlib_surface_old_show_glyphs8 (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_xlib_surface_t *src, cairo_xlib_surface_t *self, int source_x, @@ -2247,7 +2247,7 @@ _cairo_xlib_surface_old_show_glyphs8 (cairo_scaled_font_t *scaled_font, } XRenderCompositeText8 (self->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, self->dst_picture, font_private->format, @@ -2263,7 +2263,7 @@ _cairo_xlib_surface_old_show_glyphs8 (cairo_scaled_font_t *scaled_font, static cairo_status_t _cairo_xlib_surface_old_show_glyphs16 (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_xlib_surface_t *src, cairo_xlib_surface_t *self, int source_x, @@ -2309,7 +2309,7 @@ _cairo_xlib_surface_old_show_glyphs16 (cairo_scaled_font_t *scaled_font, } XRenderCompositeText16 (self->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, self->dst_picture, font_private->format, @@ -2325,7 +2325,7 @@ _cairo_xlib_surface_old_show_glyphs16 (cairo_scaled_font_t *scaled_font, static cairo_status_t _cairo_xlib_surface_old_show_glyphs32 (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_xlib_surface_t *src, cairo_xlib_surface_t *self, int source_x, @@ -2371,7 +2371,7 @@ _cairo_xlib_surface_old_show_glyphs32 (cairo_scaled_font_t *scaled_font, } XRenderCompositeText32 (self->dpy, - _render_operator (operator), + _render_operator (op), src->src_picture, self->dst_picture, font_private->format, @@ -2387,7 +2387,7 @@ _cairo_xlib_surface_old_show_glyphs32 (cairo_scaled_font_t *scaled_font, static cairo_int_status_t _cairo_xlib_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *abstract_surface, int source_x, @@ -2413,7 +2413,7 @@ _cairo_xlib_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, if (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE_TEXT (self) || !self->format) return CAIRO_INT_STATUS_UNSUPPORTED; - operation = _categorize_composite_operation (self, operator, pattern, TRUE); + operation = _categorize_composite_operation (self, op, pattern, TRUE); if (operation == DO_UNSUPPORTED) return CAIRO_INT_STATUS_UNSUPPORTED; @@ -2430,7 +2430,7 @@ _cairo_xlib_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, if (status) return status; - operation = _recategorize_composite_operation (self, operator, src, &attributes, TRUE); + operation = _recategorize_composite_operation (self, op, src, &attributes, TRUE); if (operation == DO_UNSUPPORTED) { status = CAIRO_INT_STATUS_UNSUPPORTED; goto FAIL; @@ -2460,22 +2460,22 @@ _cairo_xlib_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, /* Call the appropriate sub-function. */ if (max_index < 256) - status = _cairo_xlib_surface_old_show_glyphs8 (scaled_font, operator, src, self, + status = _cairo_xlib_surface_old_show_glyphs8 (scaled_font, op, src, self, source_x + attributes.x_offset - dest_x, source_y + attributes.y_offset - dest_y, glyphs, num_glyphs); else if (max_index < 65536) - status = _cairo_xlib_surface_old_show_glyphs16 (scaled_font, operator, src, self, + status = _cairo_xlib_surface_old_show_glyphs16 (scaled_font, op, src, self, source_x + attributes.x_offset - dest_x, source_y + attributes.y_offset - dest_y, glyphs, num_glyphs); else - status = _cairo_xlib_surface_old_show_glyphs32 (scaled_font, operator, src, self, + status = _cairo_xlib_surface_old_show_glyphs32 (scaled_font, op, src, self, source_x + attributes.x_offset - dest_x, source_y + attributes.y_offset - dest_y, glyphs, num_glyphs); - if (status == CAIRO_STATUS_SUCCESS && !_cairo_operator_bounded_by_mask (operator)) { + if (status == CAIRO_STATUS_SUCCESS && !_cairo_operator_bounded_by_mask (op)) { cairo_rectangle_t extents; status = _cairo_scaled_font_glyph_device_extents (scaled_font, glyphs, diff --git a/src/cairoint.h b/src/cairoint.h index 69a7aa204..f9977c033 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -523,7 +523,7 @@ struct _cairo_scaled_font_backend { uint32_t ucs4); cairo_int_status_t (*show_glyphs) (void *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *surface, int source_x, @@ -622,7 +622,7 @@ struct _cairo_surface_backend { /* XXX: dst should be the first argument for consistency */ cairo_int_status_t - (*composite) (cairo_operator_t operator, + (*composite) (cairo_operator_t op, cairo_pattern_t *src, cairo_pattern_t *mask, void *dst, @@ -637,14 +637,14 @@ struct _cairo_surface_backend { cairo_int_status_t (*fill_rectangles) (void *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects); /* XXX: dst should be the first argument for consistency */ cairo_int_status_t - (*composite_trapezoids) (cairo_operator_t operator, + (*composite_trapezoids) (cairo_operator_t op, cairo_pattern_t *pattern, void *dst, cairo_antialias_t antialias, @@ -722,7 +722,7 @@ struct _cairo_surface_backend { */ cairo_int_status_t (*old_show_glyphs) (cairo_scaled_font_t *font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, void *surface, int source_x, @@ -760,18 +760,18 @@ struct _cairo_surface_backend { * naming and argument-order convensions. */ cairo_int_status_t (*paint) (void *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source); cairo_int_status_t (*mask) (void *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask); cairo_int_status_t (*stroke) (void *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *style, @@ -782,7 +782,7 @@ struct _cairo_surface_backend { cairo_int_status_t (*fill) (void *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -791,7 +791,7 @@ struct _cairo_surface_backend { cairo_int_status_t (*show_glyphs) (void *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, @@ -1073,7 +1073,7 @@ cairo_private cairo_pattern_t * _cairo_gstate_get_source (cairo_gstate_t *gstate); cairo_private cairo_status_t -_cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator); +_cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t op); cairo_private cairo_operator_t _cairo_gstate_get_operator (cairo_gstate_t *gstate); @@ -1281,7 +1281,7 @@ _cairo_gstate_glyph_path (cairo_gstate_t *gstate, cairo_path_fixed_t *path); typedef cairo_status_t (*cairo_draw_func_t) (void *closure, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_surface_t *dst, int dst_x, @@ -1290,7 +1290,7 @@ typedef cairo_status_t (*cairo_draw_func_t) (void *closure, cairo_private cairo_status_t _cairo_gstate_clip_and_composite (cairo_clip_t *clip, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *src, cairo_draw_func_t draw_func, void *draw_closure, @@ -1298,10 +1298,10 @@ _cairo_gstate_clip_and_composite (cairo_clip_t *clip, const cairo_rectangle_t *extents); cairo_private cairo_bool_t -_cairo_operator_bounded_by_mask (cairo_operator_t operator); +_cairo_operator_bounded_by_mask (cairo_operator_t op); cairo_private cairo_bool_t -_cairo_operator_bounded_by_source (cairo_operator_t operator); +_cairo_operator_bounded_by_source (cairo_operator_t op); /* cairo_color.c */ cairo_private const cairo_color_t * @@ -1528,7 +1528,7 @@ _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t *scaled_font, cairo_private cairo_status_t _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_surface_t *surface, int source_x, @@ -1609,7 +1609,7 @@ cairo_private cairo_clip_mode_t _cairo_surface_get_clip_mode (cairo_surface_t *surface); cairo_private cairo_status_t -_cairo_surface_composite (cairo_operator_t operator, +_cairo_surface_composite (cairo_operator_t op, cairo_pattern_t *src, cairo_pattern_t *mask, cairo_surface_t *dst, @@ -1624,7 +1624,7 @@ _cairo_surface_composite (cairo_operator_t operator, cairo_private cairo_status_t _cairo_surface_fill_rectangle (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, int x, int y, @@ -1633,31 +1633,31 @@ _cairo_surface_fill_rectangle (cairo_surface_t *surface, cairo_private cairo_status_t _cairo_surface_fill_region (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, pixman_region16_t *region); cairo_private cairo_status_t _cairo_surface_fill_rectangles (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects); cairo_private cairo_status_t _cairo_surface_paint (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source); cairo_private cairo_status_t _cairo_surface_mask (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_pattern_t *mask); cairo_private cairo_status_t _cairo_surface_stroke (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_stroke_style_t *style, @@ -1668,7 +1668,7 @@ _cairo_surface_stroke (cairo_surface_t *surface, cairo_private cairo_status_t _cairo_surface_fill (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, @@ -1677,14 +1677,14 @@ _cairo_surface_fill (cairo_surface_t *surface, cairo_private cairo_status_t _cairo_surface_show_glyphs (cairo_surface_t *surface, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *source, const cairo_glyph_t *glyphs, int num_glyphs, cairo_scaled_font_t *scaled_font); cairo_private cairo_status_t -_cairo_surface_composite_trapezoids (cairo_operator_t operator, +_cairo_surface_composite_trapezoids (cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *dst, cairo_antialias_t antialias, @@ -1699,7 +1699,7 @@ _cairo_surface_composite_trapezoids (cairo_operator_t operator, cairo_private cairo_status_t _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, - cairo_operator_t operator, + cairo_operator_t op, cairo_surface_t *dst, cairo_traps_t *traps, cairo_clip_t *clip, @@ -1773,7 +1773,7 @@ _cairo_surface_get_extents (cairo_surface_t *surface, cairo_private cairo_status_t _cairo_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, - cairo_operator_t operator, + cairo_operator_t op, cairo_pattern_t *pattern, cairo_surface_t *surface, int source_x, diff --git a/test/get-and-set.c b/test/get-and-set.c index 1ebdddd0e..d0da5ca3c 100644 --- a/test/get-and-set.c +++ b/test/get-and-set.c @@ -32,7 +32,7 @@ cairo_test_t test = { }; typedef struct { - cairo_operator_t operator; + cairo_operator_t op; double tolerance; cairo_fill_rule_t fill_rule; double line_width; @@ -69,7 +69,7 @@ settings_t settings[] = { static void settings_set (cairo_t *cr, settings_t *settings) { - cairo_set_operator (cr, settings->operator); + cairo_set_operator (cr, settings->op); cairo_set_tolerance (cr, settings->tolerance); cairo_set_fill_rule (cr, settings->fill_rule); cairo_set_line_width (cr, settings->line_width); @@ -82,7 +82,7 @@ settings_set (cairo_t *cr, settings_t *settings) static void settings_get (cairo_t *cr, settings_t *settings) { - settings->operator = cairo_get_operator (cr); + settings->op = cairo_get_operator (cr); settings->tolerance = cairo_get_tolerance (cr); settings->fill_rule = cairo_get_fill_rule (cr); settings->line_width = cairo_get_line_width (cr); @@ -95,7 +95,7 @@ settings_get (cairo_t *cr, settings_t *settings) static int settings_equal (settings_t *a, settings_t *b) { - return (a->operator == b->operator && + return (a->op == b->op && a->tolerance == b->tolerance && a->fill_rule == b->fill_rule && a->line_width == b->line_width && |