title: Android: Determine Coordinates of Viewable Area when Scaling
body: <p>I have an app that allows the user to scale in for a closer view of a custom View using the ScaleGestureDetector.</p>
  
  <p>What I would like to do is show the user a thumbnail of the larger screen when they are zoomed in.  I'd like to show the thumbnail anchored to the bottom left corner of the visible area of the View, such that as the user scales in, the thumbnail stays visible.  </p>
  
  <p>My problem is that while I am able to determine when I should be showing the thumbnail in my View's onDraw() method, I can't figure out how to anchor the shape I wish to draw (a translucent Rect) in the visible corner.  No problem drawing it to the canvas using absolute coordinates, but as soon as I scale in, it stays in the absolute corner.</p>
  
  <p>I do track the current scaling factor as well as the scaling center (x,y), so I could likely do some calculations relating to the known window size, and these values to determine the corner, but just wondering if there are any routines or better ways to handle this.</p>
  
  <p>Thanks for any info,</p>
  
  <p>Paul</p>