Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2012-07-18 20:50:41 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2012-07-18 20:50:41 (GMT)
commit2377ac805df26dd4219b7f24320a09ae90781d44 (patch)
tree7b8043939e575e7016662b163b5f299dfa35eb0a
parent7cc97f241446f467b9b87eac23efe0deb2edfa58 (diff)
Show start and end staff line
-rw-r--r--staff.py2
-rw-r--r--track.py8
2 files changed, 10 insertions, 0 deletions
diff --git a/staff.py b/staff.py
index 7986921..3a5bb3b 100644
--- a/staff.py
+++ b/staff.py
@@ -24,6 +24,7 @@ class Staff:
lmarg = 0
rmarg = 0
spacing = 0
+ ymax = 0
def __init__(self):
pass
@@ -36,4 +37,5 @@ class Staff:
context.move_to(self.lmarg, line_y)
context.line_to(width - self.rmarg, line_y)
line_y += self.spacing
+ self.ymax = line_y - self.spacing
context.stroke()
diff --git a/track.py b/track.py
index 837e929..c84d221 100644
--- a/track.py
+++ b/track.py
@@ -35,6 +35,14 @@ class Track:
self.staff.y = self.linespacing * 3
self.staff.draw(context, width)
+ #start and end line
+ context.move_to(self.staff.lmarg, self.staff.y)
+ context.line_to(self.staff.lmarg, self.staff.ymax)
+ context.stroke()
+ context.move_to(width - self.staff.rmarg, self.staff.y)
+ context.line_to(width - self.staff.rmarg, self.staff.ymax)
+ context.stroke()
+
def set_y(self, y):
self._y = y