コード例

HTML5用語集

カテゴリー: scale()メソッド  閲覧数:499 配信日: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(xy) 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

指定期間人気ページランキング / 2020-5-29 → 2026-8-15
順位 ページタイトル抜粋 アクセス数
1 シェーダー | compileShader()メソッド(WebGLRenderingContext) 1463
2 フォーム | その他 955
3 HTML5用語 426
4 VBO | WebGLRenderingContext 257
5 アフィン変換 | 「transform()メソッド(CanvasRenderingContext2D )」カテゴリー | HTML5用語 184
6 new Image() | new Image()オブジェクト生成(HTMLImageElementインターフェイス) 183
7 localStorage | localStorageプロパティ(HTMLStorageオブジェクト) 137
8 drawImage() メソッド | drawImage()メソッド(CanvasRenderingContext2D ) 128
9 createLinearGradient() メソッド | createLinearGradient()メソッド(CanvasRenderingContext2D ) 118
10 localStorageプロパティ(HTMLStorageオブジェクト) カテゴリー 107
10 localStorageプロパティ(HTMLStorageオブジェクト) カテゴリー 107
11 now()メソッド(Performanceインターフェイス) カテゴリー 100
11 getContext()メソッド(HTMLCanvasElement) カテゴリー 100
12 new Image()オブジェクト生成(HTMLImageElementインターフェイス) カテゴリー 97
13 globalAlphaプロパティ(CanvasRenderingContext2D ) カテゴリー 95
14 ログイン 94
15 drawImage()メソッド(CanvasRenderingContext2D ) カテゴリー 93
15 saveメソッドとrestoreメソッドを使用して、オリジナルのスケールへ戻す 93
15 「線形グラデーションで塗りつぶした四角形」を描画するためには? 93
16 setItem()メソッド(HTMLStorageオブジェクト) カテゴリー 91
2026/8/16 5:05 更新