|
Hi, Peter,
This is also what I don't
like in <canvas> solution. It forces to use some screen buffer for
drawing.
Strictly speaking this is
not the best way to draw in significant number of situations. Your bullet
case is a good example.
I think it is better to
have Element.onPaint( Canvas gx, int width, int height )
event and
method getContext()
available for Image only.
This way is possible to
implement ligthweight simple rendering like bullets and buffered
rendering
using Image if
needed. This is at least more flexible.
Another idea
for drawing bullets - to design some mechanism to use Image +
getCanvas + sort of setStyleAttribute("list-image", that_image)
canvas-related attributes ? You mean
those width and height?
They are optional anyway.
If you need to define dimension of something
exactly by width and height attributes then you can use <img> or
<object> and draw on them.
canvas-related method is only one - getContext().
And as I said it can be eliminated by using onPaint event.
In my opinion what is really invalid is use of
<canvas> in the way you explained.
How would you position it above and below? Again by
using scripts or/and moving all things out of static positioning?
In the way it is defined <canvas> is just a
special kind of <object>, so why not
use existing <object> then?
As far as I understand <object> was specially
designed to serve such purposes.
Andrew Fedoniouk.
|
- Re: [whatwg] Canvas and DOM elements Peter Hall
- Re: [whatwg] Canvas and DOM elements Andrew Fedoniouk
- Re: [whatwg] Canvas and DOM elements Ian Hickson
- Re: [whatwg] Canvas and DOM elements Ian Hickson
