Bug 313211 [CSS] Optimizing Linear Gradients
bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/GradientBackgroundListener.java
for (int i = 1; i <= percents.length; i++) {
			fractions[i] = percents[i - 1] / 100.0f;
		}
		BufferedImage image = new BufferedImage(width, height,
				BufferedImage.TYPE_INT_RGB);
		Graphics2D g2 = (Graphics2D) image.getGraphics();
		
		
		
		
		
		
		try {
			Class<?> radialGradientPaintClass = Class
					.forName("java.awt.RadialGradientPaint"); 
			Class<?>[] classes = radialGradientPaintClass.getClasses();
			int i;
			for (i = 0; i < classes.length; i++) {
				if ("java.awt.MultipleGradientPaint.CycleMethod" 
				.equals(classes[i].getCanonicalName())) {
					break;
				}
			}
			Constructor<?> ctor = radialGradientPaintClass
					.getConstructor(new Class[] { java.awt.geom.Point2D.class,
							float.class, java.awt.geom.Point2D.class,
							float[].class, java.awt.Color[].class, classes[i] });
			final Object radialGradientPaint = ctor.newInstance(new Object[] {
					new Point2D.Double(width / 2.0, 0), width,
					new Point2D.Double(width / 2.0, 0.0), fractions,