Hi Andreas,

Andreas Neumann <[EMAIL PROTECTED]> wrote on 02/04/2007 10:10:51 
AM:

> This is a typical use case for glyphs and textPath. In SVG you can 
> define you own glyphs (with your own geometry) and then use the textPath 

> element to align these glyphs along the path element.

   Duh, I had forgotten about that 'hack'.  Thanks for pointing
it out.

> You can use scripting and the DOM (SVGPathElement.getTotalLength) to 
> detect the path length and then calculate how many glyphs you need. I 
> succesfully use this methods for geomorphologic and geologic maps. This 
> is also a typical procedure in desktop mapping.

   It occurs to me you could get similar results constructing a 
polygon and using markers as well.  In some cases it might be a 
little clearer.  It might also be easier to space the marks along
the lines as well (although dx would work as well).

> Opera 9.1 also has the method="stretch" attribute implemented, which can 

> warp the individual glyphs along the path. However, as far as I know, 
> Opera 9 is the only SVG viewer that has this feature implemented. But 
> already without this method, the textPath feature is very useful.
> 
> Here is one textPath example with a self-defined glyph. Its from 
> Winter/Überschärs book (german) on SVG mapping:
> http://www.carto.net/neumann/temp/self_defined_glyphs_on_path.svg
> 
> Andreas
> 
> Amy Comstock wrote:
> 
> > All,
> >
> > I have a set of third party svg's. They all draw a symbol or are an 
> > example of a fill pattern.
> >
> > The svg's are set up like this:
> >
> > <svg xmlns="http://www.w3.org/2000/svg"; xml:space="preserve" 
> > width="xxmm" height="xxmm" style="shape-rendering:geometricPrecision; 
> > text-rendering:geometricPrecision; image-rendering:optimizeQuality; 
> > fill-rule:evenodd; clip-rule:evenodd"
> > viewBox="0 0 xx yy">
> >
> > <defs>
> >         cdata section
> > </defs>
> > <g id="xx">
> >         <g id="yy">
> >                 <line/path/polyline/etc id="zz" class="abc" coordinate 

> > list>
> >         </g>
> >         there may be multiple subgroups, all with separate id's
> > </g>
> > </svg>
> >
> > What I need to do is outline a line/polyline/polygon/path using these 
> > svg's.
> > I tried creating a pattern using the third party svg and then setting 
> > the pattern as the stroke. The problem is, that doesn't orient the svg 

> > correctly.
> >
> > This is what the svg I'm using looks like:
> >
> > Emacs!
> >
> >
> > When using that svg as the stroke pattern, I end up with this:
> >
> > Emacs!
> >
> >
> >
> >
> >
> >
> >
> > What I really want is this, to draw the edges using the pattern:
> > Emacs!
> >
> >
> >
> >
> > Any ideas on how to do this? Is it even possible?
> >
> > I'm using apache batik to do the drawing in a jsvgcanvas.
> >
> 
> 
> -- 
> ----------------------------------------------
> Andreas Neumann
> Institute of Cartography
> ETH Zurich
> Wolfgang-Paulistrasse 15
> CH-8093  Zurich, Switzerland
> 
> Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
> e-mail: [EMAIL PROTECTED]
> www: http://www.carto.net/neumann/
> SVG.Open: http://www.svgopen.org/
> Carto.net: http://www.carto.net/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to