private void applyZoom(float zoomRate, int axis) {
   zoomRate = Math.max(zoomRate, 0.9f);
   zoomRate = Math.min(zoomRate, 1.1f);
   if (zoomRate > 0.9 && zoomRate < 1.1) {
     mPinchZoom.setZoomRate(zoomRate);
     mPinchZoom.apply(axis);
   }
 }
Beispiel #2
0
 /**
  * Builds the zoom tool.
  *
  * @param chart the chart
  * @param in zoom in or out
  * @param rate the zoom rate
  */
 public Zoom(AbstractChart chart, boolean in, float rate) {
   super(chart);
   mZoomIn = in;
   setZoomRate(rate);
 }