[Sugar-devel] Gtk.DrawingArea's draw signal

Manuel Kaufmann humitos at gmail.com
Thu Jun 28 07:22:29 EDT 2012


On Thu, Jun 28, 2012 at 5:23 AM, Benjamin Berg <benzea at sugarlabs.org> wrote:
> It looks to me like the change could be that you are now connecting to
> the "draw" signal, instead of overriding "do_draw(self, cr)". Though I
> can't think of a reason for do_draw() not to work currently.

I feel more comfortable by connecting to the signal. I'm not sure why
it was overrided before; it's the first time that I've seen this and
I'm trying to understand why "override"

> ie.:
>  clipped, rect = Gdk.cairo_get_clip_rectangle(cr)
>
> clipped will always be True in GTK+. rect then contains the affected
> area, similar to event.area before.

So, I should ask for the affected rect and use it to re-draw just the
affected part as it was by now using this chunk of code that you
mentioned here. Am I right?

FYI I wrote a wiki page explaining what I did:

 * http://wiki.sugarlabs.org/go/User:Humitos/PortingImplode

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/


More information about the Sugar-devel mailing list