final Fill flBackground = rre.getBackground( );
final Fill flBackground = validateMultipleFill( rre.getBackground( ) );
	public void fillRectangle( RectangleRenderEvent rre ) throws ChartException	{		final Fill flBackground = rre.getBackground( );		if ( isFullTransparent( flBackground ) )		{			return;		}		final Bounds bo = normalizeBounds( rre.getBounds( ) );		final Rectangle r = new Rectangle( (int) ( ( bo.getLeft( ) + dTranslateX ) * dScale ),				(int) ( ( bo.getTop( ) + dTranslateY ) * dScale ),				(int) Math.ceil( bo.getWidth( ) * dScale ),				(int) Math.ceil( bo.getHeight( ) * dScale ) );		if ( flBackground instanceof ColorDefinition )		{			final ColorDefinition cd = (ColorDefinition) flBackground;			// SKIP FULLY TRANSPARENT			if ( cd.isSetTransparency( ) && cd.getTransparency( ) == 0 )			{				return;			}			final Color cBG = (Color) _ids.getColor( cd );			final Color cPreviousBG = _gc.getBackground( );			_gc.setBackground( cBG );			R31Enhance.setAlpha( _gc, cd );			_gc.fillRectangle( r );			cBG.dispose( );			_gc.setBackground( cPreviousBG );		}		else if ( flBackground instanceof Gradient )		{			final Gradient g = (Gradient) flBackground;			final ColorDefinition cdStart = g.getStartColor( );			final ColorDefinition cdEnd = g.getEndColor( );			double dAngleInDegrees = g.getDirection( );			if ( dAngleInDegrees < -90 || dAngleInDegrees > 90 )			{				throw new ChartException( ChartDeviceSwtActivator.ID,						ChartException.RENDERING,						"SwtRendererImpl.exception.gradient.angle", //$NON-NLS-1$						new Object[]{							new Double( dAngleInDegrees )						},						Messages.getResourceBundle( getULocale( ) ) );			}			final Color cPreviousFG = _gc.getForeground( );			final Color cPreviousBG = _gc.getBackground( );			Color cFG = (Color) _ids.getColor( cdStart );			Color cBG = (Color) _ids.getColor( cdEnd );			final boolean bVertical = ( g.getDirection( ) < -45 || g.getDirection( ) > 45 );			final boolean bSwapped = ( g.getDirection( ) > 45 );			if ( bSwapped )			{				final Color c = cFG;				cFG = cBG;				cBG = c;			}			_gc.setForeground( cFG );			_gc.setBackground( cBG );			R31Enhance.setAlpha( _gc, g );			_gc.fillGradientRectangle( r.x, r.y, r.width, r.height, bVertical );			_gc.setForeground( cPreviousFG );			_gc.setBackground( cPreviousBG );			cFG.dispose( );			cBG.dispose( );		}		else if ( flBackground instanceof org.eclipse.birt.chart.model.attribute.Image )		{			org.eclipse.swt.graphics.Image img = null;			if ( flBackground instanceof EmbeddedImage )			{				try				{					ByteArrayInputStream bis = new ByteArrayInputStream( Base64.decodeBase64( ( (EmbeddedImage) flBackground ).getData( )							.getBytes( ) ) );					img = new org.eclipse.swt.graphics.Image( ( (SwtDisplayServer) _ids ).getDevice( ),							bis );				}				catch ( Exception ilex )				{					throw new ChartException( ChartDeviceSwtActivator.ID,							ChartException.RENDERING,							ilex );				}			}			else			{				final String sUrl = ( (org.eclipse.birt.chart.model.attribute.Image) flBackground ).getURL( );				try				{					img = (org.eclipse.swt.graphics.Image) _ids.loadImage( new URL( sUrl ) );				}				catch ( ChartException ilex )				{					throw new ChartException( ChartDeviceSwtActivator.ID,							ChartException.RENDERING,							ilex );				}				catch ( MalformedURLException muex )				{					throw new ChartException( ChartDeviceSwtActivator.ID,							ChartException.RENDERING,							muex );				}			}			final Region rgPreviousClip = new Region( );			_gc.getClipping( rgPreviousClip );			final Region rg = new Region( );			rg.add( rgPreviousClip );			rg.intersect( r );			_gc.setClipping( rg );			final Size szImage = _ids.getSize( img );			final int iXRepeat = (int) ( Math.ceil( r.width					/ szImage.getWidth( ) ) );			final int iYRepeat = (int) ( Math.ceil( r.height					/ szImage.getHeight( ) ) );			for ( int i = 0; i < iXRepeat; i++ )			{				for ( int j = 0; j < iYRepeat; j++ )				{					_gc.drawImage( img,							(int) ( r.x + i * szImage.getWidth( ) ),							(int) ( r.y + j * szImage.getHeight( ) ) );				}			}			img.dispose( );			_gc.setClipping( rgPreviousClip );			rg.dispose( );			rgPreviousClip.dispose( );		}	}