final LineAttributes lia = LineAttributesImpl.create( (ColorDefinition) EcoreUtil.copy( cd ),
final LineAttributes lia = LineAttributesImpl.create( ColorDefinitionImpl.copyInstance( cd ),
	private void drawCrosshair( IPrimitiveRenderer ipr ) throws ChartException	{		if ( paletteEntry instanceof Gradient )		{			paletteEntry = ( (Gradient) paletteEntry ).getStartColor( );		}		if ( !( paletteEntry instanceof ColorDefinition ) )		{			throw new ChartException( ChartEnginePlugin.ID,					ChartException.RENDERING,					"exception.illegal.filltype.crosshair.marker", //$NON-NLS-1$					new Object[]{						paletteEntry					},					ResourceBundle.getBundle( Messages.ENGINE,							iRender.getLocale( ) ) );		}		final ColorDefinition cd = (ColorDefinition) paletteEntry;		final LineAttributes lia = LineAttributesImpl.create( (ColorDefinition) EcoreUtil.copy( cd ),				LineStyle.SOLID_LITERAL,				la.getThickness( ) );		final LineRenderEvent lre = (LineRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,				LineRenderEvent.class );		final Line3DRenderEvent lre3d = bRendering3D ? (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,				Line3DRenderEvent.class )				: null;		if ( bRendering3D )		{			lre3d.setLineAttributes( lia );			lre3d.setStart3D( Location3DImpl.create( lo3d.getX( ), lo3d.getY( )					- iSize, lo3d.getZ( ) ) );			lre3d.setEnd3D( Location3DImpl.create( lo3d.getX( ), lo3d.getY( )					+ iSize, lo3d.getZ( ) ) );		}		else		{			lre.setLineAttributes( lia );			lre.setStart( LocationImpl.create( lo.getX( ), lo.getY( ) - iSize ) );			lre.setEnd( LocationImpl.create( lo.getX( ), lo.getY( ) + iSize ) );		}		if ( bRendering3D )		{			final Location3D[] loa = new Location3D[4];			loa[0] = Location3DImpl.create( lo3d.getX( ) - iSize, lo3d.getY( )					+ iSize					- 1, lo3d.getZ( ) );			loa[1] = Location3DImpl.create( lo3d.getX( ) + iSize, lo3d.getY( )					+ iSize					- 1, lo3d.getZ( ) );			loa[2] = Location3DImpl.create( lo3d.getX( ) + iSize, lo3d.getY( )					- iSize					- 1, lo3d.getZ( ) );			loa[3] = Location3DImpl.create( lo3d.getX( ) - iSize, lo3d.getY( )					- iSize					- 1, lo3d.getZ( ) );			final Polygon3DRenderEvent pre = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,					Polygon3DRenderEvent.class );			pre.setPoints3D( loa );			pre.setDoubleSided( true );			preCopy = pre;		}		else		{			final Location[] loa = new Location[4];			loa[0] = LocationImpl.create( lo.getX( ) - iSize, lo.getY( )					+ iSize );			loa[1] = LocationImpl.create( lo.getX( ) + iSize, lo.getY( )					+ iSize );			loa[2] = LocationImpl.create( lo.getX( ) + iSize, lo.getY( )					- iSize );			loa[3] = LocationImpl.create( lo.getX( ) - iSize, lo.getY( )					- iSize );			final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,					PolygonRenderEvent.class );			pre.setPoints( loa );			preCopy = pre;		}		if ( bRendering3D )		{			dc.addLine( lre3d );			lre3d.setLineAttributes( lia );			lre3d.setStart3D( Location3DImpl.create( lo3d.getX( ) - iSize,					lo3d.getY( ),					lo3d.getZ( ) ) );			lre3d.setEnd3D( Location3DImpl.create( lo3d.getX( ) + iSize,					lo3d.getY( ),					lo3d.getZ( ) ) );			dc.addLine( lre3d );		}		else		{			if ( bDeferred )			{				dc.addMarker( lre, PrimitiveRenderEvent.DRAW );			}			else			{				ipr.drawLine( lre );			}			lre.setLineAttributes( lia );			lre.setStart( LocationImpl.create( lo.getX( ) - iSize, lo.getY( ) ) );			lre.setEnd( LocationImpl.create( lo.getX( ) + iSize, lo.getY( ) ) );			if ( bDeferred )			{				dc.addMarker( lre, PrimitiveRenderEvent.DRAW );			}			else			{				ipr.drawLine( lre );			}		}	}