Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorManuel QuiƱones <manuel.por.aca@gmail.com>2011-04-18 14:18:04 (GMT)
committer Manuel QuiƱones <manuel.por.aca@gmail.com>2011-04-18 14:18:04 (GMT)
commit22919d56574b22a71bf02e96f35068829c5964e0 (patch)
tree0b04bb5386de35027c2a6df4a873bd1e7853831c /Area.py
parent4961e69146dfef880167905c928ec661ae0a4aea (diff)
Stamp tracing code, still not stamping
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/Area.py b/Area.py
index 2e979a8..18984eb 100644
--- a/Area.py
+++ b/Area.py
@@ -286,9 +286,14 @@ class Area(gtk.DrawingArea):
Show the shape of the tool selected for pencil, brush,
rainbow and eraser
"""
- if self.tool['name'] in ['pencil', 'eraser', 'brush', 'rainbow']:
+ if self.tool['name'] in ['pencil', 'eraser', 'brush', 'rainbow', 'stamp']:
if not self.drawing:
size = self.tool['line size']
+
+ # TODO draw stamp border in widget.window
+ # if self.tool['name'] == 'stamp':
+ # pass
+
if self.tool['line shape'] == 'circle':
widget.window.draw_arc(self.gc_brush, False,
self.x_cursor - size / 2, self.y_cursor - size / 2,
@@ -355,6 +360,11 @@ class Area(gtk.DrawingArea):
self.tool['line shape'])
self.last = coords
self.drawing = True
+ elif self.tool['name'] == 'stamp':
+ self.last = []
+ self.d.stamp(widget, coords, self.last, self.tool['line size'])
+ self.last = coords
+ self.drawing = True
elif self.tool['name'] == 'rainbow':
self.last = []
self.d.rainbow(widget, coords, self.last,
@@ -425,6 +435,10 @@ class Area(gtk.DrawingArea):
self.tool['line size'], self.tool['line shape'])
self.last = coords
+ elif self.tool['name'] == 'stamp':
+ self.d.stamp(widget, coords, self.last, self.tool['line size'])
+ self.last = coords
+
elif self.tool['name'] == 'rainbow':
self.d.rainbow(widget, coords, self.last,
self.rainbow_counter, self.tool['line size'],