private static void extractLineItem(SvgTree avg,SvgLeafNode child,Node currentGroupNode){
  logger.log(Level.FINE,"line found" + currentGroupNode.getTextContent());
  if (currentGroupNode.getNodeType() == Node.ELEMENT_NODE) {
    float x1=0;
    float y1=0;
    float x2=0;
    float y2=0;
    NamedNodeMap a=currentGroupNode.getAttributes();
    int len=a.getLength();
    boolean pureTransparent=false;
    for (int j=0; j < len; j++) {
      Node n=a.item(j);
      String name=n.getNodeName();
      String value=n.getNodeValue();
      if (name.equals(SVG_STYLE)) {
        addStyleToPath(child,value);
        if (value.contains("opacity:0;")) {
          pureTransparent=true;
        }
      }
 else       if (presentationMap.containsKey(name)) {
        child.fillPresentationAttributes(name,value);
      }
 else       if (name.equals("clip-path") && value.startsWith("url(#SVGID_")) {
      }
 else       if (name.equals("x1")) {
        x1=Float.parseFloat(value);
      }
 else       if (name.equals("y1")) {
        y1=Float.parseFloat(value);
      }
 else       if (name.equals("x2")) {
        x2=Float.parseFloat(value);
      }
 else       if (name.equals("y2")) {
        y2=Float.parseFloat(value);
      }
    }
    if (!pureTransparent && avg != null && !Float.isNaN(x1) && !Float.isNaN(y1) && !Float.isNaN(x2) && !Float.isNaN(y2)) {
      PathBuilder builder=new PathBuilder();
      builder.absoluteMoveTo(x1,y1);
      builder.absoluteLineTo(x2,y2);
      child.setPathData(builder.toString());
    }
  }
}

private static void extractLineItem ( SvgTree avg , SvgLeafNode child , Node currentGroupNode ) { logger . log ( Level . FINE , "line found" + currentGroupNode . getTextContent ( ) ) ; if ( currentGroupNode . getNodeType ( ) == Node . ELEMENT_NODE ) { float x1 = 0 ; float y1 = 0 ; float x2 = 0 ; float y2 = 0 ; NamedNodeMap a = currentGroupNode . getAttributes ( ) ; int len = a . getLength ( ) ; boolean pureTransparent = false ; for ( int j = 0 ; j < len ; j ++ ) { Node n = a . item ( j ) ; String name = n . getNodeName ( ) ; String value = n . getNodeValue ( ) ; if ( name . equals ( SVG_STYLE ) ) { addStyleToPath ( child , value ) ; if ( value . contains ( "opacity:0;" ) ) { pureTransparent = true ; } } else if ( presentationMap . containsKey ( name ) ) { child . fillPresentationAttributes ( name , value ) ; } else if ( name . equals ( "clip-path" ) && value . startsWith ( "url(#SVGID_" ) ) { } else if ( name . equals ( "x1" ) ) { x1 = Float . parseFloat ( value ) ; } else if ( name . equals ( "y1" ) ) { y1 = Float . parseFloat ( value ) ; } else if ( name . equals ( "x2" ) ) { x2 = Float . parseFloat ( value ) ; } else if ( name . equals ( "y2" ) ) { y2 = Float . parseFloat ( value ) ; } } if ( ! pureTransparent && avg != null && ! Float . isNaN ( x1 ) && ! Float . isNaN ( y1 ) && ! Float . isNaN ( x2 ) && ! Float . isNaN ( y2 ) ) { PathBuilder builder = new PathBuilder ( ) ; builder . absoluteMoveTo ( x1 , y1 ) ; builder . absoluteLineTo ( x2 , y2 ) ; child . setPathData ( builder . toString ( ) ) ; } } }
convert line element into a path .
