Fix conversion of cubic Bézier "curveto" commands into "shorthand/smooth curveto" commands. (#110)
When the preceeding path segment is a Bézier curve, too, the first control point of the shorthand defaults to the mirrored version of the second control point of this preceeding path segment. Scour always assumed (0,0) as the control point in this case which could result in modified path data (e.g. #91).
This commit is contained in:
parent
0fac95ee09
commit
1aa5722c6a
3 changed files with 16 additions and 4 deletions
|
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg version="1.1" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m10,100c50-50,50,50,100,0,50-50,50,50,100,0" fill="none" stroke="blue" stroke-width="5"/>
|
||||
<path id="path1" d="m10,100c50-50,50,50,100,0,50-50,50,50,100,0" fill="none" stroke="blue" stroke-width="5"/>
|
||||
<path id="path2a" d="m200,200c0,0 200,100 200,0" fill="none" stroke="red" stroke-width="5"/>
|
||||
<path id="path2b" d="m0,300s200-100 200,0c0,0 200,100 200,0" fill="none" stroke="green" stroke-width="5"/>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 455 B |
Loading…
Add table
Add a link
Reference in a new issue