Fix duplicate adjustment in SVG path command T #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The control point (
px
,py
) is already updated in the else branch above (L271). It is then updated once again which causes Hopding#1443This commit removes these duplicated lines which fixes the bug.
What?
Fixes Hopding#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 馃
Anything Else?
Thanks for keeping this project alive, guys! 鉂わ笍
Checklist
TLDR, sorry
Sorry, I'm not a
yarn
guy. But your CI checks that, doesn't it?