Thanks Jean-Christophe.

I did it a rather expensive way. I wasn't using a JSVGCanvas but when
I use one and set the document I'm getting the total length.

To recap for others who may need this:

Create a JSVGCanvas and setDocumentState(ALWAYS_DYNAMIC)
set the document (canvas.setDocument).

        SVGOMPathElement pe = new SVGOMPathElement(null /*"path" */, 
                (AbstractDocument) doc);
        doc.getRootElement().appendChild(pe);

        // Set your path        
        pe.setAttribute("d", "M1 1 L15 15 L25 25 L40 40 A30 30 -30 0 1 60 
60");

        // then you can:
        float len = pe.getTotalLength();

        or getPointAtLength()
        

If you know of another way without doing the JSVGCanvas, please let me know!

Thank you.
Roy

On Tuesday 11 October 2005 08:44 am, Jean-Christophe Arnu wrote:
> Stéphane Conversy m'expliquait  (le 11.10.2005 14:11):
> > does someone have a minimal program that illustrates the use of
> > getIntersectionList or getEnclosureList, so I can figure out what
> > happens by myself ?
>
> Hi Stéphane,
>     does your document is dynamic? If so did you called
> setDocumentState(ALWAYS_DYNAMIC) method upon your document? If you don't
> document would be static and new elements won't be « fed » with
> SVGSVGContext ref.
>
>     You could both (Roy and you) refer to Thomas reply ! :
> http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/200409.mbo
>x/[EMAIL PROTECTED]
>
> Cheers,

-- 
Roy Hollinger
Senior Software Engineer
ProLogic, Inc.
[EMAIL PROTECTED]


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

Reply via email to