This could be a fairly common situation.
An SVG drawing has a reoccurring pattern. It's defined in the <defs>
<defs>
<g id="endTip">
<circle r="2px" fill="blue"/> <!-- origin mark for the def for debug purposes -->
<polyline stroke-width="1px" stroke="black" fill="none" points="0,-4 100,-4 100,4 0,4" />
</g>
</defs>
then the pattern is stamped onto the drawing with <using>
<use x="250px" y="15px" xlink:href="#endTip" /> <!-- right -->
<use x="-250px" y="-15px" xlink:href="#endTip" transform="scale(-1,1)"/> <!-- left -->
Furthermore, I want to horizontally flipped (mirror) some of the instances. To achieve that, I'm applying a transform in the <using>
element. My intent is to transform the contents of the pattern, but keep unchanged the x and y, which are prescribed in the <using>
element. Instead, both the contents and the x and y are mirrored.
(Rendered with Chrome version 44. Green annotations are not the part of SVG.)
What is a good way to flip the contents, but keep the x and y, which are prescribed in the <using>
element unflipped?