Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/staff.py
diff options
context:
space:
mode:
Diffstat (limited to 'staff.py')
-rw-r--r--staff.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/staff.py b/staff.py
index 18f2dbb..710c9a0 100644
--- a/staff.py
+++ b/staff.py
@@ -25,21 +25,22 @@ class Staff:
rmarg = 0
spacing = 0
ymax = 0
+ clef = None
def __init__(self):
pass
- def draw(self, context, width, margin=None):
+ def draw(self, window, width):
+ context = window.cairo_create()
context.set_source_rgb(0, 0, 0)
context.set_line_width(2)
line_y = self.y + self.spacing * 2
for i in range(5):
- if margin != None:
- x = margin
- else:
- x = self.lmarg
+ x = self.lmarg
context.move_to(x, line_y)
context.line_to(width - self.rmarg, line_y)
line_y += self.spacing
self.ymax = line_y + self.spacing * 2
context.stroke()
+ self.clef.draw(window.cairo_create(), self.lmarg * 1.1, self.y,
+ self.lmarg * 0.3, self.ymax - self.y - self.spacing)