+* **Moving shapes over images** — Moving or resizing a shape, a marker, a cursor or an annotation over an image, or drawing a new shape, rendered the image again for each mouse move, although it did not change. The previous rendering of the image is now drawn again instead, unless the image itself, the plot axes or the plot size change: with a 2048 × 2048 image, each mouse move takes about 4 ms instead of 7 to 68 ms depending on the interpolation, and about 10 ms instead of 17 to 175 ms with a 200 % display scaling (see the `plotpy/tests/benchmarks/test_image_interaction.py` benchmark). The new `BasePlot.replot_overlays` method redraws a plot in this way, when only items drawn over images have changed: image items whose `draw_image` method is decorated with `plotpy.items.image.base.reusable_rendering` draw their previous rendering again. As before, any other change of an image item (data, mask, contrast, colormap, ...) must be followed by `BasePlot.replot` or `BasePlot.invalidate`
0 commit comments