egui icon indicating copy to clipboard operation
egui copied to clipboard

egui_plot: Images inside of plots are not clipped during folding animations

Open alufers opened this issue 5 months ago • 1 comments

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:

  1. Launch the project from the reproducer repo: https://github.com/alufers/egui-plot-error-reproducer/blob/master/src/main.rs
  2. Click the arrow near the window header to collapse it.
  3. Observe the image in the plot

Expected behavior

The image is clipped along with the rest of the plot.

Screenshots

image

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 the 0.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.

image

alufers avatar Jan 22 '24 15:01 alufers