Rasenmäher Anfang
authormail <mail@joachim-breitner.de>
Fri, 27 Apr 2007 16:22:17 +0000 (16:22 +0000)
committermail <mail@joachim-breitner.de>
Fri, 27 Apr 2007 16:22:17 +0000 (16:22 +0000)
cairoboard.py

index 0d6c4cf..658582d 100644 (file)
@@ -449,5 +449,48 @@ class GrassBoard(CairoBoard):
         #cr.set_line_width(0.05)
         #cr.rectangle(-1, -1, 2, 2)
         #cr.stroke()
         #cr.set_line_width(0.05)
         #cr.rectangle(-1, -1, 2, 2)
         #cr.stroke()
+    
+    
+    def draw_ship(self, ship, cr):
+        
+        # Grundk√∂rper (noch abzurunden)
+        cr.move_to(-0.5, -0.75)
+        cr.line_to(0.5, -0.75)
+        cr.line_to(0.5, 0.5)
+        cr.line_to(-0.5, 0.5)
+        cr.close_path()
+        cr.set_source_rgb(1, 0.2, 0.2)
+        cr.fill_preserve()
+        cr.set_source_rgb(0, 0, 0)
+        cr.set_line_width(0.05)
+        cr.stroke()
+
+        # Griff
+        cr.move_to(-0.25, 0.25)
+        cr.line_to(-0.55,  0.75)
+        cr.line_to( 0.55,  0.75)
+        cr.line_to( 0.25, 0.25)
+        cr.set_line_width(0.1)
+        cr.set_line_join(cairo.LINE_JOIN_ROUND)
+        cr.stroke()
+        
+        # Motor
+        cr.arc(0, -0.1 , 0.3, 0, 2*math.pi)
+        cr.set_source_rgb(0, 0, 0)
+        cr.fill()
+
+        # Augen
+        for _ in range(2):
+            cr.scale(-1,1)
+            cr.arc(0.3, -0.55 , 0.15, 0, 2*math.pi)
+            cr.set_source_rgb(1, 1, 1)
+            cr.fill_preserve()
+            cr.set_source_rgb(0, 0, 0)
+            cr.set_line_width(0.05)
+            cr.stroke()
+            cr.arc(0.25, -0.6 , 0.05, 0, 2*math.pi)
+            cr.set_source_rgb(0, 0, 0)
+            cr.fill()
+
 
 # vim:ts=4:sw=4:sts=4:et
 
 # vim:ts=4:sw=4:sts=4:et