question: private static void extractPolyItem ( SvgTree avg , SvgLeafNode child , Node currentGroupNode ) { logger . log ( Level . FINE , "Rect found" + currentGroupNode . getTextContent ( ) ) ; if ( currentGroupNode . getNodeType ( ) == Node . ELEMENT_NODE ) { NamedNodeMap a = currentGroupNode . getAttributes ( ) ; int len = a . getLength ( ) ; for ( int itemIndex = 0 ; itemIndex < len ; itemIndex ++ ) { Node n = a . item ( itemIndex ) ; String name = n . getNodeName ( ) ; String value = n . getNodeValue ( ) ; if ( name . equals ( SVG_STYLE ) ) { addStyleToPath ( child , value ) ; } else if ( presentationMap . containsKey ( name ) ) { child . fillPresentationAttributes ( name , value ) ; } else if ( name . equals ( SVG_POINTS ) ) { PathBuilder builder = new PathBuilder ( ) ; String [ ] split = value . split ( "[\\s,]+" ) ; float baseX = Float . parseFloat ( split [ 0 ] ) ; float baseY = Float . parseFloat ( split [ 1 ] ) ; builder . absoluteMoveTo ( baseX , baseY ) ; for ( int j = 2 ; j < split . length ; j += 2 ) { float x = Float . parseFloat ( split [ j ] ) ; float y = Float . parseFloat ( split [ j + 1 ] ) ; builder . relativeLineTo ( x - baseX , y - baseY ) ; baseX = x ; baseY = y ; } builder . relativeClose ( ) ; child . setPathData ( builder . toString ( ) ) ; } } } }
target:  Convert polygon element into a path.