O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Drawing geometric figures

The WebKit engine provides an interesting element which allows drawing. Its name is canvas and it was originally designed for Apple to build Mac OS X dashboard applications. Sometime ago, the Cupertino company decided to extend its support to Safari and Safari Mobile web browsers. Regardless, canvas is fully supported under the recent HTML5 standard. This means that other web browsers such as Firefox or Opera can render a canvas component.

Basically, canvas defines an area inside the screen where we can draw geometric figures or simply display images. One of the most important benefits of the canvas element is that we don't require additional libraries or frameworks; all we need is a modern web browser Traditionally, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required