See code. Removed two lines of code which were clearly wrong.
Testing?
I've come across this issue cheating when I implemented SVG path support in PDF Maker.
As explained in the bug mentioned above, with this path: M 10,25 Q 30,0 50,25 Q 70,50 90,25 T 130,25 T 170,25, the green line in the image below should be rendered, but the red line actually is.
To reprocude, try drawSvgPath('M 10,25 Q 30,0 50,25 Q 70,50 90,25 T 130,25 T 170,25')
New Dependencies?
No.
Screenshots
Suggested Reading?
Unrelated, but yes, I've read most of the PDF 1.7 spec :nerd_face:
Anything Else?
Thanks for keeping this project alive, guys! :heart:
The control point (
px
,py
) is already updated in the else branch above (L271). It is then updated once again which causes https://github.com/Hopding/pdf-lib/issues/1443This commit removes these duplicated lines which fixes the bug.
What?
Fixes https://github.com/Hopding/pdf-lib/issues/1443
Why?
Because we're making the world a better place.
How?
See code. Removed two lines of code which were clearly wrong.
Testing?
I've come across this issue cheating when I implemented SVG path support in PDF Maker.
As explained in the bug mentioned above, with this path:
M 10,25 Q 30,0 50,25 Q 70,50 90,25 T 130,25 T 170,25
, the green line in the image below should be rendered, but the red line actually is.To reprocude, try
drawSvgPath('M 10,25 Q 30,0 50,25 Q 70,50 90,25 T 130,25 T 170,25')
New Dependencies?
No.
Screenshots
Suggested Reading?
Unrelated, but yes, I've read most of the PDF 1.7 spec :nerd_face:
Anything Else?
Thanks for keeping this project alive, guys! :heart:
Checklist
yarn
guy. But your CI checks that, doesn't it?