Exemple #1
0
 private float getScrollScaleRatio() {
   final Page page = pages.get(0);
   if (page == null || page.bounds == null) {
     return 0;
   }
   final float v = zoomModel.getZoom();
   return getWidth() * v / page.bounds.width();
 }
Exemple #2
0
 void invalidatePageSizes() {
   if (!isInitialized) {
     return;
   }
   float heightAccum = 0;
   int width = getWidth();
   float zoom = zoomModel.getZoom();
   for (int i = 0; i < pages.size(); i++) {
     Page page = pages.get(i);
     float pageHeight = page.getPageHeight(width, zoom);
     page.setBounds(new RectF(0, heightAccum, width * zoom, heightAccum + pageHeight));
     heightAccum += pageHeight;
   }
 }
Exemple #3
0
 private int getRightLimit() {
   return (int) (getWidth() * zoomModel.getZoom()) - getWidth();
 }