public Shape straightLineShape(){
  GeneralPath path=null;
  if (llpts != null && llpts.length >= 4 && llpts.length % 2 == 0) {
    double y1=llpts[0];
    double x1=llpts[1];
    path=new GeneralPath(GeneralPath.WIND_EVEN_ODD,llpts.length / 2);
    if (returnDegrees) {
      path.moveTo(ProjMath.radToDeg(x1),ProjMath.radToDeg(y1));
    }
 else {
      path.moveTo(x1,y1);
    }
    for (int i=2; i < llpts.length - 1; i+=2) {
      x1=llpts[i + 1];
      y1=llpts[i];
      if (returnDegrees) {
        path.lineTo(ProjMath.radToDeg(x1),ProjMath.radToDeg(y1));
      }
 else {
        path.lineTo(x1,y1);
      }
    }
  }
  return path;
}

public Shape straightLineShape ( ) { GeneralPath path = null ; if ( llpts != null && llpts . length >= 4 && llpts . length % 2 == 0 ) { double y1 = llpts [ 0 ] ; double x1 = llpts [ 1 ] ; path = new GeneralPath ( GeneralPath . WIND_EVEN_ODD , llpts . length / 2 ) ; if ( returnDegrees ) { path . moveTo ( ProjMath . radToDeg ( x1 ) , ProjMath . radToDeg ( y1 ) ) ; } else { path . moveTo ( x1 , y1 ) ; } for ( int i = 2 ; i < llpts . length - 1 ; i += 2 ) { x1 = llpts [ i + 1 ] ; y1 = llpts [ i ] ; if ( returnDegrees ) { path . lineTo ( ProjMath . radToDeg ( x1 ) , ProjMath . radToDeg ( y1 ) ) ; } else { path . lineTo ( x1 , y1 ) ; } } } return path ; }
creates a shape object from provided coordinates .
