CanvasRenderingContext2D.drawImage( ): draw an image
y) void drawImage(Image
height) void drawImage(Image
The image to be drawn. This must be an Image object representing an
<img>tag, or an offscreen image or a Canvas object.
The point at which the upper-left corner of the image is drawn.
The size at which the image should be drawn. Specifying these arguments causes the image to be scaled.
The upper-left corner of the region of the image that is to be drawn. These integer arguments are measured in image pixels.
The dimensions, in image pixels, of the region of the image that is to be drawn.
The canvas coordinates at which the upper-left corner of the image region is to be drawn
The canvas dimensions at which the image region should be drawn.
There are three variants of this method. The first copies the entire image to the canvas, placing its upper-left corner at the specified point and mapping each image pixel to one unit in the canvas coordinate system. The second variant also copies the entire image to the canvas but allows you to specify the desired width and height of the image in canvas units. The third variant is ...