Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-08-01 14:57:37 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-01 14:57:37 (GMT)
commitba9c2a64219531926285a78e017b93312f401c33 (patch)
tree6495b8dbf085d687aed7386efd763a19b105eddc
parentd3f3b126efc8faee4780f5774875e49c9073269a (diff)
Fix artifact when using stamp toolend-gtk2
The damaged area was calculated baased in the brush size instead of using the stamp size Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--Area.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/Area.py b/Area.py
index fa99b5f..18bbc38 100644
--- a/Area.py
+++ b/Area.py
@@ -445,11 +445,18 @@ class Area(gtk.DrawingArea):
if point[1] > max_y:
max_y = point[1]
# add the tool size
- size = self.tool['line size']
- min_x = min_x - size
- min_y = min_y - size
- max_x = max_x + size
- max_y = max_y + size
+ if self.tool['name'] == 'stamp':
+ wr, hr = self.stamp_dimentions
+ min_x = min_x - wr
+ min_y = min_y - wr
+ max_x = max_x + hr
+ max_y = max_y + hr
+ else:
+ size = self.tool['line size']
+ min_x = min_x - size
+ min_y = min_y - size
+ max_x = max_x + size
+ max_y = max_y + size
return (min_x, min_y, max_x - min_x, max_y - min_y)
def mousemove(self, widget, event):