if ( cd.isSetTransparency( ) && cd.getTransparency( ) > 0 )
if ( !( cd.isSetTransparency( ) && cd.getTransparency( ) == 0 ) )
	public void fillArc( ArcRenderEvent are ) throws ChartException	{		Fill flBackground = are.getBackground( );		if ( isFullTransparent( flBackground ) )		{			return;		}		if ( are.getInnerRadius( ) >= 0				&& ( are.getOuterRadius( ) > 0 && are.getInnerRadius( ) < are.getOuterRadius( ) )				|| ( are.getInnerRadius( ) > 0 && are.getOuterRadius( ) <= 0 ) )		{			Bounds bo = BoundsImpl.create( are.getTopLeft( ).getX( ),					are.getTopLeft( ).getY( ),					are.getWidth( ),					are.getHeight( ) );			Bounds rctOuter, rctInner;			if ( are.getOuterRadius( ) > 0 )			{				rctOuter = BoundsImpl.create( ( ( bo.getLeft( ) + dTranslateX + ( bo.getWidth( ) / 2d - are.getOuterRadius( ) ) ) * dScale ),						( ( bo.getTop( ) + dTranslateY + ( bo.getHeight( ) / 2d - are.getOuterRadius( ) ) ) * dScale ),						( 2 * are.getOuterRadius( ) * dScale ),						( 2 * are.getOuterRadius( ) * dScale ) );			}			else			{				rctOuter = BoundsImpl.create( ( ( bo.getLeft( ) + dTranslateX ) * dScale ),						( ( bo.getTop( ) + dTranslateY ) * dScale ),						( bo.getWidth( ) * dScale ),						( bo.getHeight( ) * dScale ) );			}			if ( are.getInnerRadius( ) > 0 )			{				rctInner = BoundsImpl.create( ( ( bo.getLeft( ) + dTranslateX + ( bo.getWidth( ) / 2d - are.getInnerRadius( ) ) ) * dScale ),						( ( bo.getTop( ) + dTranslateY + ( bo.getHeight( ) / 2d - are.getInnerRadius( ) ) ) * dScale ),						( 2 * are.getInnerRadius( ) * dScale ),						( 2 * are.getInnerRadius( ) * dScale ) );			}			else			{				rctInner = BoundsImpl.create( ( ( bo.getLeft( ) + dTranslateX + bo.getWidth( ) / 2d ) * dScale ),						( ( bo.getTop( ) + dTranslateY + bo.getHeight( ) / 2d ) * dScale ),						0,						0 );			}			double startAngle = Math.toRadians( -are.getStartAngle( ) );			double stopAngle = Math.toRadians( -are.getStartAngle( )					- are.getAngleExtent( ) );			double xsOuter = ( rctOuter.getLeft( ) + ( Math.cos( startAngle ) * 0.5 + 0.5 )					* rctOuter.getWidth( ) );			double ysOuter = ( rctOuter.getTop( ) + ( Math.sin( startAngle ) * 0.5 + 0.5 )					* rctOuter.getHeight( ) );			double xeInner = ( rctInner.getLeft( ) + ( Math.cos( stopAngle ) * 0.5 + 0.5 )					* rctInner.getWidth( ) );			double yeInner = ( rctInner.getTop( ) + ( Math.sin( stopAngle ) * 0.5 + 0.5 )					* rctInner.getHeight( ) );			Path pt = new Path( ( (SwtDisplayServer) _ids ).getDevice( ) );			pt.addArc( (float) rctOuter.getLeft( ),					(float) rctOuter.getTop( ),					(float) rctOuter.getWidth( ),					(float) rctOuter.getHeight( ),					(float) are.getStartAngle( ),					(float) are.getAngleExtent( ) );			pt.lineTo( (float) xeInner, (float) yeInner );			pt.addArc( (float) rctInner.getLeft( ),					(float) rctInner.getTop( ),					(float) rctInner.getWidth( ),					(float) rctInner.getHeight( ),					(float) ( are.getStartAngle( ) + are.getAngleExtent( ) ),					(float) -are.getAngleExtent( ) );			pt.lineTo( (float) xsOuter, (float) ysOuter );			if ( flBackground instanceof ColorDefinition )			{				final ColorDefinition cd = (ColorDefinition) flBackground;				// skip full transparency for optimization.				if ( cd.isSetTransparency( ) && cd.getTransparency( ) > 0 )				{					final Color cBG = (Color) _ids.getColor( cd );					final Color cPreviousBG = _gc.getBackground( );					_gc.setBackground( cBG );					R31Enhance.setAlpha( _gc, cd );					_gc.fillPath( pt );					cBG.dispose( );					_gc.setBackground( cPreviousBG );				}			}			else if ( flBackground instanceof Gradient					|| flBackground instanceof org.eclipse.birt.chart.model.attribute.Image )			{				Region previousClipping = new Region( );				_gc.getClipping( previousClipping );				// TODO intersect previous clipping with current path.				_gc.setClipping( pt );				RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) this ).getEventObject( are.getSource( ),						RectangleRenderEvent.class );				rre.setBackground( are.getBackground( ) );				try				{					rre.setBounds( are.getBounds( ) );					rre.setOutline( are.getOutline( ) );					fillRectangle( rre );				}				catch ( ChartException ufex )				{					pt.dispose( );					throw new ChartException( ChartDeviceSwtActivator.ID,							ChartException.RENDERING,							ufex );				}				finally				{					_gc.setClipping( previousClipping );					previousClipping.dispose( );				}			}			pt.dispose( );		}		else		{			if ( are.getStyle( ) == ArcRenderEvent.SECTOR					|| ( are.getStyle( ) == ArcRenderEvent.CLOSED && Math.abs( are.getAngleExtent( ) ) >= 360 ) )			{				if ( flBackground instanceof ColorDefinition )				{					final ColorDefinition cd = (ColorDefinition) flBackground;					// skip full transparency for optimization.					if ( cd.isSetTransparency( ) && cd.getTransparency( ) > 0 )					{						final Color cBG = (Color) _ids.getColor( cd );						final Color cPreviousBG = _gc.getBackground( );						_gc.setBackground( cBG );						R31Enhance.setAlpha( _gc, cd );						_gc.fillArc( (int) ( ( are.getTopLeft( ).getX( ) + dTranslateX ) * dScale ),								(int) ( ( are.getTopLeft( ).getY( ) + dTranslateY ) * dScale ),								(int) ( are.getWidth( ) * dScale ),								(int) ( are.getHeight( ) * dScale ),								(int) are.getStartAngle( ),								(int) are.getAngleExtent( ) );						cBG.dispose( );						_gc.setBackground( cPreviousBG );					}				}				else if ( flBackground instanceof Gradient						|| flBackground instanceof org.eclipse.birt.chart.model.attribute.Image )				{					double xc = ( ( are.getTopLeft( ).getX( ) + dTranslateX + are.getWidth( ) / 2d ) * dScale );					double yc = ( ( are.getTopLeft( ).getY( ) + dTranslateY + are.getHeight( ) / 2d ) * dScale );					double xs = 0, ys = 0;					double angle = Math.toRadians( -are.getStartAngle( ) );					xs = ( ( are.getTopLeft( ).getX( ) + dTranslateX + ( Math.cos( angle ) * 0.5 + 0.5 )							* are.getWidth( ) ) * dScale );					ys = ( ( are.getTopLeft( ).getY( ) + dTranslateY + ( Math.sin( angle ) * 0.5 + 0.5 )							* are.getHeight( ) ) * dScale );					Path pt = new Path( ( (SwtDisplayServer) _ids ).getDevice( ) );					if ( are.getStyle( ) == ArcRenderEvent.CLOSED )					{						pt.addArc( (float) ( ( are.getTopLeft( ).getX( ) + dTranslateX ) * dScale ),								(float) ( ( are.getTopLeft( ).getY( ) + dTranslateY ) * dScale ),								(float) ( are.getWidth( ) * dScale ),								(float) ( are.getHeight( ) * dScale ),								(float) are.getStartAngle( ),								(float) are.getAngleExtent( ) );						pt.lineTo( (float) xs, (float) ys );					}					else if ( are.getStyle( ) == ArcRenderEvent.SECTOR )					{						pt.addArc( (float) ( ( are.getTopLeft( ).getX( ) + dTranslateX ) * dScale ),								(float) ( ( are.getTopLeft( ).getY( ) + dTranslateY ) * dScale ),								(float) ( are.getWidth( ) * dScale ),								(float) ( are.getHeight( ) * dScale ),								(float) are.getStartAngle( ),								(float) are.getAngleExtent( ) );						pt.lineTo( (float) xc, (float) yc );						pt.lineTo( (float) xs, (float) ys );					}					Region previousClipping = new Region( );					_gc.getClipping( previousClipping );					// TODO intersect previous clipping with current path.					_gc.setClipping( pt );					RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) this ).getEventObject( are.getSource( ),							RectangleRenderEvent.class );					rre.setBackground( are.getBackground( ) );					try					{						rre.setBounds( are.getBounds( ) );						rre.setOutline( are.getOutline( ) );						fillRectangle( rre );					}					catch ( ChartException ufex )					{						throw new ChartException( ChartDeviceSwtActivator.ID,								ChartException.RENDERING,								ufex );					}					finally					{						_gc.setClipping( previousClipping );						previousClipping.dispose( );						pt.dispose( );					}				}				return;			}			// Extra fix due to SWT arc rendering limitation.			if ( are.getStyle( ) == ArcRenderEvent.OPEN					|| are.getStyle( ) == ArcRenderEvent.CLOSED )			{				double angle = Math.toRadians( -are.getStartAngle( ) );				double xs = ( ( are.getTopLeft( ).getX( ) + dTranslateX + ( Math.cos( angle ) * 0.5 + 0.5 )						* are.getWidth( ) ) * dScale );				double ys = ( ( are.getTopLeft( ).getY( ) + dTranslateY + ( Math.sin( angle ) * 0.5 + 0.5 )						* are.getHeight( ) ) * dScale );				Path pt = new Path( ( (SwtDisplayServer) _ids ).getDevice( ) );				pt.addArc( (float) ( ( are.getTopLeft( ).getX( ) + dTranslateX ) * dScale ),						(float) ( ( are.getTopLeft( ).getY( ) + dTranslateY ) * dScale ),						(float) ( are.getWidth( ) * dScale ),						(float) ( are.getHeight( ) * dScale ),						(float) are.getStartAngle( ),						(float) are.getAngleExtent( ) );				pt.lineTo( (float) xs, (float) ys );				if ( flBackground instanceof ColorDefinition )				{					final ColorDefinition cd = (ColorDefinition) flBackground;					// skip full transparency for optimization.					if ( cd.isSetTransparency( ) && cd.getTransparency( ) > 0 )					{						final Color cBG = (Color) _ids.getColor( cd );						final Color cPreviousBG = _gc.getBackground( );						_gc.setBackground( cBG );						R31Enhance.setAlpha( _gc, cd );						_gc.fillPath( pt );						cBG.dispose( );						_gc.setBackground( cPreviousBG );					}				}				else if ( flBackground instanceof Gradient						|| flBackground instanceof org.eclipse.birt.chart.model.attribute.Image )				{					Region previousClipping = new Region( );					_gc.getClipping( previousClipping );					// TODO intersect previous clipping with current path.					_gc.setClipping( pt );					RectangleRenderEvent rre = (RectangleRenderEvent) ( (EventObjectCache) this ).getEventObject( are.getSource( ),							RectangleRenderEvent.class );					rre.setBackground( are.getBackground( ) );					try					{						rre.setBounds( are.getBounds( ) );						rre.setOutline( are.getOutline( ) );						fillRectangle( rre );					}					catch ( ChartException ufex )					{						pt.dispose( );						throw new ChartException( ChartDeviceSwtActivator.ID,								ChartException.RENDERING,								ufex );					}					finally					{						_gc.setClipping( previousClipping );						previousClipping.dispose( );					}				}				pt.dispose( );			}		}	}