Home » HTML » HTML Graphics » Question
  1. To draw on the canvas, authors must first obtain a reference to a context using the ______________ method of the canvas interface element.
    1. getContext
    2. getImageData
    3. restore
    4. toDataURL
    5. None of these
Correct Option: A

The method getImageData(), returns an imageData that copies pixel data for a specified thing in canvas. ContextType is a DOMString containing the context identifier defining the drawing context associated to the canvas.



Your comments will be displayed only after manual approval.