Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-08-10 14:03:01 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-10 14:03:01 (GMT)
commit804c5cdb26f2626d92f08acf8b0f76ae618ecc50 (patch)
tree77bdfb4984e692764ab9d1a158e9400103736067 /Area.py
parentaa8fe970f0a387ea53f63064ac9a89d1e8bdfe05 (diff)
Enlarge the damaged area - SL #3794
When drawing stars (and arrows) and the line size is big, the damaged area calculated was not enough and the shape was croped. This patch add line_size * 2 to the calculated area based in the points. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Area.py b/Area.py
index cd4e35a..fbf2327 100644
--- a/Area.py
+++ b/Area.py
@@ -460,10 +460,10 @@ class Area(Gtk.DrawingArea):
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
+ min_x = min_x - size * 2
+ min_y = min_y - size * 2
+ max_x = max_x + size * 2
+ max_y = max_y + size * 2
return (min_x, min_y, max_x - min_x, max_y - min_y)
def mousemove(self, widget, event):