I'd like to draw an svg file on a canvas.The current code is like below:
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
var img = new Image();
img.src = "simple SVG.svg";
context.drawImage(img, 0, 0);
But how to change the color of the svg showed on canvas, WITHOUT using canvg and embedded script(means modify the origin svg file is forbidden)? Is reading the svg file and replacing "fill=" a possible way?