Canvas & SVG
Canvas & SVG
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API
Canvas Tutorial
https://www.w3schools.com/graphics/canvas_intro.asp
https://www.w3schools.com/html/html5_canvas.asp
https://www.w3schools.com/html/html5_svg.asp
http://www.inkfood.com/svg-to-canvas/
Drawing an SVG file on a HTML5 canvas
https://stackoverflow.com/questions/3768565/drawing-an-svg-file-on-a-html5-canvas
let img = new Image();
img.onload = function() {
ctx.drawImage(img, 0, 0);
}
img.src = "http://upload.wikimedia.org/wikipedia/commons/d/d2/Svg_example_square.svg";
let path = new Path2D('M 100,100 h 50 v 50 h 50');
ctx.stroke(path);
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10668511.html
未经授权禁止转载,违者必究!