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

Re: [SVG 2] bearing path command and simple drawing of objects with discrete rotation symmetry

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 13 Feb 2014 16:14:53 +1100
Message-ID: <52FC54CD.20208@mcc.id.au>
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
CC: www-svg@w3.org
Hi Olaf,

Dr. Olaf Hoffmann wrote:
> In detail: Alternatively to a number representing an angle in degree, it
> would be useful to be able to note number1/number2.
> This expression represents a fraction of a full turn.
> In case number2 is accidently noted as 0, one can define 0 degree as
> rotation.
>
> Advantages:
> a) Authors do not have to calculate the approximate angle
> in degrees and do not have to bother about residuals from rounding this
> number.
> b) This gives more accurate (semantical) information about the intended
> shape than rounded numbers, therefore it is simpler to identify the intented
> meaning or purpose of a shape.

You're right there would be an advantage to allowing fractions in here 
for values like 1/7.  On the other hand we don't allow numbers to be 
expressed like this anywhere else in SVG.

For stars, pie charts, etc., which are the kinds of things that I'm 
thinking the bearing commands will be used for, fractions of the form 
1/n would be appropriate.  I wonder though whether people would want to 
have more complex expressions, like "0.5 + 1/7".  (Of course they can 
just compute that to "8/14".)

People have previously asked to be able to use CSS length values in the 
middle of path data strings, and <polygon> points attributes.  Although 
we hadn't planned on doing that right now, as it's quite a change, it 
would let you do fractions using calc().

I think if we allowed fraction values, implementations wouldn't 
necessarily perform their path/bearing calculations using fraction 
values but instead still work with floating point.
Received on Thursday, 13 February 2014 05:15:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:35 UTC