public RectangleComponent[] getRectangles() {
		int n = getNumberOfInstances(RectangleComponent.class);
		RectangleComponent[] l = new RectangleComponent[n];
		n = 0;
		synchronized (layerBasket) {
			for (Layered c : layerBasket) {
				if (c instanceof RectangleComponent)
					l[n++] = (RectangleComponent) c;
			}
		}
		return l;
	}