Canvas (HTML element)

From Wikipedia, the free encyclopedia

The canvas element is part of HTML5 and allows for dynamic scriptable rendering of bitmap images.

It was initially introduced by Apple for use inside their own Mac OS X WebKit component, powering applications like Dashboard widgets and the Safari browser. Later, it was adopted by Gecko browsers (notably Mozilla and Firefox) and Opera[1], and standardized by the WHATWG on new proposed specifications for next generation web technologies. Novell manufactures an XForms processor plugin for Internet Explorer, which also provides support for the canvas element.[2] Independent efforts to support the canvas feature on Internet Explorer do not require plugins and are based solely on VML and JavaScript.[3] Google has also begun a project to add canvas abilities to Internet Explorer using the same techniques.[4]

Canvas consists of a drawable region defined in HTML code with height and width attributes. JavaScript code may access the area through a full set of drawing functions similar to other common 2D APIs, thus allowing for dynamically generated graphics. Some anticipated uses of the canvas include building graphs, animations, games, and image composition.

In the upcoming Mozilla Firefox 3 web browser, Mozilla puts making a 3d API for canvas on its desirable list of features. Many canvas developers have been waiting for a 3d API. A few developers have used canvas along with other programs and objects such as Alias Wavefront Object files to create a 3d area using canvas' pre-existing 2d API. Using the 2d API, developers are able to model out different 3d objects and show certain points of view, giving the impression of a 3d interactive view.

Contents

[edit] Reactions

At the time of its introduction the canvas element met with mixed reactions from the web standards community. Some complained about Apple's decision to create a new proprietary element instead of supporting the SVG standard, which still has not achieved broad web acceptance. Some others argued about the logic upon which canvas was conceived: being completely procedural and not having a descriptive counterpart allowed canvas to 'paint', but drawn elements are not identifiable in a DOM-like way. Other people raised concerns, not about the proprietary extension per se, but in regard to the proposed syntax for those elements. For example, they consider the absence of a namespace indication to be undesirable.[5]

[edit] Intellectual property over canvas

On March 14, 2007, WebKit developer Dave Hyatt forwarded an email from Apple's Senior Patent Counsel, Helena Plotka Workman[6], which stated that Apple reserved all intellectual property rights relative to WHATWG’s Web Applications 1.0 Working Draft, dated March 24, 2005, Section 10.1, entitled “Graphics: The bitmap canvas” (sic)[7], but left the door open to licensing the patents should the specification be transferred to a standards body with a formal patent policy. This caused considerable discussion among web developers, and raised questions concerning the WHATWG's lack of a policy on patents in comparison to the W3C's explicit favoring of royalty-free licenses.

[edit] See also

[edit] References

  1. ^ Opera 9.0 changelog
  2. ^ Novell XForms Explorer
  3. ^ Canvas in IE
  4. ^ Google's Canvas in IE project
  5. ^ Ian Hickson remarks regarding canvas and other Apple extensions to HTML
  6. ^ [whatwg] Web Applications 1.0 Draft, David Hyatt, Wed Mar 14 14:31:53 PDT 2007
  7. ^ Web Applications 1.0 Early Working Draft - Dynamic graphics: The bitmap canvas

[edit] External links