protected Polygon getPolygon() {
		if (cacheValid) return poly;
		synchronized (lock) {
			double x0 = getX();
			double y0 = getY();
			double sinTheta = GMath.sinDegrees(rotation);
			double cosTheta = GMath.cosDegrees(rotation);
			poly = new Polygon();
			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());
				poly.addPoint(GMath.round(x), GMath.round(y));
			}
			cacheValid = true;
			return poly;
		}
	}