kivy-garden / garden.matplotlib

Matplotlib backends using kivy
MIT License
103 stars 50 forks source link

pos bound to the widget, needed for layouts. #11

Closed andnovar closed 9 years ago

dessant commented 9 years ago

@andnovar, wouldn't redrawing on every pos change be wasteful?

matham commented 9 years ago

Yes, we need to rework that so a resize or re-position defers a update until the end of the frame. Because updating at every resize or re-position is too expensive.

dessant commented 9 years ago

@matham, on pos change, an update means repositioning only, not grabbing the texture again from mpl, right?

matham commented 9 years ago

Not for the kivy backend because everything needs to be redrawn since all the meshes etc will need to be moved.

andnovar commented 9 years ago

I think for pos redrawing can be avoided and a transformation can be applied to just translate the texture, but for resizing is harder because matplotlib needs to recalculate positions and redraw elements based on size.

matham commented 9 years ago

Why are there unrelated changes in this pr? There should only be changes relating to pos. Anything else needs to be in its own PR.

andnovar commented 9 years ago

https://github.com/kivy-garden/garden.matplotlib/pull/14