I'm trying to disable anti-aliasing when rendering SVGs to canvas, but ctx.imageSmoothingEnabled and ctx.imageSmoothingQuality seem to have no effect. I also tried setting shape-rendering="crispEdges" on the SVG itself, but that doesn't seem to change anything either. Is there a way to achieve this?
I'm trying to disable anti-aliasing when rendering SVGs to canvas, but
ctx.imageSmoothingEnabled
andctx.imageSmoothingQuality
seem to have no effect. I also tried settingshape-rendering="crispEdges"
on the SVG itself, but that doesn't seem to change anything either. Is there a way to achieve this?