I have polygon from class Polygon. How can I make it bigger or smaller. I'm looking for function like grow(int,int) for rectangle.I haven't got any idea how can I do that.
Thanks in advance!
@sorry for my stupid question without any details.
I'm making polygon using:
private int[] xCoord = new int[50], yCoord= new int[50]; //Arrays containing the points of the polygon
private int pointCt=0; //The number of points that have been input
I'm clicking mouse on a certain place, then draw a line
xCoord[pointCt] = arg0.getX();
yCoord[pointCt] = arg0.getY();
pointCt++;
private void putLine(int x1,int y1,int x2,int y2)
{
Graphics g= getGraphics();
g.drawLine(x1, y1, x2, y2);
g.dispose();
}
polygon=new MyPolygon(xCoord,yCoord,pointCt);
I dont exactly know which line of my code should I post but I hope its enought. I just need an advice how to make bigger polygon having cusps in a table. Thanks!