diff options
author | Sayamindu Dasgupta <sayamindu@gmail.com> | 2008-09-09 15:28:21 (GMT) |
---|---|---|
committer | Morgan Collett <morgan.collett@gmail.com> | 2008-09-09 15:40:47 (GMT) |
commit | 19313598f6122f7f990ec5e3ac2c87f72fd7a7e1 (patch) | |
tree | c3aeb9a0424148a3655e7dfe25abd26383dd137b | |
parent | f10ca874cacc5a51ef52a914f05b3f361518742a (diff) |
#8285: Try to use queue_draw_area() instead of queue_draw()
-rw-r--r-- | Desenho.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -150,7 +150,15 @@ class Desenho: widget.pixmap.draw_polygon(widget.gc_brush,True,points) points = [(last[0]+size,last[1]), (coords[0]+size,coords[1]), (coords[0],coords[1]+size), (last[0],last[1]+size)] widget.pixmap.draw_polygon(widget.gc_brush,True,points) - widget.queue_draw() + + if last: + x = min(coords[0], last[0]) + width = max(coords[0], last[0]) - x + y = min(coords[1], last[1]) + height = max(coords[1], last[1]) - y + widget.queue_draw_area(x, y, width+size, height+size) # We add size to avoid drawing dotted lines + else: + widget.queue_draw() def rainbow(self, widget, coords, last, color, size = 5, shape = 'circle'): """Paint with rainbow. |