コード例

HTML5用語集

カテゴリー: 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(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 → 2025-2-4
順位 ページタイトル抜粋 アクセス数
1 シェーダー | compileShader()メソッド(WebGLRenderingContext) 1447
2 フォーム | その他 937
3 VBO | WebGLRenderingContext 232
4 HTML5用語 222
5 new Image() | new Image()オブジェクト生成(HTMLImageElementインターフェイス) 166
6 アフィン変換 | transform()メソッド(CanvasRenderingContext2D ) 158
7 localStorage | localStorageプロパティ(HTMLStorageオブジェクト) 126
8 createLinearGradient() メソッド | createLinearGradient()メソッド(CanvasRenderingContext2D ) 115
9 drawImage() メソッド | drawImage()メソッド(CanvasRenderingContext2D ) 100
10 localStorageプロパティ(HTMLStorageオブジェクト) カテゴリー 98
11 localStorageプロパティ(HTMLStorageオブジェクト) カテゴリー 97
12 now()メソッド(Performanceインターフェイス) カテゴリー 89
13 getContext()メソッド(HTMLCanvasElement) カテゴリー 88
14 saveメソッドとrestoreメソッドを使用して、オリジナルのスケールへ戻す 85
15 globalAlphaプロパティ(CanvasRenderingContext2D ) カテゴリー 84
16 drawImage()メソッド(CanvasRenderingContext2D ) カテゴリー 83
16 setItem()メソッド(HTMLStorageオブジェクト) カテゴリー 83
16 「線形グラデーションで塗りつぶした四角形」を描画するためには? 83
17 drawImage()メソッド(CanvasRenderingContext2D ) カテゴリー 82
17 new Image()オブジェクト生成(HTMLImageElementインターフェイス) カテゴリー 82
2025/2/5 1:02 更新