Re: marker-pattern syntax

We spoke a bit about marker-pattern in the telcon today (before the 
power outage interrupted us).  Nobody expressed any concerns about being 
able to write multiple tracks, so I think we have agreement on adding 
that.  We didn't come up with any new syntactic solutions for specifying 
offsets and delimiting the marker pattern from them, so we can continue 
trying to work that out here.

One thing that Dirk pointed out was that my idea of an offset was 
different from his.  Dirk imagined that the offset behaved like 
stroke-dashoffset, i.e. it allows you to specify an initial non-zero 
position within the repeated path.  I was thinking of it as modifying 
the length and position of the path that gets a marker pattern applied 
to it.  If we wrote (assuming the syntax where the offset is before the 
pattern):

   marker-pattern: 10px url() 20px;

then you would get a marker pattern like (each character is 5px wide):

   --X---X---X---X---X

with both interpretations of "offset".  It would make a difference 
though if you had, say:

   marker-pattern: 50% url() 50%;

The former interpretation would result in:

   X-------X-------X

and the latter in either:

   --------X-------X

or

   --------X---X---X

depending on whether the percentage in the pattern resolves against the 
path length before or after adjusting for the offset.

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.

IMO both are useful and we should try to accommodate them both in the 
syntax.  I have no concrete suggestions for doing that yet.

Received on Friday, 30 November 2012 06:28:35 UTC