xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Canvas & SVG

Canvas & SVG

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg193983(v=vs.85)

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);

posted @ 2019-04-08 09:00  xgqfrms  阅读(165)  评论(4编辑  收藏  举报