Getting a context

The canvas API is accessed via a canvas context object. You get the context by calling the getContext() method of the <canvas> element, passing in a string parameter that defines the type of the context you want:

var context = $("canvas")[0].getContext("2d");

The only valid context type parameter you can pass into getContext() at this time is "2d". This begs the question, "Is there a 3D context?" The answer is no, there is not. But we can always hope for one in the future.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.131.238