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

[whatwg] Canvas 2d methods

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 3 Jul 2006 17:48:42 -0400
Message-ID: <20060703214842.GA7992@ridley.dbaron.org>
On Sunday 2006-07-02 22:47 +0200, Stefan G?ssner wrote:
> hmm ...
> 
> ctx.scale(2,1)
>   .rotate(Math.PI/4)
>   .translate(4,-6);
> 
> illustrates a sequence of manipulations semantically very well, doesn't it?

In my opinion, this pattern generally makes sense semantically when used
on immutable objects (e.g., strings in JavaScript).

I don't think this pattern makes sense for mutable objects.  It just
suggests immutability.  And making the canvas context objects immutable
doesn't really make sense without much more significant changes.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20060703/aaf32be2/attachment.pgp>
Received on Monday, 3 July 2006 14:48:42 UTC

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