-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix closePath by using PDF command #3304
Conversation
When I modified that code long time ago, I realized that it is not preferable to always close the path, e.g. on page breaks... |
I will convert this to draft. This does not to solve the |
Fixed the problem mentioned in the issue and added test. Some HTML references were changed. Those were using @Uzlopak what is the worst that could happen? Will it break the pdf? How should I test it? The old code was also closing path (using |
Hi Kurt, I remember when I refactored context2d API command by API command and it had issues with the closePath. It had this bug because I could not figure out how to solve it properly. Currently I am just the nagging old maintainer, who just gives hints for potential issues :). HackbrettXXX takes care of the project, so it is on him if there is a bug. Worst what can happen is that the arcs are broken. |
@HackbrettXXX any luck with this? |
@KurtGokhan your Branch is now out of date. Please rebase or merge latest master into your branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks mostly good.
Could you add a test case where there is an implicit lineTo from the current position to the arc start? E.g.
ctx.beginPath()
ctx.moveTo(100,100)
ctx.arc(100,100,30,0,2)
ctx.fill()
ctx.stroke()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, looks good. Thanks for the PR!
For
context2d.closePath
, PDF commandh
can be used as seen in PDF specFixes: #3293