public static void drawFilledRectangle(int x, int y, int width, int height,
			int colour) {
		if (x < topX) {
			width -= topX - x;
			x = topX;
		}
		if (y < topY) {
			height -= topY - y;
			y = topY;
		}
		if (x + width > bottomX)
			width = bottomX - x;
		if (y + height > bottomY)
			height = bottomY - y;
		int increment = DrawingArea.width - width;
		int pointer = x + y * DrawingArea.width;
		for (int row = -height; row < 0; row++) {
			for (int column = -width; column < 0; column++)
				pixels[pointer++] = colour;

			pointer += increment;
		}
	}