In what you have written, all seems okay except for the stroke="currentColor" statement. That value would need to be changed, I believe, either through declarative animattion (SMIL) or through script.
I changed your code around a wee bit and made it so that either SMIL or JavaScript can be used to change the stroke color. Am not completely sure I understand what you mean, but hopefully this addresses your question. regards David Dailey ----------------------- <svg width="500" height="400" viewBox="0.00 0.00 200 150" version="1.1" xmlns="http://www.w3.org/2000/svg"> <script> function f(){ document.getElementById("Horizontal").setAttributeNS(null, "stroke", "blue") } </script> <defs> <pattern id="Horizontal" patternUnits="userSpaceOnUse" x="0" y="0" width="10" height="10" stroke="currentColor"> <animateColor repeatCount="indefinite" attributeName="stroke" values="red;blue;yellow;red" dur="4s" begin="R.click"/> <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 id="R" x="10" y="10" width="70" height="70" stroke="#FF0000" stroke-width="1" stroke-dasharray="8,8,1,8,1,8"/> </g> <text x="10" y="90" font-size="10pt" fill="black">Click rectangle</text> <text x="10" y="105" font-size="10pt" fill="red" onclick="f()">or click here</text> </g> </svg> --------------------- At 12:27 PM 12/3/2007, you wrote: >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>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: [EMAIL PROTECTED] -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:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

