code: public void zoomCenteredTo(float zoom, PointF pivot) {
          float dzoom = zoom / this.zoom;
          zoomTo(zoom);
          float baseX = currentXOffset * dzoom;
          float baseY = currentYOffset * dzoom;
          baseX += (pivot.x - pivot.x * dzoom);
          baseY += (pivot.y - pivot.y * dzoom);
          moveTo(baseX, baseY);
      }
docs: Change the zoom level, relatively to a pivot point.
  It will call moveTo() to make sure the given point stays
  in the middle of the screen.
  @param zoom  The zoom level.
  @param pivot The point on the screen that should stays.