From c5e8a30e647abd52fa2f61923883a129ca274cf1 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Tue, 12 Feb 2013 20:40:33 +0000 Subject: use corn instead of circle --- diff --git a/yupana.py b/yupana.py index 47e6cd3..88920e8 100644 --- a/yupana.py +++ b/yupana.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -#Copyright (c) 2011 Walter Bender +#Copyright (c) 2011-13 Walter Bender #Copyright (c) 2012 Ignacio Rodriguez # This program is free software; you can redistribute it and/or modify @@ -68,6 +68,10 @@ class Yupana(): Sprite(self._sprites, 0, 0, self._box(self._width, self._height, color=colors[1])) + self._number_box = Sprite(self._sprites, 0, 0, self._box( + self._width, 2 * self._dot_size, color=colors[1])) + self._number_box.set_label_attributes(48) + self._dots = [] for p in range(SIX): y = self._height - self._space @@ -80,7 +84,7 @@ class Yupana(): Sprite(self._sprites, x, y, self._new_dot(self._colors[0]))) self._dots[-1].type = 0 # not set - self._dots[-1].set_label_color('white') + # self._dots[-1].set_label_color('white') x += self._dot_size + self._space x = int((p * self._width / 6.) + self._dot_size / 2.) + self._space y -= self._dot_size + self._space @@ -89,7 +93,7 @@ class Yupana(): Sprite(self._sprites, x, y, self._new_dot(self._colors[0]))) self._dots[-1].type = 0 # not set - self._dots[-1].set_label_color('white') + # self._dots[-1].set_label_color('white') x += self._dot_size + self._space y -= self._dot_size @@ -102,7 +106,7 @@ class Yupana(): Sprite(self._sprites, x, y, self._new_dot(self._colors[0]))) self._dots[-1].type = 0 # not set - self._dots[-1].set_label_color('white') + # self._dots[-1].set_label_color('white') x += self._dot_size + self._space x = int((p * self._width / 6.) + self._dot_size) + self._space y -= self._dot_size + self._space @@ -111,7 +115,7 @@ class Yupana(): Sprite(self._sprites, x, y, self._new_dot(self._colors[0]))) self._dots[-1].type = 0 # not set - self._dots[-1].set_label_color('white') + # self._dots[-1].set_label_color('white') x += self._dot_size + self._space y -= self._dot_size @@ -124,7 +128,7 @@ class Yupana(): Sprite(self._sprites, x, y, self._new_dot(self._colors[0]))) self._dots[-1].type = 0 # not set - self._dots[-1].set_label_color('white') + # self._dots[-1].set_label_color('white') x += self._dot_size + self._space y -= self._dot_size @@ -137,7 +141,7 @@ class Yupana(): Sprite(self._sprites, x, y, self._new_dot(self._colors[0]))) self._dots[-1].type = 0 # not set - self._dots[-1].set_label_color('white') + # self._dots[-1].set_label_color('white') x += self._dot_size + self._space y -= self._dot_size @@ -148,10 +152,6 @@ class Yupana(): Sprite(self._sprites, x - 1, y, self._line(vertical=True)) - self._number_box = Sprite(self._sprites, 0, 0, self._box( - self._width, 3 * self._dot_size, color=colors[1])) - self._number_box.set_label_attributes(72) - # and initialize a few variables we'll need. self._all_clear() @@ -438,14 +438,51 @@ class Yupana(): return svg_string def _circle(self, r, cx, cy): - return '\n' + scale = (DOT_SIZE * self._scale) / 55. + return '\ + \ + \ +' % ( + scale, scale, self._colors[1]) def _gradient(self, r, cx, cy): - return '\n' + scale = (DOT_SIZE * self._scale) / 55. + return '\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + ' % ( + scale, scale) def _def(self, r): return ' \ -- cgit v0.9.1