Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSayamindu 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)
commit19313598f6122f7f990ec5e3ac2c87f72fd7a7e1 (patch)
treec3aeb9a0424148a3655e7dfe25abd26383dd137b
parentf10ca874cacc5a51ef52a914f05b3f361518742a (diff)
#8285: Try to use queue_draw_area() instead of queue_draw()
-rw-r--r--Desenho.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Desenho.py b/Desenho.py
index 91d19f2..e5ecf48 100644
--- a/Desenho.py
+++ b/Desenho.py
@@ -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.