- From: Brian Birtles <bbirtles@mozilla.com>
- Date: Tue, 07 May 2013 16:07:09 +0900
- To: Rik Cabanier <cabanier@gmail.com>
- CC: www-svg <www-svg@w3.org>
(2013/05/07 15:48), Rik Cabanier wrote: > Because as you push harder on the tablet or you rotate the stylus to > use only the narrow end you expect the stroke width to change. > > > OK. > Will that pressure point coincide with an actual point? What if you just > draw a straight line? Yes, it has to coincide with an actual point due to the way pointer events and touch events are defined. I don't understand the question about straight lines. > I think that's more complicated than it needs to be. > You most likely want to reuse a variable width stroke definition across > multiple paths. Tying it to points makes that impossible. This is why we need real use cases. What is the use case where you actually re-use variable-width stroke definitions? Here's one: You have a diagram where boxes that represent processes are represented using a stroke that is thickest at the first and third corners. I've drawn an example picture at.[1] You resize the width of the box depending on the length of the text content. If the stroke widths are tied to percentage offsets of the path length then as the aspect ratio of the box changes you will get odd results where you get a bulge before or after the corners of the box. You have to generate a different 'stroke-widths' property for every such box and if you change the text content dynamically you have to recalculate it. If you tie the stroke widths to points in the path you can re-use the same variable width stroke definition on all such boxes regardless of their aspect ratio. If the text content changes, you don't need to adjust the styles at all. So it's not the case that tying to points prevents reuse. That said, I'm pretty sure there will be use cases where percentage-based offsets make more sense. Without real apps though, we're just guessing. We agree about only supporting symmetrical and positive stroke widths for now. That's good. Also, we agree that if we have to choose between absolute stroke widths or magnification factors, magnification factors are more useful. That's good too. I think the next step is to look for a middle-ground approach that allows addressing the drawing app use case and also situations where you want to tie a stroke width to a particular point in the path. Best regards, Brian [1] http://people.mozilla.org/~bbirtles/variable-width-stroke/variable-width-stroke-eg.png
Received on Tuesday, 7 May 2013 07:07:37 UTC