Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/instruments/instrument.py
diff options
context:
space:
mode:
Diffstat (limited to 'instruments/instrument.py')
-rw-r--r--instruments/instrument.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/instruments/instrument.py b/instruments/instrument.py
index d6871b4..3d3f3fc 100644
--- a/instruments/instrument.py
+++ b/instruments/instrument.py
@@ -39,7 +39,8 @@ class Instrument:
self.svg = rsvg.Handle(file=os.path.join(
os.environ['SUGAR_BUNDLE_PATH'], 'symbols/accolade.svg'))
- def draw(self, context, width, lmarg, rmarg, linespacing, bracket_cr):
+ def draw(self, window, width, lmarg, rmarg, linespacing):
+ accolade_cr = window.cairo_create()
xx = lmarg * 0.20 / self.svg.props.width
x0 = lmarg
@@ -50,15 +51,15 @@ class Instrument:
staff.rmarg = rmarg
staff.spacing = linespacing
staff.y = self.ymax
- staff.draw(context, width)
+ staff.draw(window, width)
self.ymax = staff.ymax
yy = (self.ymax - self.ymin - linespacing * 4) / self.svg.props.height
matrix = cairo.Matrix(xx=xx,
yy=yy,
x0=x0,
y0=y0)
- bracket_cr.transform(matrix)
- self.svg.render_cairo(bracket_cr)
+ accolade_cr.transform(matrix)
+ self.svg.render_cairo(accolade_cr)
def guess_height(self, linespace):
return len(self.staves) * linespace * 9