W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2007

[whatwg] Why Canvas?

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 31 Jul 2007 17:44:06 -0700
Message-ID: <001d01c7d3d5$112d6170$f502000a@internal.toppro.net>

----- Original Message ----- 
From: "WeBMartians" <webmartians@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
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.
Received on Tuesday, 31 July 2007 17:44:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:57 UTC