'marker-segment' and distance + 'marker-pattern' + 'marker'


I think 'marker-segment' should have the same syntax as 'marker-pattern' and allow a distance. Often you want to position markers on the corners of a path (even the example for marker-segement does it for demonstration ;)).

<percentage> would be relative to the segment length, <length> is a distance from the start of a segment.

	marker-segment: none | [ <url> <distance>+ ]+

Multiple markers on the same position should be possible. This can have some neat affects. Markers are drawn by the order. First all markers of the first sequence, then all markers of the next sequence and so on. It must be clarified what happens with negative values.

This would cause problems with the shorthand 'marker'. But the current syntax is not valid for shorthands anyway. To solve this problem, I would suggest the following syntax:

	marker: <marker-tripple> [, <marker-pattern>[, <marker-segment>] ]
	marker-pattern: <marker-pattern>
	marker-segment: <marker-segment>

	<marker-tripple> = [none | <url>]{1,3} - marker-start, marker-middle and marker-end as in SVG 1.1. If a url is missing, the value gets resolved to none.
	<marker-segment> = none | [<url> <distance>+]+
	<pattern-segment> = none | [<url> <distance>+]+
	<distance> = <length> | <percentage>

If you want to specify just segments with the shorthand instead of 'marker-segment', you would need to do: "none, none, url(#marker) 20% url(#marker2) 40%". But I think this is reasonable. The shorthand is just useful if you want to specify more then one marker solution (combination of pattern and segment).


Received on Thursday, 22 November 2012 15:37:56 UTC