mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 22:18:29 +02:00
[stroke] Cap trailing segment when skipping invisible segments.
If we do not maintain the current_face even for invisible dashed segments, then we will generate spurious line segments when attempting to close the path (ala leaky-dashed-rectangle). This fixes the long standing regression introduced just prior to 1.6 and captured in these bug reports: http://lists.cairographics.org/archives/cairo/2008-April/013912.html http://bugs.freedesktop.org/show_bug.cgi?id=17177
This commit is contained in:
parent
9fc745ae9f
commit
444d44acde
1 changed files with 8 additions and 0 deletions
|
|
@ -915,6 +915,14 @@ _cairo_stroker_line_to_dashed (void *closure, cairo_point_t *point)
|
|||
stroker->has_current_face = FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (stroker->has_current_face) {
|
||||
/* Cap final face from previous segment */
|
||||
status = _cairo_stroker_add_trailing_cap (stroker, &stroker->current_face);
|
||||
if (status)
|
||||
return status;
|
||||
stroker->has_current_face = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
_cairo_stroker_step_dash (stroker, step_length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue