Location loa = (Location) lre.getStart( );
Location loa = lre.getStart( );
	private void drawButton( IPrimitiveRenderer ipr ) throws ChartException	{		double offset = 0.5 * iSize;		if ( bRendering3D )		{			final Line3DRenderEvent lre = new Line3DRenderEvent( oSource );			lre.setStart3D( lo3d );			lre.setEnd3D( lo3d );			lre.setLineAttributes( la );			engine3d.processEvent( lre, boPlot.getLeft( ), boPlot.getTop( ) );			Location loa = (Location) lre.getStart( );			final ArcRenderEvent areL = new ArcRenderEvent( oSource );			areL.setStartAngle( 90.0 );			areL.setEndAngle( 180.0 );			areL.setBounds( BoundsImpl.create( loa.getX( ) - iSize, loa.getY( )					- offset, iSize, iSize ) );			final LineRenderEvent lreL = new LineRenderEvent( oSource );			lreL.setStart( LocationImpl.create( loa.getX( ) - offset,					loa.getY( ) + offset ) );			lreL.setEnd( LocationImpl.create( loa.getX( ) + offset, loa.getY( )					+ offset ) );			final ArcRenderEvent areR = new ArcRenderEvent( oSource );			areR.setStartAngle( 270.0 );			areR.setEndAngle( 180.0 );			areR.setBounds( BoundsImpl.create( loa.getX( ), loa.getY( )					- offset, iSize, iSize ) );			final LineRenderEvent lreU = new LineRenderEvent( oSource );			lreU.setStart( LocationImpl.create( loa.getX( ) + offset,					loa.getY( ) - offset ) );			lreU.setEnd( LocationImpl.create( loa.getX( ) - offset, loa.getY( )					- offset ) );			final AreaRenderEvent area = new AreaRenderEvent( oSource );			area.add( areL );			area.add( lreL );			area.add( areR );			area.add( lreU );			area.setBackground( paletteEntry );			area.setOutline( la );			preCopy = area.copy( );			if ( bDeferred )			{				dc.addMarker( area, PrimitiveRenderEvent.FILL						| PrimitiveRenderEvent.DRAW );			}			else			{				ipr.fillArea( area );				ipr.drawArea( area );			}		}		else		{			final ArcRenderEvent areL = new ArcRenderEvent( oSource );			areL.setStartAngle( 90.0 );			areL.setEndAngle( 180.0 );			areL.setStyle( ArcRenderEvent.OPEN );			areL.setBounds( BoundsImpl.create( lo.getX( ) - iSize, lo.getY( )					- offset, iSize, iSize ) );			final LineRenderEvent lreL = new LineRenderEvent( oSource );			lreL.setStart( LocationImpl.create( lo.getX( ) - offset, lo.getY( )					+ offset ) );			lreL.setEnd( LocationImpl.create( lo.getX( ) + offset, lo.getY( )					+ offset ) );			final ArcRenderEvent areR = new ArcRenderEvent( oSource );			areR.setStartAngle( 270.0 );			areR.setEndAngle( 180.0 );			areR.setStyle( ArcRenderEvent.OPEN );			areR.setBounds( BoundsImpl.create( lo.getX( ) - 1, lo.getY( )					- offset, iSize, iSize ) );			final LineRenderEvent lreU = new LineRenderEvent( oSource );			lreU.setStart( LocationImpl.create( lo.getX( ) + offset, lo.getY( )					- offset ) );			lreU.setEnd( LocationImpl.create( lo.getX( ) - offset, lo.getY( )					- offset ) );			final AreaRenderEvent area = new AreaRenderEvent( oSource );			area.add( areL );			area.add( lreL );			area.add( areR );			area.add( lreU );			area.setBackground( paletteEntry );			area.setOutline( la );			preCopy = area.copy( );			if ( bDeferred )			{				dc.addMarker( area, PrimitiveRenderEvent.FILL						| PrimitiveRenderEvent.DRAW );			}			else			{				ipr.fillArea( area );				ipr.drawArea( area );			}		}	}