[whatwg] Why Canvas?
WeBMartians
webmartians at verizon.net
Wed Aug 1 04:25:41 PDT 2007
Sorry, Andrew. I missed seeing your email and did not include it in my latest - I haven't had my orange juice yet, and while I may be standing with my eyes open, my brain hasn't yet caught up.
I completely missed the CSS aspect and the foreground/background image slant as well. Good call.
The introduction of foreground images as well as background images makes things a lot more complicated:
- Which one is selected by
var cvs = document.getElementById(<elementIdentity>);?
- If you have one foreground image, why not have many in layers?
- If you have layers, what about transparency (or alpha) and what about Z-order changes?
Wow! World of Warcraft superimposed over the nightly news video!
...given 3D ... Halo superimposed over WWft over nightly news...
Shudder... I think this will require more than orange juice. It may be best to let this monster snooze until HTML 6.
-----Original Message-----
From: Andrew Fedoniouk [mailto:news at terrainformatica.com]
Sent: Tuesday, 2007 July 31 20:44
To: WeBMartians; whatwg at whatwg.org
Subject: Re: [whatwg] Why Canvas?
----- Original Message -----
From: "WeBMartians" <webmartians at verizon.net>
To: <whatwg at whatwg.org>
Sent: Tuesday, July 31, 2007 4:34 PM
Subject: [whatwg] Why Canvas?
> With <canvas> a relatively stable (and implemented, actually) tag, this
> may be a doubtful question. However, I can't think of any answer, so here
> goes...
>
> Why <canvas>?
>
> Why not allow the graphics primitives to operate on any element (not just
> <canvas>) that has a height and width that may be expressed in picture
> elements... ...even window.screen with its .availHeight, .availWidth,
> .height, and .width (yeah, I know, the Screen object is actually a
> JavaScript object, not an HTML DOM object)?
>
I think this discussion
http://lists.w3.org/Archives/Public/public-html/2007Apr/0355.html
is related to the subject.
Image (object) has pixel buffer so it is pretty logical to add
Graphics interface to it. The only feature left is
style.setBackgroundImage() method:
var el = document.getElement....;
el.style.setBackgroundImage( el );
In this case it would be possible to render graphics on any element.
And if we will add 'foreground-image' CSS attribute & friends (similar to
backround-*** attributes) then you would have an option to choose where
to draw it - on background or on foreground layer (on top of the content)
Andrew Fedoniouk.
http://terrainformatica.com
More information about the whatwg
mailing list