From dbd9438f5d01666ea118254427c0dc66a519ec3e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 13 Aug 2009 15:57:30 +0100 Subject: [PATCH] [stroke] Only mark traps as having intersection if non-empty. We were hitting an assertion attempting to eliminate intersections inside the rectilinear tessellator for empty strokes. We can avoid this assertion, by only marking the traps as having potential intersections iff it is non-empty. --- src/cairo-path-stroke.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c index ba169ae72..69300da3a 100644 --- a/src/cairo-path-stroke.c +++ b/src/cairo-path-stroke.c @@ -1493,9 +1493,6 @@ _cairo_rectilinear_stroker_init (cairo_rectilinear_stroker_t *stroker, _cairo_stroker_dash_init (&stroker->dash, stroke_style); stroker->has_bounds = FALSE; - - /* As we incrementally tessellate, we do not eliminate self-intersections */ - stroker->traps->has_intersections = TRUE; } static void @@ -2032,6 +2029,8 @@ _cairo_path_fixed_stroke_rectilinear_to_traps (const cairo_path_fixed_t *path, status = _cairo_rectilinear_stroker_emit_segments (&rectilinear_stroker); traps->is_rectilinear = 1; + /* As we incrementally tessellate, we do not eliminate self-intersections */ + traps->has_intersections = traps->num_traps != 0; BAIL: _cairo_rectilinear_stroker_fini (&rectilinear_stroker);