[whatwg] Canvas and transforms

Dean Jackson dean at w3.org
Thu Jan 5 04:56:09 PST 2006


On 31/12/2005, at 7:17 AM, Erik Arvidsson wrote:


> Hi,
>
> I might have missed something but why isn't there a generic  
> transform method for the CanvasRederingContext2D. Currently there  
> are scale, rotate and translate. Adding a generic transform might  
> make a few things easier.
> void translate(in float m11, in float m12, in float m21, in float  
> m22);
> void translate(in float m11, in float m12, in float m21, in float  
> m22, in float dx, in float dy);
>

s/translate/transform/
and I don't think it's worth having the first method.

Otherwise +1 - very useful method (and nearly every 2d graphics API  
similar to canvas has this).

Dean


> where the arguments are the numbers in the transformation matrix
>
>   m11 m12 dx
> ( m21 m22 dy )
>     0   0  1
>
> dx and dy are 0 when left out
>
> -- 
> erik
>





More information about the whatwg mailing list