From 112bbacea3c06f844af400f34a4a2eadf25d13dd Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sat, 15 Mar 2008 00:28:21 +1030 Subject: [PATCH] Don't use fill-stroke during analysis Instead ensure the fill and stroke are each analyzed separately. This fixes a bug in the PS output where if a fill-stroke with a translucent fill resulted in a fallback image with the stroke clipped to the fill path. --- src/cairo-meta-surface.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c index 66849b484..441a7d65b 100644 --- a/src/cairo-meta-surface.c +++ b/src/cairo-meta-surface.c @@ -743,7 +743,11 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface, { cairo_command_t *stroke_command; - stroke_command = (i < num_elements - 1) ? elements[i + 1] : NULL; + if (type != CAIRO_META_CREATE_REGIONS) + stroke_command = (i < num_elements - 1) ? elements[i + 1] : NULL; + else + stroke_command = NULL; + if (stroke_command != NULL && type == CAIRO_META_REPLAY && region != CAIRO_META_REGION_ALL) { @@ -783,14 +787,6 @@ _cairo_meta_surface_replay_internal (cairo_surface_t *surface, stroke_command->stroke.tolerance, stroke_command->stroke.antialias); i++; - if (type == CAIRO_META_CREATE_REGIONS) { - if (status == CAIRO_STATUS_SUCCESS) { - stroke_command->header.region = CAIRO_META_REGION_NATIVE; - } else if (status == CAIRO_INT_STATUS_IMAGE_FALLBACK) { - stroke_command->header.region = CAIRO_META_REGION_IMAGE_FALLBACK; - status = CAIRO_STATUS_SUCCESS; - } - } } else status = _cairo_surface_fill (target, command->fill.op,