W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2009

[whatwg] createImageData should take unsigned long

From: Philip Jägenstedt <philipj@opera.com>
Date: Mon, 24 Aug 2009 14:18:06 +0200
Message-ID: <op.uy51sdfoatwj1d@sisko.linkoping.osa>
As far as I can see there's no good reason why createImageData should take  
a float as input rather than unsigned long. Having it as float creates the  
odd situation where (0.1, 0.1) gives a 1x1 ImageData while (10.1, 10.1)  
gives a 10x10 or 11x11 depening on if you ceil or round the input (not  
defined). Unless there's a compelling reason to allow something like (0.1,  
0.1) I suggest changing the type and leaving the float->unsigned  
conversion to WebIDL.

Philip J?genstedt
Opera Software
Received on Monday, 24 August 2009 05:18:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:15 UTC