- From: Dirk Schulze <dschulze@adobe.com>
- Date: Fri, 30 Nov 2012 09:01:47 -0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- CC: Cameron McCormack <cam@mcc.id.au>, SVG public list <www-svg@w3.org>
On Nov 30, 2012, at 8:36 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Thu, Nov 29, 2012 at 10:27 PM, Cameron McCormack <cam@mcc.id.au> wrote:
>> marker-pattern: 50% url() 50%;
>>
>> The former interpretation would result in:
>>
>> X-------X-------X
>
> You mean:
>
> --------X-------X
>
>
>> My feeling is that these two meanings of offset cater to different use
>> cases:
>>
>> * the former interpretation is for sliding the marker pattern so that it
>> looks nicer at the start of the path
>>
>> * the latter interpretation is for ensuring that the marker pattern isn't
>> painted at the start/end vertices of the path (since they might otherwise
>> collide with other markers or graphics there)
>>
>> The idea of an offset at the end of the path obviously only makes sense with
>> the second interpretation.
>
> Not quite. If makes just as much sense to have a "sliding" offset at
> the end, too, it just prevents any markers from painting there. It's
> similar to padding in CSS. It's indistinguishable from your
> interpretation if no percentages are used.
>
>> IMO both are useful and we should try to accommodate them both in the
>> syntax. I have no concrete suggestions for doing that yet.
>
> comma-separated optional arguments at the beginning and end of
> repeat()? Or just a single optional argument at the start giving the
> space that repeat() is repeated over, where percentages refer to the
> whole path(/segment) length?
Don't make it to complicated. a repeat function with complex syntax in it doesn't help anyone.
[<distance> <url>]+
Is fine. if needed then a 'repeat' or 'no-repeat' at the end or beginning.
[<distance> <url>]+ || [repeat | no-repeat]?
We should define either an offset like for stroke-dasharray, or the "end-clipping". I agree that you want to have clipping at both ends. But then I would go with the syntax of background[1] and background-size[2], which is familiar for web authors anyway:
[<distance> <url>]+ [/ <marker-free-region>]? || [repeat | no-repeat]?
<marker-free-region> = [ <distance> | auto ]{1,2}
First value for start, second for end. If one is specified, then the second is equal to the first. Auto means no marker fee region.
Worst syntactical case would be:
20px url(#m1) 20px url(#m2) 20px url(#m3) 20px url(#m4) / 20% 10% repeat
For each sequence. The pattern is clear, and the marker free region is 20% at the beginning and 10% at the end.
The easiest way would be
20px ur(#m1)
This way it is always clear which length value has which meaning. This isn't the case for 20px url(#m1) 20px for example.
We discussed marker-segment in the call yesterday and I am partly convinced that patterns are not the highest priority and we can have an easy syntax there.
[<distance>? <url>]#
is sufficient enough mostly.
Greetings,
Dirk
[1] http://www.w3.org/TR/css3-background/#the-background
[2] http://www.w3.org/TR/css3-background/#ltbg-sizegt
>
> ~TJ
Received on Friday, 30 November 2012 17:02:28 UTC