On, Wed Jun 28, 2006, Bertrand CACHET wrote:
> Hi all,
> There is something I don't understand in the update process.
> When a widget need to be modified (its rendering), it is marked as dirty.
> This way, its parent is also marked as dirty. That mean that the container
> will redraw everything: its background and all its children.
> Instead of this process, when a widget is marked as dirty, its parent don=
> need to be marked as dirty and we can override the update method into the
> Container module and do the things like that:
> This way, only modified widget included into the container are modified,
> which is faster.
> What do you thing of this solution, and what do I have missed ?
You are absolutely right. Although your update code would not work as it
is, the idea is correct. 0.2.0 uses such an approach (yet being more
complex) to speed up drawing and blitting, so that you are just a little
bit late with it ;-).
This however won't be backported to 0.1.x as it would involve too many
changes in the existing code.