public static void calcTextSize(Paint paint,String demoText,FSize outputFSize){
  Rect r=mCalcTextSizeRect;
  r.set(0,0,0,0);
  paint.getTextBounds(demoText,0,demoText.length(),r);
  outputFSize.width=r.width();
  outputFSize.height=r.height();
}

public static void calcTextSize ( Paint paint , String demoText , FSize outputFSize ) { Rect r = mCalcTextSizeRect ; r . set ( 0 , 0 , 0 , 0 ) ; paint . getTextBounds ( demoText , 0 , demoText . length ( ) , r ) ; outputFSize . width = r . width ( ) ; outputFSize . height = r . height ( ) ; }
calculates the approximate size of a text , depending on a demo text avoid repeated calls ( e . g . inside drawing methods )
