Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodDescription
fillText()Draws "filled" text on the canvas
strokeText()Draws text on the canvas (no fill)
measureText()Returns an object that contains the width of the specified text


Image Drawing

MethodDescription
drawImage()Draws an image, canvas, or video onto the canvas


Pixel Manipulation

PropertyDescription
widthReturns the width of an ImageData object
heightReturns the height of an ImageData object
dataReturns an object that contains image data of a specified ImageData object


MethodDescription
createImageData()Creates a new, blank ImageData object
getImageData()Returns an ImageData object that copies the pixel data for the specified rectangle on a canvas
putImageData()Puts the image data (from a specified ImageData object) back onto the canvas


Compositing

PropertyDescription
globalAlphaSets or returns the current alpha or transparency value of the drawing
globalCompositeOperationSets or returns how a new image are drawn onto an existing image


Other

MethodDescription
save()Saves the state of the current context
restore()Returns previously saved path state and attributes
createEvent()
getContext()
toDataURL()