protected void pushPoint(Point2D.Float p){
  if (verticeCount == 0) {
    shape.moveTo(p.x,p.y);
  }
 else   if (verticeCount == controlPoints.length - 1) {
    shape.lineTo(p.x,p.y);
    shape.closePath();
  }
 else {
    shape.lineTo(p.x,p.y);
  }
  controlPoints[verticeCount]=p;
  verticeCount+=1;
}

protected void pushPoint ( Point2D . Float p ) { if ( verticeCount == 0 ) { shape . moveTo ( p . x , p . y ) ; } else if ( verticeCount == controlPoints . length - 1 ) { shape . lineTo ( p . x , p . y ) ; shape . closePath ( ) ; } else { shape . lineTo ( p . x , p . y ) ; } controlPoints [ verticeCount ] = p ; verticeCount += 1 ; }
build the shape ( generalpath ) . this method must be called for each control point .
