File size: 574 Bytes
af6912c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function drawSeparator(renderer, width) {
	var fill = "rgba(0,0,0,255)";
	var stroke = "rgba(0,0,0,0)";
	var y = Math.round(renderer.y);
	var staffWidth = renderer.controller.width;
	var x1 = (staffWidth - width) / 2;
	var x2 = x1 + width;
	var pathString = 'M ' + x1 + ' ' + y +
		' L ' + x2 + ' ' + y +
		' L ' + x2 + ' ' + (y + 1) +
		' L ' + x1 + ' ' + (y + 1) +
		' L ' + x1 + ' ' + y + ' z';
	renderer.paper.pathToBack({ path: pathString, stroke: stroke, fill: fill, 'class': renderer.controller.classes.generate('defined-text') });
}

module.exports = drawSeparator;