void resizeManipulableTo(Manipulable m, float x, float y, float w, float h, float x0, float y0) {
		w = Math.max(model.getLx() / nx, w);
		h = Math.max(model.getLy() / ny, h);
		Shape s = m.getShape();
		if (s instanceof Rectangle2D.Float) {
			Rectangle2D.Float r = (Rectangle2D.Float) s;
			r.setRect(x, y, w, h);
		} else if (s instanceof Ellipse2D.Float) {
			Ellipse2D.Float r = (Ellipse2D.Float) s;
			r.setFrame(x, y, w, h);
		} else if (s instanceof Annulus) {
			Annulus r = (Annulus) s;
			r.setShape(x, y, w, h);
		} else if (s instanceof EllipticalAnnulus) {
			EllipticalAnnulus r = (EllipticalAnnulus) s;
			r.setShape(x, y, w, h, x0, y0);
		} else if (s instanceof Area) {
			if (m instanceof Cloud) {
				Cloud c = (Cloud) m;
				c.setDimension(w, h);
				c.setX(x0 + x);
				c.setY(y0 + y);
			} else if (m instanceof Tree) {
				Tree t = (Tree) m;
				t.setDimension(w, h);
				t.setX(x0 + x);
				t.setY(y0 + y);
			}
		}
		if (m instanceof Part)
			model.refreshHeliostatsAimedAt((Part) m);
		notifyManipulationListeners(m, ManipulationEvent.RESIZE);
	}