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

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

From: Dirk Schulze <dschulze@adobe.com>
Date: Thu, 22 Nov 2012 07:37:25 -0800
To: SVG public list <www-svg@w3.org>
Message-ID: <BFAC3716-C41D-4E86-8624-771BA9A66928@adobe.com>
Hi SVG WG,

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>

with:
	<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).

Greetings,
Dirk
Received on Thursday, 22 November 2012 15:37:56 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:52 GMT