-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Concave polygon fill and the plot widget #513
Comments
I touched on this in #471 but haven't gotten a response yet:
More efficient algorithms are exponentially more difficult to implement, so going with |
The problem with There is another alternative: turn off feathering and turn on MSAA to get smoother edges. This is already supported on |
Maybe we could decompose one concave polygon into some convex polygons, and store them. |
Just came across this same issue - has any work towards this been done? My use case in particular is filling the area underneath a line plot. I'm currently implementing a workaround but ideally this would be something that egui supports natively - let me know if there's anything I can do to help. |
From what I can tell by reading the docs/playing with the code currently only convex polygon filling is supported. Is supporting concave (or possibly even complex polygons) a future goal for egui or is that outside the scope of the project? I think something like Lyon could be used for tessellation, and I saw the Mesh type so I can probably combine the two, but I didn't see support for the mesh type with the plot widget.
I really like the egui API in general and the recent improvements to the plot widget are very nice. I would like to be able to add concave polygons to plots. I am currently using wasm + html/js to create the cavalier contours web demo (web demo link here), but the egui API looks very nice and keeps everything in Rust.
I looked briefly at the code and I see the plot widget structs use the shape types/rendering under the hood. One option I see is just adding generic mesh object support to the plot widget (kind of a low level interface for the widget), another possibility is building out support for concave polygons in general, any thoughts/plans already around this?
The text was updated successfully, but these errors were encountered: