SVG: Fix reflection points for smooth curves after arcs
Internally, Agg/Mapnik converts arcs to curves. This means that the detection logic in the “smooth curve” command, which looks at the previous points for calculating the reflection point, mistakenly assumes that the previous commands were curve commands, even though they were in reality arc commands. To fix this, we add an explicit lineto command after every arc.
This commit is contained in:
parent
53a8e2ec2c
commit
98e5e64d80
1 changed files with 6 additions and 4 deletions
|
@ -382,10 +382,12 @@ void path_adapter<VC>::arc_to(double rx,
|
|||
{
|
||||
join_path(a);
|
||||
}
|
||||
else
|
||||
{
|
||||
line_to(x, y);
|
||||
}
|
||||
|
||||
// We are adding an explicit line_to, even if we've already add the
|
||||
// bezier arc to the current path. This is to prevent subsequent smooth
|
||||
// bezier curves from accidentally assuming that the previous command
|
||||
// was a bezier curve as well when calculating reflection points.
|
||||
line_to(x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue