必要な箇所の抜粋です。 The HTML tag is used to draw graphics, on the fly, via scripting (usually JavaScript). JavaScript 语法 1. The getContext() method returns an object that provides methods and properties for drawing on the canvas. 在画布上定位图像: context.drawImage(img,x,y); JavaScript 语法 2. ctx.drawImage(image, dx, dy) image Image, Canvas, Videoのいずれかの要素(オブジェクト) dx, dy 画像を貼り付けるcanvasの位置を指定。canvasの左上を0とした座標です。dxがX, dyがY。 サンプルコード. To learn more about , please read our HTML Canvas tutorial. Colors, Styles, and Shadows. drawImage(image, dx, dy)メソッドは、canvas上にイメージを描画する際に使用します。 引数imageは、描画するイメージを表します。 Note: The element has no drawing abilities of its own (it is only a container for graphics) - you must use a script to actually draw the graphics. 在画布上定位图像,并规定图像的宽度和高度: context.drawImage(img,x,y,width,height); JavaScript 语法 3.