- From: Rik Cabanier <cabanier@gmail.com>
- Date: Tue, 7 May 2013 01:39:56 -0700
- To: Brian Birtles <bbirtles@mozilla.com>
- Cc: www-svg <www-svg@w3.org>
- Message-ID: <CAGN7qDA3HJL9SBKLzKPULPm5LnePSdpYK1pLtu3mjyWevu3Rag@mail.gmail.com>
On Tue, May 7, 2013 at 12:07 AM, Brian Birtles <bbirtles@mozilla.com> wrote: > (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. If you have a straight line, there will only be 2 points but there might be multiple widths. > > > > 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? > http://bit.ly/ZDlWyC for lots of art that's using variable width strokes. This article: http://adobe.ly/18R887J shows reuse of variable width strokes on eyelashes and lips. > > 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. > I think that use-case is pretty obscure and can be achieved with simple math. > > [1] http://people.mozilla.org/~**bbirtles/variable-width-** > stroke/variable-width-stroke-**eg.png<http://people.mozilla.org/~bbirtles/variable-width-stroke/variable-width-stroke-eg.png> >
Received on Tuesday, 7 May 2013 08:40:23 UTC