David First make sure what you copied from Andreas gave is pasted in correctly. I had the same problem until I fixed some of the line breaks. To everyone else thanks for for the ideas. I am glad I didn't miss something obvious. Andreas you had the closest attempt but as you say it looks odd with sharp angles. To place a marker continuously along a line would work but I think it would have a similar issue with sharp corners.
The following is a copy of method in a GIS program (I raised the issue because I need a cartographic symbol). You basically stack a series of dashed lines in the correct location. This method does handle sharp curves. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/ TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%"> <defs> <path id="p1" d="M 100 200 C 300 400 300 0 500 200"/> <path id="p2" d="M20,300L300,300v100h200"/> </defs> <g fill="none" stroke="blue" stroke-linecap="round" > <use xlink:href="#p1" stroke-width="5.2" stroke-dasharray="2,28" stroke-dashoffset="0" /> <use xlink:href="#p1" stroke-width="10.2" stroke-dasharray="2,28" stroke-dashoffset="2" /> <use xlink:href="#p1" stroke-width="14.7" stroke-dasharray="2,28" stroke-dashoffset="4" /> <use xlink:href="#p1" stroke-width="18.6" stroke-dasharray="2,28" stroke-dashoffset="6" /> <use xlink:href="#p1" stroke-width="21.7" stroke-dasharray="2,28" stroke-dashoffset="8" /> <use xlink:href="#p1" stroke-width="23.8" stroke-dasharray="2,28" stroke-dashoffset="10" /> <use xlink:href="#p1" stroke-width="24.9" stroke-dasharray="2,28" stroke-dashoffset="12" /> <use xlink:href="#p1" stroke-width="24.9" stroke-dasharray="2,28" stroke-dashoffset="14" /> <use xlink:href="#p1" stroke-width="23.8" stroke-dasharray="2,28" stroke-dashoffset="16" /> <use xlink:href="#p1" stroke-width="21.7" stroke-dasharray="2,28" stroke-dashoffset="18" /> <use xlink:href="#p1" stroke-width="18.6" stroke-dasharray="2,28" stroke-dashoffset="20" /> <use xlink:href="#p1" stroke-width="14.7" stroke-dasharray="2,28" stroke-dashoffset="22" /> <use xlink:href="#p1" stroke-width="10.2" stroke-dasharray="2,28" stroke-dashoffset="24" /> <use xlink:href="#p1" stroke-width="5.2" stroke-dasharray="2,28" stroke-dashoffset="26" /> <use xlink:href="#p1" stroke-width="0" stroke-dasharray="2,28" stroke-dashoffset="28" /> </g> <g fill="none" stroke="white" stroke-linecap="round" > <use xlink:href="#p1" stroke-width="13" stroke-dasharray="2,28" stroke-dashoffset="8" /> <use xlink:href="#p1" stroke-width="14.3" stroke-dasharray="2,28" stroke-dashoffset="10" /> <use xlink:href="#p1" stroke-width="14.9" stroke-dasharray="2,28" stroke-dashoffset="12" /> <use xlink:href="#p1" stroke-width="14.9" stroke-dasharray="2,28" stroke-dashoffset="14" /> <use xlink:href="#p1" stroke-width="14.3" stroke-dasharray="2,28" stroke-dashoffset="16" /> <use xlink:href="#p1" stroke-width="13" stroke-dasharray="2,28" stroke-dashoffset="18" /> <use xlink:href="#p1" stroke-width="11.1" stroke-dasharray="2,28" stroke-dashoffset="20" /> </g> <g fill="none" stroke="blue" stroke-linecap="round" > <use xlink:href="#p2" stroke-width="5.2" stroke-dasharray="2,28" stroke-dashoffset="0" /> <use xlink:href="#p2" stroke-width="10.2" stroke-dasharray="2,28" stroke-dashoffset="2" /> <use xlink:href="#p2" stroke-width="14.7" stroke-dasharray="2,28" stroke-dashoffset="4" /> <use xlink:href="#p2" stroke-width="18.6" stroke-dasharray="2,28" stroke-dashoffset="6" /> <use xlink:href="#p2" stroke-width="21.7" stroke-dasharray="2,28" stroke-dashoffset="8" /> <use xlink:href="#p2" stroke-width="23.8" stroke-dasharray="2,28" stroke-dashoffset="10" /> <use xlink:href="#p2" stroke-width="24.9" stroke-dasharray="2,28" stroke-dashoffset="12" /> <use xlink:href="#p2" stroke-width="24.9" stroke-dasharray="2,28" stroke-dashoffset="14" /> <use xlink:href="#p2" stroke-width="23.8" stroke-dasharray="2,28" stroke-dashoffset="16" /> <use xlink:href="#p2" stroke-width="21.7" stroke-dasharray="2,28" stroke-dashoffset="18" /> <use xlink:href="#p2" stroke-width="18.6" stroke-dasharray="2,28" stroke-dashoffset="20" /> <use xlink:href="#p2" stroke-width="14.7" stroke-dasharray="2,28" stroke-dashoffset="22" /> <use xlink:href="#p2" stroke-width="10.2" stroke-dasharray="2,28" stroke-dashoffset="24" /> <use xlink:href="#p2" stroke-width="5.2" stroke-dasharray="2,28" stroke-dashoffset="26" /> <use xlink:href="#p2" stroke-width="0" stroke-dasharray="2,28" stroke-dashoffset="28" /> </g> <g fill="none" stroke="white" stroke-linecap="round" > <use xlink:href="#p2" stroke-width="13" stroke-dasharray="2,28" stroke-dashoffset="8" /> <use xlink:href="#p2" stroke-width="14.3" stroke-dasharray="2,28" stroke-dashoffset="10" /> <use xlink:href="#p2" stroke-width="14.9" stroke-dasharray="2,28" stroke-dashoffset="12" /> <use xlink:href="#p2" stroke-width="14.9" stroke-dasharray="2,28" stroke-dashoffset="14" /> <use xlink:href="#p2" stroke-width="14.3" stroke-dasharray="2,28" stroke-dashoffset="16" /> <use xlink:href="#p2" stroke-width="13" stroke-dasharray="2,28" stroke-dashoffset="18" /> <use xlink:href="#p2" stroke-width="11.1" stroke-dasharray="2,28" stroke-dashoffset="20" /> </g> </svg> Of course now I have a double wavy line. If there were another parameter available in the spec to allow a stroke offset left or right of the line this method would work fine. For example: stroke-offset="5" would draw a line 5 units to the the right of a path while stroke-offset="-5" would draw it to the left. This is available in my GIS program and it is how complex line symbols are drawn. Thanks for the ideas! Bruce --- In svg-developers@yahoogroups.com, David Dailey <[EMAIL PROTECTED]> wrote: > > At 04:29 AM 2/6/2008, Andreas wrote: > > Before I saw what Andreas had written I thought of another approach > -- using <marker> as in this example: > > http://srufaculty.sru.edu/david.dailey/svg/symbol.svg > > I put a SMIL animation on the markers since I was having trouble > figuring out how to position them properly. The animation suggests > that this approach might work for Bruce's problem, with some possibly > nontrivial fiddling. > > Andreas, though the approach you recommend makes the most sense, I > can't get your code to do anything in IE, and while I see a stairstep > and a sine wave (one period) in FF (2.x) there is no visible font; > in Opera (9.5) I see a simple sine wave (the font) running linearly > across the very top of thescreen but it isn't following the second path at all. > > It's a fun problem, cause if we could figure out a non-scripted way > of doing this, then we'd have a way of deforming textures in a > nonlinear fashion -- at least in a piecewise fashion. (The individual > glyphs won't warp) > > I don't see anything other than marker-start, marker-mid and > marker-end, but if we had marker(pathAtLength(r)) or somesuch, then > we could position markers all along the path. > > Maybe allowing the layout of elements in a <pattern> to follow a path > with orient="auto" would be a worthy addition to the arsenal? > > David > > > ><?xml version="1.0" encoding="UTF-8"?> > ><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" > >"<http://www.w3.org/>http://www.w3.org/ > >TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> > ><svg xmlns="<http://www.w3.org/2000/svg>http://www.w3.org/2000/svg" > >xmlns:xlink="http:// > >www.w3.org/1999/xlink" width="100%" height="100%"> > ><defs> > ><font id="myFont" horiz-adv-x="100"> > ><font-face font-family="My Font" units-per-em="100"/> > ><missing-glyph horiz-adv-x="100"/> > ><glyph unicode="p" horiz-adv-x="100" d="M 0 0 L 2.5 0 C > >50 45 50 -50 102.5 0 L 97.5 0 C 50 -45 50 50 -2.5 0 Z" /> > ></font> > ></defs> > ><path id="myFirstPath" fill="none" stroke="blue" stroke- > >width="2" d="M20,300L300,300v100h200"/> > ><text font-family="My Font" font-size="60" fill="red"> > ><textPath xlink:href="#myFirstPath" method="stretch"> > >ppppppppppppppppppppppppppppppppppp </textPath> > ></text> > ><path id="mySecondPath" fill="none" stroke="blue" stroke- > >width="2" d="M 100 100 C 300 300 300 -100 500 100"/> > ><text font-family="My Font" font-size="60" fill="red"> > ><textPath xlink:href="#mySecondPath" method="stretch"> > >ppppppppppppppppppppppppppppppppppp </textPath> > ></text> > ></svg> > ----- 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/