diff options
author | Daniel Francis <francis@sugarlabs.org> | 2012-07-18 20:50:41 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2012-07-18 20:50:41 (GMT) |
commit | 2377ac805df26dd4219b7f24320a09ae90781d44 (patch) | |
tree | 7b8043939e575e7016662b163b5f299dfa35eb0a | |
parent | 7cc97f241446f467b9b87eac23efe0deb2edfa58 (diff) |
Show start and end staff line
-rw-r--r-- | staff.py | 2 | ||||
-rw-r--r-- | track.py | 8 |
2 files changed, 10 insertions, 0 deletions
@@ -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() @@ -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 |