Hi,
There was a lengthy discussion about markers at yesterday's SVG teleconference. At least one browser vendor would like to change the behavior of markers in the SVG1.1 spec. At the moment, markers inherit the style of their parent at the point they are defined:
<g fill="black" stroke="red> <marker id="marker1"> <rect width="10" height="10"/> </marker> <path marker-start="url(#marker1)" d="M 30 60 L 80 60 L 80 110 Z"/> <g>
would produce a marker on a path. Both the marker and path would have a black fill and a red stroke. On the other hand:
<g fill="green" stroke="yellow> <marker id="marker2"> <rect width="10" height="10"/> </marker> <g> <g fill="black" stroke="red> <marker id="marker2"> <rect width="10" height="10"/> </marker> <path marker-start="url(#marker2)" d="M 30 60 L 80 60 L 80 110 Z"/> <g>
would produce a marker on a path with the marker having a green fill and yellow stroke. The proposal is to change the behavior so that the marker fill and stroke are defined at the point they are referenced (like the <use> object). This would allow markers to take the color of the path they are attached to. It was claimed that a search of roughly 30,000 SVG's collected from the Web finds only one SVG that relies on the current spec's behavior... namely the SVG from the W3C test suite that specifically tests the behavior. I'm not sure if this is actually true as many Inkscape's markers don't include fill or stroke color. Since they are defined in the <defs> section, the fill defaults to black. If the marker fill were defined at the point of reference, I would think that it would take the object's fill... which is normally "none" for a path with an arrowhead.
I pointed out that this does not solve the typical Inkscape user's problem since what most user's want is for the marker fill to be the same color as the object's stroke color, see:
https://bugs.launchpad.net/inkscape/+bug/165865
The plan is to reevaluate the proper way to handle markers for SVG2 and then look at what changes to 1.1 can be made that will be compatible with SVG2. This could include changing the spec as described above.
Tav
BTW, why do some Inkscape markers include "font-size" in their style?
I think for Inkscape users what would work best and most intuitive is if markers would simply inherit the style from the object referencing it, unless the marker has an explicit style. I'm not sure that is what is proposed.
-Johan
-----Original Message----- From: Tavmjong Bah [mailto:tavmjong@...8...] Sent: Wednesday, July 21, 2010 09:17 To: inkscape-devel@lists.sourceforge.net Subject: [Inkscape-devel] SVG Working Group: Markers
Hi,
There was a lengthy discussion about markers at yesterday's SVG teleconference. At least one browser vendor would like to change the behavior of markers in the SVG1.1 spec. At the moment, markers inherit the style of their parent at the point they are defined:
<g fill="black" stroke="red>
<marker id="marker1"> <rect width="10" height="10"/> </marker> <path marker-start="url(#marker1)" d="M 30 60 L 80 60 L 80 110 Z"/> <g>
would produce a marker on a path. Both the marker and path would have a black fill and a red stroke. On the other hand:
<g fill="green" stroke="yellow>
<marker id="marker2"> <rect width="10" height="10"/> </marker> <g> <g fill="black" stroke="red> <marker id="marker2"> <rect width="10" height="10"/> </marker> <path marker-start="url(#marker2)" d="M 30 60 L 80 60 L 80 110 Z"/> <g>
would produce a marker on a path with the marker having a green fill and yellow stroke. The proposal is to change the behavior so that the marker fill and stroke are defined at the point they are referenced (like the <use> object). This would allow markers to take the color of the path they are attached to. It was claimed that a search of roughly 30,000 SVG's collected from the Web finds only one SVG that relies on the current spec's behavior... namely the SVG from the W3C test suite that specifically tests the behavior. I'm not sure if this is actually true as many Inkscape's markers don't include fill or stroke color. Since they are defined in the <defs> section, the fill defaults to black. If the marker fill were defined at the point of reference, I would think that it would take the object's fill... which is normally "none" for a path with an arrowhead.
I pointed out that this does not solve the typical Inkscape user's problem since what most user's want is for the marker fill to be the same color as the object's stroke color, see:
https://bugs.launchpad.net/inkscape/+bug/165865
The plan is to reevaluate the proper way to handle markers for SVG2 and then look at what changes to 1.1 can be made that will be compatible with SVG2. This could include changing the spec as described above.
Tav
BTW, why do some Inkscape markers include "font-size" in their style?
On Wed, Jul 21, 2010 at 4:16 AM, Tavmjong Bah <tavmjong@...8...> wrote:
specifically tests the behavior. I'm not sure if this is actually true as many Inkscape's markers don't include fill or stroke color. Since they are defined in the <defs> section, the fill defaults to black.
Except when you create new markers from objects, they are moved with their style to defs, so nothing is inherited.
If the marker fill were defined at the point of reference, I would think that it would take the object's fill... which is normally "none" for a path with an arrowhead.
Yes - "inherit style from path using it" sounds simple and attractive but it's not a solution: normally, you want the path's stroke paint to become the marker's fill paint. Which is not quite "inheriting" and requires some other mechanism.
BTW, why do some Inkscape markers include "font-size" in their style?
I guess that can be cleaned up.
participants (3)
-
unknown@example.com
-
bulia byak
-
Tavmjong Bah