private double drawBitmap(Canvas canvas){
  double viewWidth=canvas.getWidth();
  double viewHeight=canvas.getHeight();
  double imageWidth=mBitmap.getWidth();
  double imageHeight=mBitmap.getHeight();
  double scale=Math.min(viewWidth / imageWidth,viewHeight / imageHeight);
  Rect destBounds=new Rect(0,0,(int)(imageWidth * scale),(int)(imageHeight * scale));
  canvas.drawBitmap(mBitmap,null,destBounds,null);
  return scale;
}

private double drawBitmap ( Canvas canvas ) { double viewWidth = canvas . getWidth ( ) ; double viewHeight = canvas . getHeight ( ) ; double imageWidth = mBitmap . getWidth ( ) ; double imageHeight = mBitmap . getHeight ( ) ; double scale = Math . min ( viewWidth / imageWidth , viewHeight / imageHeight ) ; Rect destBounds = new Rect ( 0 , 0 , ( int ) ( imageWidth * scale ) , ( int ) ( imageHeight * scale ) ) ; canvas . drawBitmap ( mBitmap , null , destBounds , null ) ; return scale ; }
draws the bitmap background , scaled to the device size . returns the scale for future use in positioning the facial landmark graphics .
