SVG question, pattern references another pattern but adds a solid background.
EMF and WMF formats have BKMODE and BKCOLOR parameters which are applied to patterns. BKMODE is either transparent (no background) or opaque (BKCOLOR is drawn first, then the pattern is drawn over it). The tricky part for importing these formats and converting them to SVG is that the values of BKMODE/BKCOLOR are NOT employed when the pattern is defined, but when it is drawn.
Here is an example of a pattern without a background (transparent) <pattern id="EMFhatch0_3F7FFF" patternUnits="userSpaceOnUse" width="6" height="6" x="0" y="0"> <path d="M 0,0 6,0" style="fill:none;stroke:#3f7fff" id="path15" inkscape:connector-curvature="0" /> </pattern>
and here is the same pattern with a background (opaque)
<pattern id="EMFhatch0_3F7FFF_FOE0DO" patternUnits="userSpaceOnUse" width="6" height="6" x="0" y="0"> <rect x="0" y="0" width="6" height="6" fill="#F0E0D0" /> <path d="M 0,0 6,0" style="fill:none;stroke:#3f7fff" id="path15" inkscape:connector-curvature="0" /> </pattern>
What I really need to be able to generate, when the pattern is used, and BKMODE and BKCOLOR are both known, something like this (pseudocode, definitely NOT the right syntax!)
<pattern id="EMFhatch0_3F7FFF_FOE0DO" patternUnits="userSpaceOnUse" width="6" height="6" x="0" y="0"> <rect x="0" y="0" width="6" height="6" fill="#F0E0D0" /> xlink:href="#EMFhatch0_3F7FFF" </pattern>
How is that supposed to be written? The idea is to write the solid background color and then the transparent "base" pattern over it. It doesn't look like <path> can do it by referencing the "base" pattern, since style="fill:" is used for the URL to that pattern, so it isn't available to specify the solid background color. That suggests to me that it must be done within the <pattern> - but any technique that works would be fine.
Thank you,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
participants (1)
-
mathog