fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
777 stars 95 forks source link

Evenodd fill rule for paths #92

Closed jannschu closed 3 years ago

jannschu commented 3 years ago

Hi,

I would like to use the "evenodd" filling rule for a path. Skimming through the code the corresponding operations already seem to be defined but the Line API only uses only "nonzero" filling at the moment.

I also have some time to create a PR for this if you want, but I would need your opinion on how the API should change and if an API break would be fine. Alternatively, I could also work with access to the low level Operation.

Edit: On second look, I also need the "close" and "move" semantics.

fschutt commented 3 years ago

Yeah, it would probably be okay to just expose the low-level Operation, you can just break the API by requiring people to add a new FillRule enum to the line function. If it's mentioned in the changelog, it should be easy enough for people to upgrade