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

Re: About "d" attribute

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Sat, 12 May 2012 13:28:44 +0200
To: fyaoxy@gmail.com, www-svg@w3.org
Message-Id: <201205121328.45405.Dr.O.Hoffmann@gmx.de>

> Indeed, there already have implicit conclusion:
> In normal use cases, the empty path not a necessary.

Not necessary, but one cannot avoid anyway that it is
possible to leave it empty - and there has to be a check
and a rule to care about this situation.
Especially for the d attribute an implementation has to
check (and correct) a lot of things anyway, because
there are many possible values, that do not fit to the
allowed syntax - obviously it is not necessary, that 
authors provide wrong path data or in case of the
commands for elliptical arc such data, that need to
be corrected to be presentable, however one cannot
avoid such situations, therefore some rules are required
anyway. 
There are other correct notations that result in no visible
path, therefore the empty value is just one possible way
to get this effect, nothing very special about it finally.

>
> Seems, at this point, both agree:)
>
> now we are talk about it's necessary in non-normal uses.
>
> >From common programming view, if there is an empty thing, so the
>
> iteration loop must do checking out if something is special or null
> like, yes?

I think, one has to analyse the complete value.
I think, if problems occur later in the path data, the
viewer has to stop rendering of the path. 
If you implement it, I think there will be no big difference,
if you decide, that you do not render the path because
it dose not start with m or M or that you do not render it,
because it is empty ;o)


> But in a graphics context, this kind of verification will eat some
> machine time. so value at where?
>
You have to check for nonsense anyway.
The viewer has to react anyway somehow on 
not renderable data at the beginning of the 
attribute value.


> But:) I must admit, I not really do some kind of animation framework.
> and I think my animation part processing about to begin.

For animation it is even more complex.
One has to check, whether all items of the values list have the
same structure or not. If yes, one can interpolate continuously.
If not, it has no effect for SVG 1.0 or SVG 1.1.1 and
for SVG 1.1.2 or SVG tiny 1.2 one can only do a discrete animation. 
As you can see - it is the simpler task to detect an empty value ;o)

This is currently often implemented wrong even for simpler 
structured attributes and properties, some viewers do not 
analyse the complete values list to determine the correct 
(default or fallback) calcMode - those switch within the animation,
therefore authors have to care about this problem explicitly to
avoid a appearence of such a bug of the viewers.


Olaf
Received on Saturday, 12 May 2012 11:29:16 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:51 GMT