Bug 202316 [Forms] Add gradient sharing support for FormHeading
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
if (gradientImage != null) {
			gradientImage.dispose();
			gradientImage = null;
		}
		if (gradientInfo != null) {
			boolean vertical = gradientInfo.vertical;
			int width = vertical ? 1 : rect.width;
			int height = vertical ? rect.height : 1;
			gradientImage = new Image(getDisplay(), Math.max(width, 1), Math
					.max(height, 1));
			GC gc = new GC(gradientImage);
			drawTextGradient(gc, width, height);
			gc.dispose();
		} else if (backgroundImage != null && !isBackgroundImageTiled()) {
			gradientImage = new Image(getDisplay(), Math.max(rect.width, 1),
					Math.max(rect.height, 1));
			gradientImage.setBackground(getBackground());
			GC gc = new GC(gradientImage);
			gc.drawImage(backgroundImage, 0, 0);
			gc.dispose();
		}
		setBackgroundImage(gradientImage);
	}
	private void drawTextGradient(GC gc, int width, int height) {
		final Color oldBackground = gc.getBackground();
		if (gradientInfo.gradientColors.length == 1) {
			if (gradientInfo.gradientColors[0] != null)
				gc.setBackground(gradientInfo.gradientColors[0]);
			gc.fillRectangle(0, 0, width, height);
		} else {