Java examples for java.lang:Math Geometry Shape
make Polygon Area
//package com.java2s; import java.awt.Polygon; public class Main { public static Polygon makeArea(Polygon polygon, int steps, int dX, int dY) { // make this an area! for (int i = steps - 1; i >= 0; --i) { polygon.addPoint(polygon.xpoints[i] + dX, polygon.ypoints[i] + dY);// ww w . j av a 2s . com } return polygon; } }