diff options
| author | tassaron | 2022-05-07 20:27:26 -0400 |
|---|---|---|
| committer | tassaron | 2022-05-07 20:27:26 -0400 |
| commit | 116baf124a5f8de87f7852263b043b23d6fca1cc (patch) | |
| tree | d6117e17defba343bc41b4065ea607eb8906862c | |
| parent | 88f4e2298c4b465c40d9de12b2df6f25d45fc322 (diff) | |
Fix drawing of "peace" shape. Rename a shape to pie
| -rw-r--r-- | src/components/life.py | 13 | ||||
| -rw-r--r-- | src/components/life.ui | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/components/life.py b/src/components/life.py index ad6d744..d0bb708 100644 --- a/src/components/life.py +++ b/src/components/life.py | |||
| @@ -202,8 +202,8 @@ class Component(Component): | |||
| 202 | elif shape == 'lilypad': | 202 | elif shape == 'lilypad': |
| 203 | drawer.pieslice(smallerShape, 290, 250, fill=self.color) | 203 | drawer.pieslice(smallerShape, 290, 250, fill=self.color) |
| 204 | 204 | ||
| 205 | # Pac-Man | 205 | # Pie |
| 206 | elif shape == 'pac-man': | 206 | elif shape == 'pie': |
| 207 | drawer.pieslice(outlineShape, 35, 320, fill=self.color) | 207 | drawer.pieslice(outlineShape, 35, 320, fill=self.color) |
| 208 | 208 | ||
| 209 | hX, hY = scale(50, self.pxWidth, self.pxHeight, int) # halfline | 209 | hX, hY = scale(50, self.pxWidth, self.pxHeight, int) # halfline |
| @@ -297,12 +297,9 @@ class Component(Component): | |||
| 297 | 297 | ||
| 298 | def slantLine(difference): | 298 | def slantLine(difference): |
| 299 | return ( | 299 | return ( |
| 300 | (drawPtX + difference), | 300 | (drawPtX + difference), (drawPtY + self.pxHeight - qY) |
| 301 | (drawPtY + self.pxHeight - qY) | 301 | ), ( |
| 302 | ), | 302 | (drawPtX + hX), (drawPtY + hY) |
| 303 | ( | ||
| 304 | (drawPtX + hX), | ||
| 305 | (drawPtY + hY) | ||
| 306 | ) | 303 | ) |
| 307 | 304 | ||
| 308 | drawer.line( | 305 | drawer.line( |
diff --git a/src/components/life.ui b/src/components/life.ui index 892a9e3..3d6ad5a 100644 --- a/src/components/life.ui +++ b/src/components/life.ui | |||
| @@ -240,7 +240,7 @@ | |||
| 240 | </item> | 240 | </item> |
| 241 | <item> | 241 | <item> |
| 242 | <property name="text"> | 242 | <property name="text"> |
| 243 | <string>Pac-Man</string> | 243 | <string>Pie</string> |
| 244 | </property> | 244 | </property> |
| 245 | </item> | 245 | </item> |
| 246 | <item> | 246 | <item> |
