Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

draw image html canvas

/**
     * @function drawImage
     * @param {HTMLImageElement} image 
     * @param {Vector} point 
     * @param {number} width 
     * @param  {number} height 
     * draw an image on the canvas
     * @memberof Shapes
     */
function drawImage(image: HTMLImageElement, point: Vector, width: number, height: number) {
  this.context.drawImage(image, point.x, point.y, width, height)
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #draw #image #html #canvas
ADD COMMENT
Topic
Name
4+4 =