if ( bLastInSequence )
Location[] loaClipping = new Location[4]; loaClipping[0] = LocationImpl.create( boClipping.getLeft( ), boClipping.getTop( ) ); loaClipping[1] = LocationImpl.create( boClipping.getLeft( ) + boClipping.getWidth( ), boClipping.getTop( ) ); loaClipping[2] = LocationImpl.create( boClipping.getLeft( ) + boClipping.getWidth( ), boClipping.getTop( ) + boClipping.getHeight( ) ); loaClipping[3] = LocationImpl.create( boClipping.getLeft( ), boClipping.getTop( ) + boClipping.getHeight( ) );  cre.setVertices( loaClipping ); getDevice( ).setClip( cre );  ScriptHandler.callFunction( getRunTimeContext( ).getScriptHandler( ), ScriptHandler.BEFORE_DRAW_SERIES, getSeries( ), this, getRunTimeContext( ).getScriptContext( ) ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_SERIES, getSeries( ) ); renderSeries( ipr, p, srh );   ScriptHandler.callFunction( getRunTimeContext( ).getScriptHandler( ), ScriptHandler.AFTER_DRAW_SERIES, getSeries( ), this ); getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_SERIES, getSeries( ) );  if ( bLastInSequence ) { try { if ( isDimension3D( ) ) { getDeferredCache( ).process3DEvent( get3DEngine( ), boPlot.getLeft( ), boPlot.getTop( ) ); } getDeferredCache( ).flush( ); } catch ( ChartException ex )  { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); }   final PlotWithAxes pwa = (PlotWithAxes) getComputations( ); final AllAxes aax = pwa.getAxes( ); final OneAxis[] oaxa = new OneAxis[2 + aax.getOverlayCount( ) + ( aax.getAncillaryBase( ) != null ? 1 : 0 )]; oaxa[0] = aax.getPrimaryBase( ); oaxa[1] = aax.getPrimaryOrthogonal( ); for ( int i = 0; i < aax.getOverlayCount( ); i++ ) { oaxa[2 + i] = aax.getOverlay( i ); } if ( aax.getAncillaryBase( ) != null ) { oaxa[2 + aax.getOverlayCount( )] = aax.getAncillaryBase( ); } Bounds bo = pwa.getPlotBounds( );   renderMarkerLines( oaxa, bo );   cre.setVertices( null ); getDevice( ).setClip( cre );   renderAxesLabels( ipr, p, oaxa );  try { if ( isDimension3D( ) ) { getDeferredCache( ).process3DEvent( get3DEngine( ), boPlot.getLeft( ), boPlot.getTop( ) ); } getDeferredCache( ).flush( ); } catch ( ChartException ex )  { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); }  } } finally
	public final void renderPlot( IPrimitiveRenderer ipr, Plot p )			throws ChartException	{		if ( !p.isVisible( ) ) // CHECK VISIBILITY		{			return;		}		final boolean bFirstInSequence = ( iSeriesIndex == 0 );		final boolean bLastInSequence = ( iSeriesIndex == iSeriesCount - 1 );		final Bounds boPlot = getPlotBounds( );		if ( bFirstInSequence )		{			renderBackground( ipr, p );			renderAxesStructure( ipr, p );			// try			// {			// if ( isDimension3D( ) )			// {			// getDeferredCache( ).process3DEvent( get3DEngine( ),			// boPlot.getLeft( ),			// boPlot.getTop( ) );			// }			// getDeferredCache( ).flush( ); // FLUSH DEFERRED CACHE			// }			// catch ( ChartException ex ) // NOTE: RENDERING EXCEPTION ALREADY			// // BEING THROWN			// {			// throw new ChartException( ChartEnginePlugin.ID,			// ChartException.RENDERING,			// ex );			// }		}		ISeriesRenderingHints srh = null;		try		{			srh = ( (PlotWithAxes) getComputations( ) ).getSeriesRenderingHints( getSeriesDefinition( ),					getSeries( ) );		}		catch ( Exception ex )		{			throw new ChartException( ChartEnginePlugin.ID,					ChartException.RENDERING,					ex );		}		ScriptHandler.callFunction( getRunTimeContext( ).getScriptHandler( ),				ScriptHandler.BEFORE_DRAW_SERIES,				getSeries( ),				this,				getRunTimeContext( ).getScriptContext( ) );		getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_SERIES,				getSeries( ) );		renderSeries( ipr, p, srh ); // CALLS THE APPROPRIATE SUBCLASS FOR		// GRAPHIC ELEMENT RENDERING		ScriptHandler.callFunction( getRunTimeContext( ).getScriptHandler( ),				ScriptHandler.AFTER_DRAW_SERIES,				getSeries( ),				this );		getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_SERIES,				getSeries( ) );		if ( bLastInSequence )		{			try			{				if ( isDimension3D( ) )				{					getDeferredCache( ).process3DEvent( get3DEngine( ),							boPlot.getLeft( ),							boPlot.getTop( ) );				}				getDeferredCache( ).flush( ); // FLUSH DEFERRED CACHE			}			catch ( ChartException ex ) // NOTE: RENDERING EXCEPTION ALREADY			// BEING THROWN			{				throw new ChartException( ChartEnginePlugin.ID,						ChartException.RENDERING,						ex );			}			// SETUP AXIS ARRAY			final PlotWithAxes pwa = (PlotWithAxes) getComputations( );			final AllAxes aax = pwa.getAxes( );			final OneAxis[] oaxa = new OneAxis[2					+ aax.getOverlayCount( )					+ ( aax.getAncillaryBase( ) != null ? 1 : 0 )];			oaxa[0] = aax.getPrimaryBase( );			oaxa[1] = aax.getPrimaryOrthogonal( );			for ( int i = 0; i < aax.getOverlayCount( ); i++ )			{				oaxa[2 + i] = aax.getOverlay( i );			}			if ( aax.getAncillaryBase( ) != null )			{				oaxa[2 + aax.getOverlayCount( )] = aax.getAncillaryBase( );			}			Bounds bo = pwa.getPlotBounds( );			// RENDER MARKER LINES			renderMarkerLines( oaxa, bo );			// RENDER AXIS LABELS LAST			renderAxesLabels( ipr, p, oaxa );			try			{				if ( isDimension3D( ) )				{					getDeferredCache( ).process3DEvent( get3DEngine( ),							boPlot.getLeft( ),							boPlot.getTop( ) );				}				getDeferredCache( ).flush( ); // FLUSH DEFERRED CACHE			}			catch ( ChartException ex ) // NOTE: RENDERING EXCEPTION ALREADY			// BEING THROWN			{				throw new ChartException( ChartEnginePlugin.ID,						ChartException.RENDERING,						ex );			}		}	}