egui
egui copied to clipboard
egui_plot: Images inside of plots are not clipped during folding animations
Describe the bug
When a Plot with an Image from egui_plot
is put inside of a window, or collapsing header the image is not clipped during the folding or unfolding animations, even though the rest of the plot elements are properly clipped.
See the attached movie:
https://github.com/emilk/egui/assets/5400940/3d20ae8c-4d1c-4e66-809c-3bcace872e09
(I have set the animation duration to 3.0s to exaggerate the effect.
To Reproduce Steps to reproduce the behaviour:
- Launch the project from the reproducer repo: https://github.com/alufers/egui-plot-error-reproducer/blob/master/src/main.rs
- Click the arrow near the window header to collapse it.
- Observe the image in the plot
Expected behavior
The image is clipped along with the rest of the plot.
Screenshots
Desktop (please complete the following information):
- OS: macOS Sonoma 14.1.2 (23B92), as well as Arch linux both on wayland and X11
- Browser n/a
- Version Both the
master
branch and the0.25.0
release
Smartphone (please complete the following information):
Not tested, but probably appears too.
Additional context
This behaviour also occurs in my more complex app, where egui_dock
is used, and the plot image somehow overdraws under another panel and ends up on the window margin. I believe this is caused by the same problem, but it is harder to create a minimal reproducer.