Bug 168837 The gradient with transparent color does not work [0001]
Description: The background gradient color does not work. Build number: 2.1.2.v20061221-0710 Steps to reproduce: 1. Preview the attached design file. Expected result: Background gradient color both work when preview and in Layout. Actual result: Background gradient color does not work when preview but work in Layout. Error log: N/A
chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGGraphics2D.java
elem.setAttribute( "gradientUnits", "userSpaceOnUse" ); 
		if ( paint.isCyclic( ) )
			elem.setAttribute( "spreadMethod", "repeat" ); 
		Element startColor = dom.createElement( "stop" ); 
		startColor.setAttribute( "offset", "0%" ); 
		if (highlight)
			startColor.setAttribute( "stop-color", serializeHighlightToString( paint.getColor1( ) ) ); 
		else
			startColor.setAttribute( "stop-color", serializeToString( paint.getColor1( ) ) ); 
		elem.appendChild( startColor );
		Element endColor = dom.createElement( "stop" ); 
		endColor.setAttribute( "offset", "100%" ); 
		if (highlight)
			endColor.setAttribute( "stop-color", serializeHighlightToString( paint.getColor2( ) ) ); 
		else
			endColor.setAttribute( "stop-color", serializeToString( paint.getColor2( ) ) ); 
		elem.appendChild( endColor );
		return elem;
	}
	
	private String serializeHighlightToString( Color cd )
	{
		if ( cd != null )
		{
			int red = (cd.getRed( ) + 255 ) / 2;
			int green = (cd.getGreen( ) + 255 ) / 2 ;
			int blue = (cd.getBlue( ) + 255 ) / 2 ;
			String r = Integer.toHexString( red );
			if ( red <= 0xF )
				r = "0" + r;