Canvas

<canvas> is an HTML element which can be used to draw graphics via scripting (usually JavaScript). For example, it can be used to draw graphs, make photo compositions, create animations or even do real-time video processing.

Mozilla applications gained support for <canvas> starting with Gecko 1.8 (i.e. Firefox 1.5). The element was originally introduced by Apple for the OS X Dashboard and Safari. Internet Explorer supports <canvas> from version 9 onwards; for earlier versions of IE, a page can effectively add support for <canvas>  by including a script from Google's Explorer Canvas project. Google Chrome and Opera 9 also support <canvas>.

The <canvas> element is also used by WebGL to do hardware-accelerated 3D graphics on web pages.

Documentation

Specification
The <canvas> element is part of the WhatWG Web applications 1.0 specification, also known as HTML 5.
Drawing Graphics with Canvas
A one-page introduction to <canvas>.
Canvas tutorial
A comprehensive tutorial covering both the basic usage of <canvas> and its advanced features.
Code snippets:Canvas
Some extension developer-oriented code snippets involving <canvas>.
Canvas examples
A few <canvas> demos.
Drawing text using a canvas
Documentation for the textual <canvas> feature available from Gecko 1.9.
Drawing DOM objects into a canvas
How to draw DOM content, such as HTML elements, into a canvas.
A basic raycaster
A demo of ray-tracing animation using canvas.
Canvas cheat sheet

View All...

Libraries

  • libCanvas is powerful and lightweight canvas framework
  • Processing.js is a port of the Processing visualization language
  • EaselJS is a library with a Flash-like API
  • PlotKit is a charting and graphing library
  • Rekapi is an animation keyframing API for Canvas
  • PhiloGL is a WebGL framework for data visualization, creative coding and game development.
  • JavaScript InfoVis Toolkit creates interactive 2D Canvas data visualizations for the Web.

Related Topics

HTML, JavaScript, CSS, AJAX, DOM, SVG, WebGL
Canvas DOM interfaces  

 

 

HTML5 Documentation
HTMLAudio/Video Canvas WebGL SVG MathML WebForms AppCache Microformats SemanticTags
JavascriptStorage IndexedDB WebSockets WebWorkers Events Drag/Drop ProtocolHandler Geolocation Focus
CSSNewSelectors Typography Visual Effects

Tags (3)

Edit tags

Attachments (0)

 

Attach file