*            right
	 * @param fromRGB
	 *            the color to start with
	 * @param toRGB
	 *            the color to end with
	 * @param redBits
	 *            the number of significant red bits, 0 for palette modes
	 * @param greenBits
	 *            the number of significant green bits, 0 for palette modes
	 * @param blueBits
	 *            the number of significant blue bits, 0 for palette modes
	 */
	static void fillGradientRectangle(GC gc, Device device, int x, int y,
			int width, int height, boolean vertical, RGB fromRGB, RGB toRGB,
			int redBits, int greenBits, int blueBits) {
		/* Create the bitmap and tile it */
		ImageData band = createGradientBand(width, height, vertical, fromRGB,
				toRGB, redBits, greenBits, blueBits);
		Image image = new Image(device, band);
		if ((band.width == 1) || (band.height == 1)) {
			gc.drawImage(image, 0, 0, band.width, band.height, x, y, width,
					height);
		} else {
			if (vertical) {
				for (int dx = 0; dx < width; dx += band.width) {
					int blitWidth = width - dx;
					if (blitWidth > band.width)
						blitWidth = band.width;
					gc.drawImage(image, 0, 0, blitWidth, band.height, dx + x,
							y, blitWidth, band.height);
				}
			} else {
				for (int dy = 0; dy < height; dy += band.height) {
					int blitHeight = height - dy;
					if (blitHeight > band.height)
						blitHeight = band.height;
					gc.drawImage(image, 0, 0, band.width, blitHeight, x,
							dy + y, band.width, blitHeight);
				}
			}
		}
		image.dispose();
	}