Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/objectarea.py
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-04-05 20:06:35 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-04-05 20:06:35 (GMT)
commitc8069104b0fae88336068b041cdf2920a33108a8 (patch)
tree4492d77bfd8f27099a900627bc446c3b8ab28c57 /objectarea.py
parenta7bdd950b0d422b9d7e176aa10740884fa71fbff (diff)
Restrict objects to drawing in their 'published' area.
Now, object drawing is clipped to the region returned by get_bounds. This causes some objects to only partially draw, but eliminates trailing leftover pixels.
Diffstat (limited to 'objectarea.py')
-rw-r--r--objectarea.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/objectarea.py b/objectarea.py
index 872328f..4c77aa5 100644
--- a/objectarea.py
+++ b/objectarea.py
@@ -367,6 +367,8 @@ class ObjectArea(gtk.Layout):
rect = gtk.gdk.Rectangle(int(bounds[0].x), int(bounds[0].y), int(bounds[1].x), int(bounds[1].y))
if event.area.intersect(rect):
cr.save()
+ cr.rectangle(rect.x, rect.y, rect.width, rect.height)
+ cr.clip()
#print "drawing index = ", self.objects.index(o)
o.draw(cr)
cr.restore()