mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 20:40:10 +01:00
Reset dashing for new subpaths.
Fixes the bug mentioned in b87726ee2a by reseting
the dash pattern for each new subpath. This is correct behaviour according to
the end of PDF Reference v1.6 section 4.3.2.
This commit now makes the dash-caps-joins test case pass for all
backends except for the PostScript backend.
This commit is contained in:
parent
f02aacbb5f
commit
65e706ee14
1 changed files with 11 additions and 1 deletions
|
|
@ -615,6 +615,16 @@ _cairo_stroker_move_to (void *closure, cairo_point_t *point)
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_move_to_dashed (void *closure, cairo_point_t *point)
|
||||
{
|
||||
/* reset the dash pattern for new sub paths */
|
||||
cairo_stroker_t *stroker = closure;
|
||||
_cairo_stroker_start_dash (stroker);
|
||||
|
||||
return _cairo_stroker_move_to (closure, point);
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_line_to (void *closure, cairo_point_t *point)
|
||||
{
|
||||
|
|
@ -954,7 +964,7 @@ _cairo_path_fixed_stroke_to_traps (cairo_path_fixed_t *path,
|
|||
if (stroker.style->dash)
|
||||
status = _cairo_path_fixed_interpret (path,
|
||||
CAIRO_DIRECTION_FORWARD,
|
||||
_cairo_stroker_move_to,
|
||||
_cairo_stroker_move_to_dashed,
|
||||
_cairo_stroker_line_to_dashed,
|
||||
_cairo_stroker_curve_to_dashed,
|
||||
_cairo_stroker_close_path,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue