コード例 #1
0
  public void calculatePath() {
    path = new Path2D.Double();

    path.moveTo(xpoints[0], ypoints[0]);
    for (int i = 1; i < npoints; i++) path.lineTo(xpoints[i], ypoints[i]);

    bounds = path.getBounds2D();
  }
コード例 #2
0
 @Override
 public Rectangle2D getBounds2D() {
   return shape.getBounds2D();
 }