W3C home > Mailing lists > Public > public-html@w3.org > March 2008

[canvas] 2d context fillRect() negative values for width/height

From: Mihai Sucan <mihai.sucan@gmail.com>
Date: Sun, 09 Mar 2008 14:24:57 +0200
To: public-html <public-html@w3.org>
Cc: "Ian Hickson" <ian@hixie.ch>
Message-ID: <op.t7q0rv1kmcpsjgr0b0dp@athlon>

Hello!

Working on a canvas painting tool I found that Firefox allows negative  
values for the width and height arguments of the  
canvas.2dcontext.fillRect() method. Opera and Safari do not.

I found this because I considered natural that width/height can be  
provided as negative values. Looks like the spec does not explicitly  
define what should happen when negative values for the two arguments are  
passed. As such, neither of the three browsers violate the spec.

I would suggest that the spec is updated to allow negative values for the  
arguments. I have already filled a bug report to Opera requesting that  
they follow Firefox with regards to this.

The same story is valid for the clearRect() and the strokeRect() methods.


Best regards,
Mihai


-- 
Mihai Sucan
http://www.robodesign.ro
Received on Sunday, 9 March 2008 12:25:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:13 GMT