W3C home > Mailing lists > Public > www-svg@w3.org > February 2010

Feature Request: markerPaint

From: Jeff Schiller <codedread@gmail.com>
Date: Mon, 8 Feb 2010 17:02:18 -0600
Message-ID: <da131fde1002081502i5c90d022qedbd47bb89ca908c@mail.gmail.com>
To: www-svg <www-svg@w3.org>
Cc: Alexis Deveria <adeveria@gmail.com>
Hello SVG Working Group!

In SVG-edit, Alexis recently implemented support for arrows (using SVG markers).

First question:  what does display="marker" do?
http://www.w3.org/TR/SVG11/painting.html#DisplayProperty  I couldn't
find any spec text that describes this value.

Second, we have come across an issue with markers:  One common desire
is for the arrow-heads to match the stroke paint of the line/path.  We
do this by duplicating marker elements in our defs for each element
with a unique stroke paint using the marker.  That sucks because we
must have N marker elements and manage them, etc.  And if you want to
change the line's paint (or maybe animate it)... lots more overhead.

Is there a way to do this in SVGF 1.1 without creating multiple
<marker> elements that we just don't understand?  If so, please ignore
the rest of this email :)

If not, we have a suggestion:  Add a new markerPaint attribute to the
<marker> element:

   The markerPaint attribute can have one of the following enumerated
values: { marker | stroke }

     * marker - means the marker geometry (and possibly its ancestors)
determines the color that will be painted (the current behavior)

     * stroke - means that while painting the marker, any fill/stroke
attribute in the marker geometry with the value of 'inherit' is set to
the stroke of the element that references the marker

   The value if markerPaint is not specified would be 'marker'.

<defs>
 <marker id="arrow" markerPaint="stroke"><path fill="inherit" .../></marker>
</defs>

<!-- this would get a red arrow head -->
<line stroke="red" marker-end="url(#arrow)" />

<!-- this would get a blue arrow head -->
<line stroke="blue" marker-end="url(#arrow)" />

Maybe user agents can comment on the feasibility of this?

Also, what's the status of <marker>?  Since it wasn't in SVGT 1.2, I'm
not sure if it will be in SVG Core 2.0.

Thanks,
Jeff
Received on Monday, 8 February 2010 23:02:51 GMT

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