&& ( j == iNumberOfDivisions - 1 && bKeepState );
&& ( j == iNumberOfDivisions - 1 && bKeepState && bFillArea);
	private final void renderCurve( IPrimitiveRenderer ipr, double fXOffset,			double fYOffset ) throws ChartException	{		final double[] faKnotXY1 = new double[2];		final double[] faKnotXY2 = new double[2];		if ( !computeSpline( fa[0], faKnotXY1 ) )		{			return;		}		int iNumberOfDivisions;		double fX, fY;		double[] faXY1, faXY2;		double fT;		final ArrayList stateList = new ArrayList( );		for ( int i = 0; i < iNumberOfPoints - 1; i++ )		{			if ( !computeSpline( fa[i + 1], faKnotXY2 ) )			{				continue;			}			fX = faKnotXY2[0] - faKnotXY1[0];			fY = faKnotXY2[1] - faKnotXY1[1];			iNumberOfDivisions = (int) ( Math.sqrt( fX * fX + fY * fY ) / 5.0f ) + 1;			faXY1 = new double[2];			faXY2 = new double[2];			if ( !computeSpline( fa[i], faXY1 ) )			{				continue;			}			for ( int j = 0; j < iNumberOfDivisions; j++ )			{				fT = fa[i]						+ ( fa[i + 1] - fa[i] )						* (double) ( j + 1 )						/ (double) iNumberOfDivisions;				if ( !computeSpline( fT, faXY2 ) )				{					continue;				}				if ( bShowAsTape )				{					boolean drawLeftSide = ( i == 0 )							&& ( j == 0 )							&& bKeepState							&& bRendering3D;					if ( drawLeftSide )					{						plotPlane( ipr,								faXY1[0] + fXOffset,								faXY1[1] + fYOffset,								faXY2[0] + fXOffset,								faXY2[1] + fYOffset,								bRendering3D ? faZ[i] : 0,								bRendering3D ? faZ[i] : 0,								true,								true );					}					// TODO user a single surface to draw the tape.					boolean drawRightSide = ( i == iNumberOfPoints - 2 )							&& ( j == iNumberOfDivisions - 1 && bKeepState );					plotPlane( ipr,							faXY1[0] + fXOffset,							faXY1[1] + fYOffset,							faXY2[0] + fXOffset,							faXY2[1] + fYOffset,							bRendering3D ? faZ[i] : 0,							bRendering3D ? faZ[i] : 0,							drawRightSide,							false );				}				if ( !bFillArea )				{					// if fill area, defer to the loop end.					plotLine( ipr,							faXY1[0] + fXOffset,							faXY1[1] + fYOffset,							faXY2[0] + fXOffset,							faXY2[1] + fYOffset,							bRendering3D ? faZ[i] : 0,							bRendering3D ? faZ[i] : 0 );				}				// TODO remove the duplicate points.				if ( bRendering3D )				{					stateList.add( new double[]{							faXY1[0] + fXOffset, faXY1[1] + fYOffset, faZ[i]					} );					stateList.add( new double[]{							faXY2[0] + fXOffset, faXY2[1] + fYOffset, faZ[i]					} );				}				else				{					stateList.add( new double[]{							faXY1[0] + fXOffset, faXY1[1] + fYOffset					} );					stateList.add( new double[]{							faXY2[0] + fXOffset, faXY2[1] + fYOffset					} );				}				faXY1[0] = faXY2[0];				faXY1[1] = faXY2[1];			}			faKnotXY1[0] = faKnotXY2[0];			faKnotXY1[1] = faKnotXY2[1];		}		if ( bFillArea )		{			plotArea( ipr, stateList );		}		if ( bKeepState )		{			iRender.getRunTimeContext( ).putState( AreaSeries.class, stateList );		}	}