Zufaellige Bluetenfarbe (muss noch justiert werden)
authorJoachim Breitner <mail@joachim-breitner.de>
Mon, 30 Apr 2007 19:22:58 +0000 (19:22 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Mon, 30 Apr 2007 19:22:58 +0000 (19:22 +0000)
cairoboard.py

index 6850d15..b2ad34e 100644 (file)
@@ -495,8 +495,12 @@ class GrassBoard(CairoBoard):
         cr.rotate(random.uniform(0,2*math.pi))
         matrix=cr.get_matrix()
         cr.scale(0.25, 0.25)
+        color = ( 
+                    random.random(),
+                    random.random(),
+                    random.random() )
         for n in range(5):
-            cr.set_source_rgb(1, 0, 0)
+            cr.set_source_rgb(*color)
             cr.move_to(0,0)
             cr.curve_to(0,-0.8,-0.2,-1,-1,-1)
             cr.curve_to(-1,-0.2,-0.8,0.2,0,0)