sasdza wrote: > I have some text that is drawn using the polygon element and I'm > getting a stray line for some of the characters that use multi- > bounded polygons. Can someone tell me what is causing this stray > line to occur? This is the svg file which draws a 'D' character > showing the stray line. > > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" > "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> > <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> > <g> > <polygon points="23 33,30 33,38 34,42 35,45 37,48 39,51 42,53 46,55 > 51,56 57,56 70,55 76,53 81,50 85,47 89,44 91,40 92,36 93 > ,9 93,9 33,23 33,15 89,15 38,30 38,36 39,39 40,42 41,45 > 43,47 46,48 49,50 54,51 63,50 73,48 78,46 82,44 84,42 86 > ,36 88,29 89,15 89," > style="fill: #000000; stroke: #000000; fill-rule: evenodd; " /> > </g> > </svg>
It is an already old message (I have a big backlog to read!) but even if you found the answer yourself, I thought it would be interesting to put it here to be find by newbies searching the archive :-) polygon automatically close the path, equivalent of the z command in path object. I put in evidence the start and end of your polygon: <polygon points="23 33,30 33,38 34,42 35,45 37,48 39,51 42,53 46,55 51,56 57,56 70,55 76,53 81,50 85,47 89,44 91,40 92,36 93 ,9 93,9 33,23 33, 15 89,15 38,30 38,36 39,39 40,42 41,45 43,47 46,48 49,50 54,51 63,50 73,48 78,46 82,44 84,42 86 ,36 88,29 89,15 89" style="fill: #00FF00; stroke: #0000FF; fill-rule: evenodd; " /> <line x1="22" y1="33" x2="24" y2="33" stroke="#FF0000" /> <line x1="23" y1="32" x2="23" y2="34" stroke="#FF0000" /> <line x1="14" y1="89" x2="16" y2="89" stroke="#FF0000" /> <line x1="15" y1="88" x2="15" y2="90" stroke="#FF0000" /> Actually, you even draw an explicit line between 23 33 and 15 89... You need to use a path, allowing to jump from one closed shape to the next: <path d="M 23 33,30 33,38 34,42 35,45 37,48 39,51 42,53 46,55 51,56 57,56 70,55 76,53 81,50 85,47 89,44 91,40 92,36 93 ,9 93,9 33,Z M 15 89,15 38,30 38,36 39,39 40,42 41,45 43,47 46,48 49,50 54,51 63,50 73,48 78,46 82,44 84,42 86 ,36 88,29 89,Z" style="fill: #00FF00; stroke: #0000FF; fill-rule: evenodd; " /> HTH. -- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- For servers mangling my From and Reply-To fields, -- please send private answers to PhiLho(a)GMX.net -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----- 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/ <*> 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/