Java Utililty Methods Draw Polygon

List of utility methods to do Draw Polygon

Description

The list of methods to do Draw Polygon are organized into topic(s).

Method

PolygondrawPolygon(final Point2D[] points, final Graphics2D g2d, final Paint paint, final boolean fill)
Draws a polygon on screen using the points provided as vertices.
Polygon poly = new Polygon();
for (Point2D p : points) {
    poly.addPoint((int) p.getX(), (int) p.getY());
g2d.setPaint(paint);
if (fill) {
    g2d.fillPolygon(poly);
} else {
...
voiddrawPolygons(final Graphics g, final Collection v)
draw a bunch of polygons
drawPolygons(g, v.iterator());