public Shape createPoint(Point2D point){
  float x1=(float)(point.getX() - size / 2f);
  float x2=(float)(point.getX() - size / 4f);
  float x3=(float)(point.getX() + size / 4f);
  float x4=(float)(point.getX() + size / 2f);
  float y1=(float)(point.getY() - size / 2f);
  float y2=(float)(point.getY() - size / 4f);
  float y3=(float)(point.getY() + size / 4f);
  float y4=(float)(point.getY() + size / 2f);
  GeneralPath path=new GeneralPath();
  path.moveTo(x2,y1);
  path.lineTo(x3,y1);
  path.lineTo(x3,y2);
  path.lineTo(x4,y2);
  path.lineTo(x4,y3);
  path.lineTo(x3,y3);
  path.lineTo(x3,y4);
  path.lineTo(x2,y4);
  path.lineTo(x2,y3);
  path.lineTo(x1,y3);
  path.lineTo(x1,y2);
  path.lineTo(x2,y2);
  path.lineTo(x2,y1);
  return path;
}

public Shape createPoint ( Point2D point ) { float x1 = ( float ) ( point . getX ( ) - size / 2f ) ; float x2 = ( float ) ( point . getX ( ) - size / 4f ) ; float x3 = ( float ) ( point . getX ( ) + size / 4f ) ; float x4 = ( float ) ( point . getX ( ) + size / 2f ) ; float y1 = ( float ) ( point . getY ( ) - size / 2f ) ; float y2 = ( float ) ( point . getY ( ) - size / 4f ) ; float y3 = ( float ) ( point . getY ( ) + size / 4f ) ; float y4 = ( float ) ( point . getY ( ) + size / 2f ) ; GeneralPath path = new GeneralPath ( ) ; path . moveTo ( x2 , y1 ) ; path . lineTo ( x3 , y1 ) ; path . lineTo ( x3 , y2 ) ; path . lineTo ( x4 , y2 ) ; path . lineTo ( x4 , y3 ) ; path . lineTo ( x3 , y3 ) ; path . lineTo ( x3 , y4 ) ; path . lineTo ( x2 , y4 ) ; path . lineTo ( x2 , y3 ) ; path . lineTo ( x1 , y3 ) ; path . lineTo ( x1 , y2 ) ; path . lineTo ( x2 , y2 ) ; path . lineTo ( x2 , y1 ) ; return path ; }
creates a shape representing a point .
