int curveProgressToScreenY(float p){
  if (p < 0 || p > 1)   return mStackVisibleRect.top + (int)(p * mStackVisibleRect.height());
  float pIndex=p * PrecisionSteps;
  int pFloorIndex=(int)Math.floor(pIndex);
  int pCeilIndex=(int)Math.ceil(pIndex);
  float xFraction=0;
  if (pFloorIndex < PrecisionSteps && (pCeilIndex != pFloorIndex)) {
    float pFraction=(pIndex - pFloorIndex) / (pCeilIndex - pFloorIndex);
    xFraction=(xp[pCeilIndex] - xp[pFloorIndex]) * pFraction;
  }
  float x=xp[pFloorIndex] + xFraction;
  return mStackVisibleRect.top + (int)(x * mStackVisibleRect.height());
}

int curveProgressToScreenY ( float p ) { if ( p < 0 || p > 1 ) return mStackVisibleRect . top + ( int ) ( p * mStackVisibleRect . height ( ) ) ; float pIndex = p * PrecisionSteps ; int pFloorIndex = ( int ) Math . floor ( pIndex ) ; int pCeilIndex = ( int ) Math . ceil ( pIndex ) ; float xFraction = 0 ; if ( pFloorIndex < PrecisionSteps && ( pCeilIndex != pFloorIndex ) ) { float pFraction = ( pIndex - pFloorIndex ) / ( pCeilIndex - pFloorIndex ) ; xFraction = ( xp [ pCeilIndex ] - xp [ pFloorIndex ] ) * pFraction ; } float x = xp [ pFloorIndex ] + xFraction ; return mStackVisibleRect . top + ( int ) ( x * mStackVisibleRect . height ( ) ) ; }
converts from the progress along the curve to a screen coordinate .
