public void setBounds(Rectangle rect) {
		int x = bounds.x, y = bounds.y;

		boolean resize = (rect.width != bounds.width)
				|| (rect.height != bounds.height), translate = (rect.x != x)
				|| (rect.y != y);

		if ((resize || translate) && isVisible())
			erase();
		if (translate) {
			int dx = rect.x - x;
			int dy = rect.y - y;
			primTranslate(dx, dy);
		}

		bounds.width = rect.width;
		bounds.height = rect.height;

		if (translate || resize) {
			if (resize)
				invalidate();
			fireFigureMoved();
			repaint();
		}
	}