public void moveWithinFrame(Rectangle2D bounds) {
		Object[] vertices = vertices();
		if (vertices.length == 0)
			return;
		Point2D p = pointForVertex(vertices[0]);
		double minx = p.getX(), miny = p.getY(), maxx = minx, maxy = miny;
		for (int i = 1; i < vertices.length; i++) {
			p = pointForVertex(vertices[i]);
			minx = Math.min(minx, p.getX());
			miny = Math.min(miny, p.getY());
			maxx = Math.max(maxx, p.getX());
			maxy = Math.max(maxy, p.getY());
		}
		// Now, scale them!
		for (int i = 0; i < vertices.length; i++) {
			p = pointForVertex(vertices[i]);
			p = new Point2D.Double((p.getX() - minx) * bounds.getWidth()
					/ (maxx - minx) + bounds.getX(), (p.getY() - miny)
					* bounds.getHeight() / (maxy - miny) + bounds.getY());
			moveVertex(vertices[i], p);
		}
	}