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

Don't mesh a polygon in CairoMakie #2398

Merged
merged 3 commits into from
Nov 17, 2022
Merged

Don't mesh a polygon in CairoMakie #2398

merged 3 commits into from
Nov 17, 2022

Conversation

jaakkor2
Copy link
Contributor

@jaakkor2 jaakkor2 commented Nov 3, 2022

CairoMakie plot of a polygon is a mesh resulting in a raster .svg file

Fixes #2396

Treat a polygon same way as an array of polygons

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Added unit tests for new algorithms, conversion methods, etc.

@jkrumbiegel
Copy link
Member

jkrumbiegel commented Nov 7, 2022

Would be great if you could add a plot with a couple different poly versions (including your new one) to this file to ensure they don't get rasterized again in the future. You can make a new testset for them

https://github.com/MakieOrg/Makie.jl/blob/master/CairoMakie/test/rasterization_tests.jl

@jaakkor2
Copy link
Contributor Author

jaakkor2 commented Nov 7, 2022

Thank you @jkrumbiegel for pointing out the location of the rasterization tests. I now simply added a simplest polygon to the existing testset.

@SimonDanisch SimonDanisch merged commit 2b9472e into MakieOrg:master Nov 17, 2022
@fatteneder
Copy link
Contributor

This PR broke the 'polygon with hole' example #2456

@jkrumbiegel
Copy link
Member

Ah damn it seemed not to have a visual regression test. It shouldn't be too hard to fix, sometimes holes don't work right if the interiors are not the opposite winding order, which they should have but don't always have. Not sure what the problem was exactly in the docs case.

@jaakkor2 jaakkor2 deleted the nomeshpolygon branch November 29, 2022 23:39
t-bltg pushed a commit to t-bltg/Makie.jl that referenced this pull request Dec 31, 2022
* Don't mesh a polygon

* Test against polygon rasterization

Co-authored-by: Simon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CairoMakie saving raster to .svg depending on content
4 participants