W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] Canvas and transforms

From: Dean Jackson <dean@w3.org>
Date: Thu, 5 Jan 2006 23:56:09 +1100
Message-ID: <65858570-495F-42C6-9016-5FE791A37E1E@w3.org>
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
>
Received on Thursday, 5 January 2006 04:56:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:25 UTC