private void convertToPolygon() {

		if (polygon == null) {
			polygon = new Polygon();
		} else {
			polygon.reset();
		}
		if (transform == null) {
			transform = new AffineTransform();
		} else {
			transform.setToIdentity();
		}
		transform.setToRotation(theta, rx, ry);

		PathIterator pi = ellipse.getPathIterator(transform);
		double[] xy = new double[6];
		while (!pi.isDone()) {
			int type = pi.currentSegment(xy);
			if (type == PathIterator.SEG_MOVETO || type == PathIterator.SEG_LINETO || type == PathIterator.SEG_CUBICTO || type == PathIterator.SEG_QUADTO) {
				polygon.addPoint((int) xy[0], (int) xy[1]);
			}
			pi.next();
		}

	}