1.

To draw on the canvas, authors must first obtain a reference to a context using the ______________ method of the canvas interface element.(a) getImageData(b) toDataURL(c) getContext(d) restoreI got this question in an online interview.This interesting question is from Client-Side Graphics with Canvas in chapter HTML Markup, Forms, Video, Audio & Other Multimedia of HTML

Answer»

The correct choice is (C) getContext

To EXPLAIN I would SAY: The method getImageData(), returns an imageData that copiespixel data for a specified thing in canvas. ContextType is a DOMString containing the CONTEXT identifier defining the DRAWING context associated to the canvas.



Discussion

No Comment Found

Related InterviewSolutions