if ( lia.isSetVisible( ) && lia.isVisible( ) ) { for ( int i = 0; i < points.size( ) - 1; i++ ) { lre.setStart( pa[i] ); lre.setEnd( pa[i + 1] ); if ( bDeferred ) { dc.addLine( lre ); } else { ipr.drawLine( lre ); } } }
	private final void plotArea( IPrimitiveRenderer ipr, List points )			throws ChartException	{		if ( points == null || points.size( ) < 1 )		{			return;		}		final PolygonRenderEvent pre = bRendering3D ? null				: (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,						PolygonRenderEvent.class );		final Polygon3DRenderEvent pre3d = bRendering3D ? (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,				Polygon3DRenderEvent.class )				: null;		if ( bUseLastState )		{			Object obj = iRender.getRunTimeContext( )					.getState( AreaSeries.class );			lastX = null;			lastY = null;			if ( obj instanceof List && ( (List) obj ).size( ) > 0 )			{				List lst = (List) obj;				for ( int i = 0; i < lst.size( ); i++ )				{					Object o = lst.get( i );					if ( o instanceof double[] )					{						if ( lastX == null )						{							lastX = new double[lst.size( )];							lastY = new double[lastX.length];						}						lastX[i] = ( (double[]) o )[0];						lastY[i] = ( (double[]) o )[1];					}					else					{						lastX = null;						lastY = null;						break;					}				}			}			if ( lastX != null )			{				Location[] pa = new Location[points.size( ) + lastX.length];				for ( int i = 0; i < points.size( ); i++ )				{					double[] pt = (double[]) points.get( i );					pa[i] = LocationImpl.create( pt[0], pt[1] );				}				int l = points.size( );				for ( int i = lastX.length - 1; i >= 0; i-- )				{					pa[l + lastX.length - 1 - i] = LocationImpl.create( lastX[i],							lastY[i] );				}				pre.setOutline( null );				pre.setPoints( pa );				pre.setBackground( fillColor );				if ( bDeferred )				{					dc.addPlane( pre, PrimitiveRenderEvent.FILL );				}				else				{					ipr.fillPolygon( pre );				}				return;			}		}		if ( bRendering3D )		{			Location3D[] pa = new Location3D[points.size( ) + 2];			double[] pt0 = (double[]) points.get( 0 );			if ( pt0[1] > zeroLocation )			{				for ( int i = 1; i < points.size( ); i++ )				{					double[] pt = (double[]) points.get( i );					pa[pa.length - i] = Location3DImpl.create( pt[0],							pt[1],							pt[2] );				}				pa[0] = Location3DImpl.create( pt0[0], pt0[1], pt0[2] );				pa[1] = Location3DImpl.create( pt0[0], zeroLocation, pt0[2] );				pa[2] = Location3DImpl.create( pa[3].getX( ),						zeroLocation,						pa[3].getZ( ) );			}			else			{				for ( int i = 0; i < points.size( ); i++ )				{					double[] pt = (double[]) points.get( i );					pa[i + 2] = Location3DImpl.create( pt[0], pt[1], pt[2] );				}				pa[0] = Location3DImpl.create( pa[pa.length - 1].getX( ),						zeroLocation,						pa[pa.length - 1].getZ( ) );				pa[1] = Location3DImpl.create( pt0[0], zeroLocation, pt0[2] );			}			pre3d.setOutline( null );			pre3d.setPoints3D( pa );			pre3d.setBackground( fillColor );			dc.addPlane( pre3d, PrimitiveRenderEvent.FILL );			for ( int i = 0; i < pa.length; i++ )			{				pa[i].setZ( pa[i].getZ( ) - dTapeWidth );			}			dc.addPlane( pre3d, PrimitiveRenderEvent.FILL );			double[] pte = (double[]) points.get( points.size( ) - 1 );			loa3d[0].set( pt0[0], zeroLocation, pt0[2] );			loa3d[1].set( pt0[0], zeroLocation, pt0[2] - dTapeWidth );			loa3d[2].set( pte[0], zeroLocation, pte[2] - dTapeWidth );			loa3d[3].set( pte[0], zeroLocation, pte[2] );			pre3d.setPoints3D( loa3d );			dc.addPlane( pre3d, PrimitiveRenderEvent.FILL );		}		else		{			Location[] pa = new Location[points.size( ) + 2];			for ( int i = 0; i < points.size( ); i++ )			{				double[] pt = (double[]) points.get( i );				pa[i] = LocationImpl.create( pt[0], pt[1] );			}			if ( cwa.isTransposed( ) )			{				pa[pa.length - 2] = LocationImpl.create( zeroLocation,						pa[pa.length - 3].getY( ) );				pa[pa.length - 1] = LocationImpl.create( zeroLocation,						pa[0].getY( ) );			}			else			{				pa[pa.length - 2] = LocationImpl.create( pa[pa.length - 3].getX( ),						zeroLocation );				pa[pa.length - 1] = LocationImpl.create( pa[0].getX( ),						zeroLocation );			}			pre.setOutline( null );			pre.setPoints( pa );			pre.setBackground( fillColor );			if ( bDeferred )			{				dc.addPlane( pre, PrimitiveRenderEvent.FILL );			}			else			{				ipr.fillPolygon( pre );			}		}	}