[whatwg] Canvas suggestions
sh at kobjects.org
Mon Apr 16 14:39:17 PDT 2007
Jordan OSETE wrote:
> Yes, but there are complex shapes that can be made really easier to draw
> this way. On the other hand, the way the current specification works
> allows to construct a single shape once, and draw it in different ways
> around, by just modifying the transform attribute...
> It would be nice to have both, being able to use transformations
> independantly for drawing and constructing the path.
> I don't know if it would be very hard to implement or not? (well,
> obviously not for the mozilla project, since they already have it ;)
in my opinion, preserving the path for re-use does not buy much: Path
construction at this level is just appending a few coordinates and
meta-information to an array. Since there is no knowledge about future
transformations, one needs to keep the original coordinates instead of
the device coordinates, and it is not possible to calculate segment
count for Bezier curves etc.
Moreover, if the path is not re-used, keeping the original coordinates
is unnecessary overhead.
I doubt reusing just a simple path with different transformations is a
significant use case that justifies this overhead, and most
implementations seem not to support it anyway.
So I would prefer to keep it simple and to see the spec reflect the
current reality over having both or incompatible changes in
More information about the whatwg