Hi, On Tue, Sep 9, 2008 at 3:31 PM, Barry <[EMAIL PROTECTED]> wrote: > Hi there > > I wondered if anybody could help at all. I have an existing svg file that > is very large and I wish to reteive a nodelist of a certain area so that I > can create a new svg of a small section. > > I have loaded the svg into memory and have defined a rectangle but I am > having problems with the getIntersectionList as I keep getting null > returned.
Did you try to load the DOM and boot CSS, it seem the rendering must be kicked first, so it able to compute the stuff. Try to search the batik wiki/faq or this milist archive for boot SVG DOM and CSS (sorry forgot the url) Cheers Tonny Kohar -- Sketsa SVG Editor imagine, design, create ... http://www.kiyut.com > > Here is a section of the code I think Im doing wrong but any help would be > gratefully received. > > SVGRect rectangle = this.originalSVGRoot.createSVGRect(); > rectangle.setX(new Float(this.topXPosition)); > rectangle.setY(new Float(this.topYPosition)); > rectangle.setWidth(new Float(this.imageWidth)); > rectangle.setHeight(new Float(this.imageHeight)); > > SVGElement croppableElement = (SVGElement)this.svgDocument.getRootElement(); > NodeList croppedNodes = this.originalSVGRoot.getIntersectionList(rectangle, > croppableElement); > System.out.println("NODES in THE crop OBJ: " + croppedNodes.getLength()); > > Thanks > > Barry --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
