Sunday, July 23, 2006

 

Drawing Graphics with Canvas - MDC

Few things on the page - be it printed or displayed - as as captivating and illuminating as graphics.

Apple and some other companies invented a neat addition to the now rather ancient HTML 4.01 standard last year. The addition is a new element for HTML/XHTML web pages. The element in question is the canvas element.

Apple rolled out their support for canvas in April 2005. It is part of Tiger (Mac OS 10.4). It is an important part; used in both Safari and the handy Dashboard feature that is one of the selling points of OS 10.4.

Firefox introduced their support for the canvas element later the same year, when they rolled out Firefox 1.5.

Now both browsers support it. That makes it worth using. In addition to making it easy for a programmer to create compelling graphics in the first place, it also enables those graphical creations to run on a wide variety of platforms:
  1. Windows 98 - Windows XP, and not doubt Vista when it is introduced next year or whenever
  2. Macintosh OS X


There is a simple introduction to the Canvas element for JavaScript programmers on the page cited below.

Drawing Graphics with Canvas - MDC:
With Firefox 1.5, Firefox includes a new HTML element for programmable graphics. is based on the WHATWG canvas specification, which itself is based on Apple's implemented in Safari. It can be used for rendering graphs, UI elements, and other
custom graphics on the client.


The home page for a longer, more in-depth Canvas tutorial can be found on the same site as well.

I had an idea a week ago for something neat that could be done with Firefox. It is not too hard to hit upon. Just think of one unique feature of the Firefox web browser, combined with the best known application of Canvas elements on the Macintosh platform, and there you have it.

I was struck with another use of Canvas elements - or SVG documents - this morning. This one would be easiest to work in a browser, though unlike the other one, it would not necessarily require it. However, by using the Canvas element, I think it would make it more accessible - more easily used/experienced by more people.

The former idea might actually be pretty useful. The latter idea, the one I cam up with this morning, is mostly whimsical and frivolous but you never know. It might actually have some useful applications as well.

Fortunately, Firefox can serve as the platform to realize both my visions. They are both graphical, mostly.

If I implement both using Firefox, the two could even conceivably be combined. It is a big country in that thar browser, ya know.


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?

Hopefully, someday I will get this page to validate!