diff options
Diffstat (limited to 'Area.py')
-rw-r--r-- | Area.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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'], |