- From: Laurens Holst <lholst@students.cs.uu.nl>
- Date: Sun, 08 Apr 2007 15:32:24 +0900
- To: Andrew Fedoniouk <news@terrainformatica.com>
- CC: public-html@w3.org, David Hyatt <hyatt@apple.com>
- Message-ID: <46188C78.9040200@students.cs.uu.nl>
Laurens Holst schreef: > Andrew Fedoniouk schreef: >>> <canvas> is a dynamic image that can be generated on the fly via JS. >>> There is usefulness to this model, since it allows you to build the >>> bitmap once and then treat it like an image from that point on. >> >> If it is just an image then what was/is wrong with existing Image object >> and <img> that are there from the primordial Navigator? >> >> <img id="canvas" src="placeholder.gif" /> >> >> <script> >> var img = $("#canvas"); >> var gfx = img.graphics( 300,300, "white" ); >> gfx.line(...); >> </script> >> >> or so. > > Ah, yes, I think this is a very good idea! ‘1+’, so to say :). > > The reference to ‘placeholder.gif’ even seems excessive; only if you > want to have a fallback image. The default form would be simply > <img/>. It would basically mean slapping on the <canvas> API to <img>. Ah, no, never mind, this wouldn’t work. The problem is the fallback behaviour of <img>. If the source file doesn’t load, or is not present, it falls back to the alternate content, and there is no longer a canvas present to draw on. <canvas> in the contrary always creates the canvas, unless it’s not supported by the browser. ~Grauw -- Ushiko-san! Kimi wa doushite, Ushiko-san nan da!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Laurens Holst, student, university of Utrecht, the Netherlands. Website: www.grauw.nl. Backbase employee; www.backbase.com.
Received on Sunday, 8 April 2007 06:34:15 UTC