Exemplo n.º 1
0
 @Override
 public Rect tbsGetVisibleRect() {
   Rect visible = new Rect(-mX, -mY, 2560, 1600);
   visible.intersect(new Rect(0, 0, mWidth, mHeight));
   float scale = mWidth / (float) mContentsRect.getWidth();
   visible.setLeft((int) (visible.getLeft() / scale));
   visible.setTop((int) (visible.getTop() / scale));
   visible.setWidth((int) (visible.getWidth() / scale));
   visible.setHeight((int) (visible.getHeight() / scale));
   return visible;
 }