W3C home > Mailing lists > Public > www-svg@w3.org > November 2012

Re: marker-pattern syntax

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 30 Nov 2012 17:27:00 +1100
Message-ID: <50B851B4.8000305@mcc.id.au>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Dirk Schulze <dschulze@adobe.com>, SVG public list <www-svg@w3.org>
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 

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

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


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:


and the latter in either:




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 

* 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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:30 UTC