public GRectangle getBounds() {
		int nPoints = vertexList.size();
		if (nPoints == 0) return new GRectangle();
		double xMin = 0;
		double xMax = 0;
		double yMin = 0;
		double yMax = 0;
		synchronized (lock) {
			double x0 = getX();
			double y0 = getY();
			double sinTheta = GMath.sinDegrees(rotation);
			double cosTheta = GMath.cosDegrees(rotation);
			boolean first = true;
			for (int i = 0; i < vertexList.size(); i++ ) {
				GPoint vertex = (GPoint) vertexList.get(i);
				double x = x0 + xScale * (cosTheta * vertex.getX() + sinTheta * vertex.getY());
				double y = y0 + yScale * (cosTheta * vertex.getY() - sinTheta * vertex.getX());
				if (first) {
					xMin = x;
					xMax = x;
					yMin = y;
					yMax = y;
					first = false;
				} else {
					xMin = Math.min(xMin, x);
					xMax = Math.max(xMax, x);
					yMin = Math.min(yMin, y);
					yMax = Math.max(yMax, y);
				}
			}
		}
		return new GRectangle(xMin, yMin, xMax - xMin, yMax - yMin);
	}