egui icon indicating copy to clipboard operation
egui copied to clipboard

Rotate and Flip PlotImage.

Open kkngsm opened this issue 2 years ago • 0 comments

Hi, I would like the ability to rotate and flip PlotImage.

Usually using Vec<_>.push(), if I want to append to the image data, it will be append to bottom. However, in some cases (such as drawing a spectrogram) I may want to append to the left or right. Therefore, we need the ability to rotate or flip the image to make it appear as if it is being added to the left or right.

The function is like widget::Image

PlotImage::new(/*inline*/)
    .rotate(angle, origin)
    .flip([true, false])

With the current functionality, the only way to do this is to Vec<Vec<u8>>, but this is inefficient.

kkngsm avatar May 19 '22 05:05 kkngsm