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

[whatwg] proposed canvas 2d API additions

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Tue, 09 May 2006 10:26:27 +0200
Message-ID: <20060509102627.lm724pg1ns0gwc40@webmail.annevankesteren.nl>
Quoting Vladimir Vukicevic <vladimirv at gmail.com>:
>> I agree that they shouldn't be affected by the CTM, but I disagree that
>> they should be integers. e.g. in cases like:
>>
>>   HTML                          CSS
>>   <canvas height=1 width=1>     canvas { height: 100%; width: 100%; }
>>   </canvas>
>>
>> ...where the JS then uses the coordinate space 0..1,0..1 the author might
>> want to grab the top corner by grabbing the 0,0,0.25,0.25 rect.
>
> So, I really don't like this -- we need to nail down space the
> getPixels/setPixels coordinates should be in.  I still think that they
> should always be in the canvas space, no matter how many pixels they
> refer to in the rendered content or in the device space.  Note that in
> your example, the canvas can still be a 1x1 pixel canvas (and, I
> believe, will be in all current implementations) -- that one pixel
> will just cover the entire page.

That is what Ian is saying. He's saying it's a 1x1 pixel canvas just  
that within that 1x1 pixel there could be different subpixels with  
different colors you could try to get using floating points instead of  
integers.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
Received on Tuesday, 9 May 2006 01:26:27 UTC

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