gcompris r3466 - branches/gcomprixogoo/src/anim-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3466 - branches/gcomprixogoo/src/anim-activity
- Date: Sat, 5 Jul 2008 11:57:31 +0000 (UTC)
Author: bcoudoin
Date: Sat Jul 5 11:57:30 2008
New Revision: 3466
URL: http://svn.gnome.org/viewvc/gcompris?rev=3466&view=rev
Log:
fixed filling a non filled rectangle
Modified:
branches/gcomprixogoo/src/anim-activity/AnimItem.py
branches/gcomprixogoo/src/anim-activity/anim.py
Modified: branches/gcomprixogoo/src/anim-activity/AnimItem.py
==============================================================================
--- branches/gcomprixogoo/src/anim-activity/AnimItem.py (original)
+++ branches/gcomprixogoo/src/anim-activity/AnimItem.py Sat Jul 5 11:57:30 2008
@@ -196,11 +196,6 @@
self.anchor.update()
- def fill(self, fill, stroke):
- gcompris.sound.play_ogg("sounds/paint1.wav")
- self.item.set_properties(fill_color_rgba = fill,
- stroke_color_rgba = stroke)
-
def delete(self):
gcompris.sound.play_ogg("sounds/eraser1.wav",
"sounds/eraser2.wav")
@@ -545,6 +540,7 @@
y = 0
width = 0
height = 0
+ filled = False
def __init__(self, anim, x, y, color_fill, color_stroke, line_width):
AnimItem.__init__(self, anim)
@@ -563,6 +559,7 @@
line_width = line_width)
if color_fill:
+ self.filled = True
self.item.set_properties(fill_color_rgba = color_fill)
self.item.set_data("AnimItem", self)
@@ -615,3 +612,11 @@
'fill_color_rgba',
'stroke_color_rgba')
+ def fill(self, fill, stroke):
+ gcompris.sound.play_ogg("sounds/paint1.wav")
+ if self.filled:
+ self.item.set_properties(fill_color_rgba = fill,
+ stroke_color_rgba = stroke)
+ else:
+ self.item.set_properties(stroke_color_rgba = stroke)
+
Modified: branches/gcomprixogoo/src/anim-activity/anim.py
==============================================================================
--- branches/gcomprixogoo/src/anim-activity/anim.py (original)
+++ branches/gcomprixogoo/src/anim-activity/anim.py Sat Jul 5 11:57:30 2008
@@ -702,7 +702,7 @@
elif self.tools[self.current_tool][0] == "RECT":
self.created_object = AnimItemRect(self,
event.x, event.y,
- None, self.color.stroke, 5)
+ None, self.color.stroke, 7)
self.created_object.create_item_event(item,
target,
event)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]