W3C home > Mailing lists > Public > www-svg@w3.org > February 2012

Re: <number-optional-number> and integer pairs

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 12 Feb 2012 18:30:45 +1100
Message-ID: <4F376AA5.8070100@mcc.id.au>
To: Dirk Schulze <vbs85@gmx.de>
CC: www-svg List <www-svg@w3.org>
Dirk Schulze:
> But just for 'filterRes' it is specified what to do if the number is not
> an integer [2]:
> "Non-integer values are truncated, i.e rounded to the closest integer
> value towards zero."
> It is not specified what to do for the 'order' attribute.
> Right now WebKit rounds the values of 'filterRes' and 'order' to
> integers after parsing them as <number>. Opera rounds at least
> 'filterRes' (did not check 'order') and according to Robert Longson
> FireFox just excepts integers.
> I think it is kind of bad to let <number-optional-number> represent
> number pairs _and_ integer pairs. I'd suggest to either add a new SVG
> data type <integer-optional-integer> or don't use pairs but single
> attributes: 'orderX', 'orderY', 'filterResX', 'filterResY'.

I agree, there is an inconsistency here.  I would be in favour of either 
defining the rounding behaviour for order to be the same as for 
filterRes, or for the definition to change to be a new 
<integer-optional-integer>.  I would prefer the former since it makes it 
consistent with filterRes, plus it would be more tolerant to rounding 
errors if filterRes is being set from script due to some calculation.

I have raised https://www.w3.org/Graphics/SVG/WG/track/issues/2438 for this.
Received on Sunday, 12 February 2012 07:31:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:34 UTC