if ( iNumberOfPoints <= 1 )
ArrayList al = new ArrayList( ); while ( ( i < loPoints.length ) && !( Double.isNaN( loPoints[i].getX( ) ) || Double.isNaN( loPoints[i].getY( ) ) ) ) { al.add( loPoints[i] ); i += 1; } i -= 1;  if ( loPoints instanceof Location3D[] ) { tempPoints = (Location3D[]) al.toArray( new Location3D[0] ); } else { tempPoints = (Location[]) al.toArray( new Location[0] ); } faX = LocationImpl.getXArray( tempPoints ); faY = LocationImpl.getYArray( tempPoints ); if ( bRendering3D ) { faZ = Location3DImpl.getZArray( (Location3D[]) tempPoints ); } else { faZ = null; } iNumberOfPoints = faX.length;  if ( iNumberOfPoints < 1 ) { return; } else if ( iNumberOfPoints == 1 ) { double iSize = (double) lia.getThickness( );  if ( bRendering3D ) { Line3DRenderEvent lre3dValue = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource, Line3DRenderEvent.class ); Location3D[] loa3dValue = new Location3D[2]; loa3dValue[0] = Location3DImpl.create( faX[0], faY[0], faZ[0] ); loa3dValue[1] = Location3DImpl.create( faX[0], faY[0], faZ[0] - dTapeWidth ); lre3dValue.setStart3D( loa3dValue[0] ); lre3dValue.setEnd3D( loa3dValue[1] ); lre3dValue.setLineAttributes( lia );  dc.addLine( lre3dValue ); } else { final OvalRenderEvent ore = (OvalRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource, OvalRenderEvent.class ); ore.setBounds( BoundsImpl.create( faX[0] - iSize, faY[0] - iSize, 2 * iSize, 2 * iSize ) ); ore.setOutline( lia ); ipr.drawOval( ore ); } } else {  spX = new Spline( faX );   spY = new Spline( faY );  fa = new double[iNumberOfPoints]; for ( int j = 0; j < iNumberOfPoints; j++ ) { fa[j] = j; }  renderCurve( ipr, 0, 0 ); } } } else
	public final void draw( IPrimitiveRenderer ipr ) throws ChartException	{		if ( !lia.isSetVisible( ) )		{			throw new ChartException( ChartEnginePlugin.ID,					ChartException.RENDERING,					"exception.curve.visibility.unset",//$NON-NLS-1$ 					ResourceBundle.getBundle( Messages.ENGINE,							iRender.getRunTimeContext( ).getLocale( ) ) );		}		if ( !bFillArea && !lia.isVisible( ) )		{			return;		}		iNumberOfPoints = faX.length;		if ( iNumberOfPoints <= 1 )		{			return;		}		// X-CORDINATES		spX = new Spline( faX ); // X-SPLINE		// Y-CORDINATES		spY = new Spline( faY ); // Y-SPLINE		fa = new double[iNumberOfPoints];		for ( int i = 0; i < iNumberOfPoints; i++ )		{			fa[i] = i;		}		renderCurve( ipr, 0, 0 ); // ACTUAL CURVE	}