mitchwolberg
2007-12-03 17:27:16 UTC
I'm new to SVG and this list and I'm trying to prototype an SVG Export for our geology software. We use a large library of vector based patterns that would be perfect for SVG however I can't seem to be able to set the currentColor so that the pattern stroke color will change. Here's an example of the output from my program.
<svg width="500" height="400" viewBox="0.00 0.00 500.00 400.00" enable-background="new 0.00 0.00 500.00 400.00" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<pattern id="Horizontal" patternUnits="userSpaceOnUse" x="0" y="0" width="10" height="10" stroke="currentColor">
<path d="M 0 1 L 10 1 M 0 6 L 10 6"/>
</pattern>
</defs>
<g transform="scale(1,1)">
<g style="fill:url(#Horizontal); stroke:#008000;">
<rect x="10" y="10" width="70" height="70" stroke="#FF0000" stroke-width="1" stroke-dasharray="8,8,1,8,1,8"/>
</g>
</g>
</svg>
I'd also like to use a solid fill behind the pattern but it appears that I need to draw the rect twice to achieve this.
Thanks,
Mitch Wolberg,
RockWare, Inc.
-----
To unsubscribe send a message to: svg-developers-***@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:svg-developers-***@yahoogroups.com
mailto:svg-developers-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
svg-developers-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
<svg width="500" height="400" viewBox="0.00 0.00 500.00 400.00" enable-background="new 0.00 0.00 500.00 400.00" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<pattern id="Horizontal" patternUnits="userSpaceOnUse" x="0" y="0" width="10" height="10" stroke="currentColor">
<path d="M 0 1 L 10 1 M 0 6 L 10 6"/>
</pattern>
</defs>
<g transform="scale(1,1)">
<g style="fill:url(#Horizontal); stroke:#008000;">
<rect x="10" y="10" width="70" height="70" stroke="#FF0000" stroke-width="1" stroke-dasharray="8,8,1,8,1,8"/>
</g>
</g>
</svg>
I'd also like to use a solid fill behind the pattern but it appears that I need to draw the rect twice to achieve this.
Thanks,
Mitch Wolberg,
RockWare, Inc.
-----
To unsubscribe send a message to: svg-developers-***@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:svg-developers-***@yahoogroups.com
mailto:svg-developers-***@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
svg-developers-***@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/