1.

Which method is used to obtain the “drawing context” object?(a) getContext()(b) getObject()(c) get()(d) getDrawing()I got this question during an interview.The query is from Graphics in division Graphics and Rendering of JavaScript

Answer»

Correct choice is (a) GETCONTEXT()

The best I can EXPLAIN: The HTMLCanvasElement.getContext() method RETURNS a drawing context on the canvas, or null if the context identifier is not supported. Most of the Canvas drawing API is defined not on the canvas ELEMENT itself, but instead on a “drawing context” object obtained with the getContext() method of the canvas.



Discussion

No Comment Found

Related InterviewSolutions