Skip to content

SVG render context does not honor stroke style #1621

@jaredjj3

Description

@jaredjj3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions