HTML5 캔버스 getContext()


개요

HTML5 캔버스 getContext()
var canvas = document.getElementById("MyCanvas");
var ctx = canvas.getContext("webgl", { antialias: false, depth: false });
var canvas = document.getElementById("MyCanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "blue";
ctx.fillRect(0, 0, canvas.width, canvas.height);

같이 보기

참고