W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2012

Re: [css3-transforms] scale 0 on non-scaling strokes

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 12 May 2012 21:17:24 -0700
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
CC: "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <F47006C2-6EF4-46E4-95BA-660CD936595E@adobe.com>
Hi Rik and Olaf,

On May 12, 2012, at 1:52 PM, Dr. Olaf Hoffmann wrote:

> Rik Cabanier:
> 
>> All,
>> 
>> on wednesday it was resolved that an element with a non-scaling stroke
>> should disappear when a scale factor goes to 0.
>> After thinking about this some more, I think that this doesn't make sense.
>> The geometry of the stroke does not scale, only the path does.
>> So, when scale goes to '0', the path would go to a line or a dot which then
>> should be stroked.
>> 
>> If the element is skewed to 90deg, I agree that everything should disappear.
I'd like to comment on your request at the end of the mail Rik.

To this edge case. We discussed this problem briefly during the FX TF F2F meeting. Here is an SVG example:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <rect x="10" y="10" width="10" height="10" scale="10" vector-effect="non-scaling-stroke" transform="scale(10,0)" fill="none" stroke="black"/>
</svg>

The transform has 0 as vertical scaling argument. This leads to a not invertible matrix. The current behavior on browsers and viewers with 'non-scaling-stroke' support is:
Opera: rect gets not drawn
Safari: rect gets not drawn
Chrome: rect gets not drawn (same engine as Safari)
Batik: rect gets not drawn
Illustrator: rect gets drawn, but the transform ignored 

Even if a lot of UAs support 'non-scaling-stroke' today, the test scenario does not do what you would like to render. So you can rely on the fact that UAs neither draw a finite/infinite line nor a point for not invertible matrix. From a mathematical point of view it is also not obviously how the result looks like. Even if your stroke does not rely on the scaling of the user space transform, the user space itself is either a 1 dimensional or 0 dimensional space. After all you still try to draw the two dimensional shape into the 0/1 dimensional space. SVG 1.2 should have described this case but didn't and therefore is undefined at the moment. CSS3 Transforms will define it in a way that is consistent within current UAs It makes more sense to describe the state of the art at this point of time than defining something different that is clearly inconsistent with the behavior of current UAs. So the FX TF added a resolution to not draw content on a not invertible matrix.

>> 
> This can be surprising as well, because here already the fill area is not
> necessarily zero - isn't this conserved for skewing in general?
> 
>> I think the behavior that was agreed upon will cause rendering glitches. If
>> you have an animation that goes from scale(1,1) to scale(-1, 1), you will
>> see a flicker 50% into the animation.
> 
> Following the previous discussion on this list about these 
> (and other) issues, I got the impression, that the effect is intended.
> I think, the general idea about these specific 'no rendering' rules
> is to frustrate authors to force them to avoid such situations and
> applications and care about other things than non-scaling-stroke
> of 1D or 0D objects, mirroring within animation, skewing,
> non invertable matrices, compatibility with current SVG etc.
> A friendly author is expected to find no new applications, the
> editors did not see or did not like, therefore these attempts
> to restrict the usefulness of such drafts on issues, the editors
> do not like ;o)
> Another interpretation is, that some implementations of the
> current draft are of low quality and cannot solve such situations
> in a meaningful way and these are the desperate attempts
> to hide these quality or motivation problems ;o)
> There are several indications for the problem of low motivation
> to improve the current draft as well in previous discussions.
> At some point it becomes a waste of time to read CSS drafts
> and to provide comments on it - if such comments are ignored
> anyway ;o)

At first I am really sorry if you got the impression that we wouldn't care about the thoughts authors. I appreciate your concerns and suggestions and try to address them in replies and answers as good as possible. Sometimes it needs a bit more time and I apologize that you had to wait. I think I brought up most (hopefully all) concerns that you and others had to the SVG WG and FX TF F2F meeting. We discussed the concerns in detail and I'll answer to your mails on this mailing list as soon as possible. It might still take a couple of days till I have the chance.

> 
> 
> Olaf
> 

Now to you Rik.

The FX TF talked about non-scaling-stroke and not invertible matrices in detail. We discussed the scenarios and use cases. I used exactly your example. We discussed what would happen during the animation and when scaling reaches 0. We discussed what a user might want to see and we discussed what the current problems are with this solution. The FX TF (and that includes you!) decided that in consideration of current support in browsers and difficulties in supporting this particular edge case, users can not rely on the behavior. Therefore we do not allow rendering of content that gets transformed by not invertible matrices, independent of a property. I really wonder that you accepted this resolution and add a comment to this mailing list that you want to have the opposite of what you decided the day before. Resolutions don't make any sense if they get rejected the next morning. As an editor I would not be able to rely on decisions of a WG anymore. If you have any concerns about a specific behavior raise them when they are on the agenda and the WG is discussing them, otherwise you are wasting the time of the WG.

Greetings,
Dirk
Received on Sunday, 13 May 2012 04:17:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 13 May 2012 04:17:55 GMT