public void updateEllipse(Shape shape, double x2, double y2) {

		Ellipse ellipse = (Ellipse) shape;

		Point2D objectCoords1 = Transformation.worldToObject(shape, x1, y1);

		Point2D objectCoords2 = Transformation.worldToObject(shape, x2, y2);

		if (objectCoords2.getX() >= objectCoords1.getX()) {
			ellipse.setWidth(objectCoords2.getX() - objectCoords1.getX());
		} else {
			ellipse.setWidth(objectCoords1.getX() - objectCoords2.getX());
		}
		if (objectCoords2.getY() >= objectCoords1.getY()) {
			ellipse.setHeight(objectCoords2.getY() - objectCoords1.getY());
		} else {
			ellipse.setHeight(objectCoords1.getY() - objectCoords2.getY());
		}

		Point2D worldCoordCenter = Transformation.objectToWorld(shape,
				(objectCoords1.getX() + objectCoords2.getX()) / 2,
				(objectCoords1.getY() + objectCoords2.getY()) / 2);

		ellipse.setX(worldCoordCenter.getX());
		ellipse.setY(worldCoordCenter.getY());
	}