Package java.awt.geom

Examples of java.awt.geom.Path2D.closePath()


        shape.moveTo(x, y);
        shape.lineTo(x - theDirection.data[0] + perp.data[0], y
            - theDirection.data[1] + perp.data[1]);
        shape.lineTo(x - theDirection.data[0] - perp.data[0], y
            - theDirection.data[1] - perp.data[1]);
        shape.closePath();

        g.fill(shape);
      }
    }
  }
View Full Code Here


                    path.lineTo(en.getX(), en.getY());
                }
            }
        }
        if (!begin) {
            path.closePath();
        }

        return new Area(path);
    }
   
View Full Code Here

            } else {
                path.lineTo(n.getCoor().lon(), n.getCoor().lat());
            }
        }
        if (!begin) {
            path.closePath();
        }

        return new Area(path);
    }
View Full Code Here

            Triangle2D t = (Triangle2D) s;
            Path2D path = new Path2D.Float();
            path.moveTo(t.a.x, t.a.y);
            path.lineTo(t.b.x, t.b.y);
            path.lineTo(t.c.x, t.c.y);
            path.closePath();
            return path;
        }
        if (s instanceof Ellipse) {
            Ellipse e = (Ellipse) s;
            Vec2D r = e.getRadii();
View Full Code Here

        path.moveTo(p.x, p.y);
        for (int i = 1, num = poly.getNumVertices(); i < num; i++) {
            p = poly.get(i);
            path.lineTo(p.x, p.y);
        }
        path.closePath();
        return path;
    }

    public Area getArea() {
        return area;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.