Skip to content
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

New feature: draw arcs & solid arcs #258

Closed
Lucas-C opened this issue Oct 12, 2021 · 5 comments
Closed

New feature: draw arcs & solid arcs #258

Lucas-C opened this issue Oct 12, 2021 · 5 comments

Comments

@Lucas-C
Copy link
Member

Lucas-C commented Oct 12, 2021

One or two new methods could be added to FPDF,
similarly to the existing, rect(), circle(), or ellipse()

Inspiration could be taken from HexaPDF

@Lucas-C
Copy link
Member Author

Lucas-C commented Oct 26, 2021

Implemented in #266

Thanks @tabarnhack!

@Lucas-C Lucas-C closed this as completed Oct 26, 2021
@gettalong
Copy link

@Lucas-C Nice that you draw inspiration from HexaPDF 😁

I just saw the example output at https://pyfpdf.github.io/fpdf2/Shapes.html and wanted to note that the lines joining at the center of the green solid arc are not joined correctly. You can see artifacts sticking out:
image

HexaPDF renders this arc like this:

image

So you might wanna draw the whole solid arc with one continuous path instead of multiple.

@Lucas-C
Copy link
Member Author

Lucas-C commented Aug 16, 2022

Thank you @gettalong!

At first, I thought that in order to fix this we would need to implement PDF Line Join Styles,
but in fact I think we should imply use the h path operator intead of closing arcs with a line using l:
https://github.com/PyFPDF/fpdf2/blob/2.5.5/fpdf/fpdf.py#L1651

We should open a dedicated "bug" issue explaining the problem and how to solve it in arc() in solid_arc() methods

@gettalong
Copy link

Yeah, that could also be the reason and would certainly be easier.

@Lucas-C
Copy link
Member Author

Lucas-C commented Aug 16, 2022

I opened #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants