カテゴリー:
scale()メソッド
閲覧数:358 配信日:2016-09-16 13:41
var cs=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.strokeRect(5,5,25,15);
ctx.scale(2,2);
ctx.strokeRect(5,5,25,15);
CanvasRenderingContext2D.scale()
scale() メソッド
HTML5 canvas scale Method
仕様
The scale(x, y) method must add the scaling transformation described by the arguments to the transformation matrix. The x argument represents the scale factor in the horizontal direction and the y argument represents the scale factor in the vertical direction. The factors are multiples.
・HTML Canvas 2D Context