vexflow icon indicating copy to clipboard operation
vexflow copied to clipboard

SVG render context does not honor stroke style

Open jaredjj3 opened this issue 1 year ago • 1 comments

I'm using RenderContext as a convenient way to render shapes on top of a vexflow music sheet. I'm drawing rectangles like this:

ctx.save();
ctx.setStrokeStyle(strokeStyle);
ctx.rect(x, y, w, h);
ctx.stroke();
ctx.restore();

When I draw with SVGContext, the stroke style is always black. When I draw with CanvasContext, the stroke style is correct. FWIW, SVGContext.arc seems to work correctly (which is evident by the red circles).

SVG

image

Canvas

image

jaredjj3 avatar Jun 17 '24 09:06 jaredjj3