projects
/
experiments
/
RadialSymmetry.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3286ef9
)
Diagram.py: simplify draw_star()
author
Antonio Ospite <ao2@ao2.it>
Thu, 18 Jun 2015 09:35:40 +0000
(11:35 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Thu, 18 Jun 2015 09:35:40 +0000
(11:35 +0200)
Diagram.py
patch
|
blob
|
history
diff --git
a/Diagram.py
b/Diagram.py
index
7d6348b
..
3a03949
100755
(executable)
--- a/
Diagram.py
+++ b/
Diagram.py
@@
-125,11
+125,9
@@
class Diagram(object):
def draw_star(self, cx, cy, verts, stroke_color=[0, 0, 0]):
cr = self.cr
- v = verts[0]
- cr.move_to(cx, cy)
for v in verts:
- cr.line_to(v[0], v[1])
cr.move_to(cx, cy)
+ cr.line_to(v[0], v[1])
r, g, b, a = self.color_to_rgba(stroke_color)
cr.set_source_rgba(r, g, b, a)