예제 #1
0
 private static float b(float f, Rect rect, float f2, float f3) {
   float f4 = Float.NEGATIVE_INFINITY;
   if (((float) rect.right) - f < f2) {
     return (float) rect.right;
   }
   float a =
       f <= LEFT.a() + BitmapDescriptorFactory.HUE_YELLOW
           ? LEFT.a() + BitmapDescriptorFactory.HUE_YELLOW
           : Float.NEGATIVE_INFINITY;
   if ((f - LEFT.a()) / f3 <= BitmapDescriptorFactory.HUE_YELLOW) {
     f4 = LEFT.a() + (BitmapDescriptorFactory.HUE_YELLOW * f3);
   }
   return Math.max(f, Math.max(a, f4));
 }
예제 #2
0
파일: vf.java 프로젝트: sheytoon/Fanoos
 private static float b(float f, Rect rect, float f2, float f3) {
   float f4 = Float.NEGATIVE_INFINITY;
   if (((float) rect.right) - f < f2) {
     return (float) rect.right;
   }
   float a;
   if (f <= LEFT.a() + 40.0f) {
     a = LEFT.a() + 40.0f;
   } else {
     a = Float.NEGATIVE_INFINITY;
   }
   if ((f - LEFT.a()) / f3 <= 40.0f) {
     f4 = LEFT.a() + (40.0f * f3);
   }
   return Math.max(f, Math.max(a, f4));
 }
예제 #3
0
파일: vf.java 프로젝트: sheytoon/Fanoos
 public void c(float f) {
   float a = LEFT.a();
   float a2 = TOP.a();
   float a3 = RIGHT.a();
   float a4 = BOTTOM.a();
   switch (vg.a[ordinal()]) {
     case ve.CropImageView_fixAspectRatio /*1*/:
       this.e = vo.b(a2, a3, a4, f);
     case ve.CropImageView_aspectRatioX /*2*/:
       this.e = vo.c(a, a3, a4, f);
     case ve.CropImageView_aspectRatioY /*3*/:
       this.e = vo.d(a, a2, a4, f);
     case ve.CropImageView_imageResource /*4*/:
       this.e = vo.e(a, a2, a3, f);
     default:
   }
 }
예제 #4
0
 public void c(float f) {
   float a = LEFT.a();
   float a2 = TOP.a();
   float a3 = RIGHT.a();
   float a4 = BOTTOM.a();
   switch (b.a[ordinal()]) {
     case l.a /*1*/:
       this.f = com.edmodo.cropper.a.a.b(a2, a3, a4, f);
       return;
     case kankan.wheel.widget.a.k /*2*/:
       this.f = com.edmodo.cropper.a.a.c(a, a3, a4, f);
       return;
     case kankan.wheel.widget.a.l /*3*/:
       this.f = com.edmodo.cropper.a.a.d(a, a2, a4, f);
       return;
     case kankan.wheel.widget.a.aQ /*4*/:
       this.f = com.edmodo.cropper.a.a.e(a, a2, a3, f);
       return;
     default:
       return;
   }
 }
예제 #5
0
파일: vf.java 프로젝트: sheytoon/Fanoos
 public boolean a(vf vfVar, Rect rect, float f) {
   float b = vfVar.b(rect);
   float f2;
   float a;
   float a2;
   float f3;
   switch (vg.a[ordinal()]) {
     case ve.CropImageView_fixAspectRatio /*1*/:
       if (vfVar.equals(TOP)) {
         f2 = (float) rect.top;
         a = BOTTOM.a() - b;
         a2 = RIGHT.a();
         return a(f2, vo.b(f2, a2, a, f), a, a2, rect);
       } else if (vfVar.equals(BOTTOM)) {
         a = (float) rect.bottom;
         f2 = TOP.a() - b;
         a2 = RIGHT.a();
         return a(f2, vo.b(f2, a2, a, f), a, a2, rect);
       }
       break;
     case ve.CropImageView_aspectRatioX /*2*/:
       if (vfVar.equals(LEFT)) {
         f3 = (float) rect.left;
         a2 = RIGHT.a() - b;
         a = BOTTOM.a();
         return a(vo.c(f3, a2, a, f), f3, a, a2, rect);
       } else if (vfVar.equals(RIGHT)) {
         a2 = (float) rect.right;
         f3 = LEFT.a() - b;
         a = BOTTOM.a();
         return a(vo.c(f3, a2, a, f), f3, a, a2, rect);
       }
       break;
     case ve.CropImageView_aspectRatioY /*3*/:
       if (vfVar.equals(TOP)) {
         f2 = (float) rect.top;
         a = BOTTOM.a() - b;
         f3 = LEFT.a();
         return a(f2, f3, a, vo.d(f3, f2, a, f), rect);
       } else if (vfVar.equals(BOTTOM)) {
         a = (float) rect.bottom;
         f2 = TOP.a() - b;
         f3 = LEFT.a();
         return a(f2, f3, a, vo.d(f3, f2, a, f), rect);
       }
       break;
     case ve.CropImageView_imageResource /*4*/:
       if (vfVar.equals(LEFT)) {
         f3 = (float) rect.left;
         a2 = RIGHT.a() - b;
         f2 = TOP.a();
         return a(f2, f3, vo.e(f3, f2, a2, f), a2, rect);
       } else if (vfVar.equals(RIGHT)) {
         a2 = (float) rect.right;
         f3 = LEFT.a() - b;
         f2 = TOP.a();
         return a(f2, f3, vo.e(f3, f2, a2, f), a2, rect);
       }
       break;
   }
   return true;
 }
예제 #6
0
파일: vf.java 프로젝트: sheytoon/Fanoos
 public static float b() {
   return RIGHT.a() - LEFT.a();
 }
예제 #7
0
 public boolean a(a aVar, Rect rect, float f) {
   float b = aVar.b(rect);
   float f2;
   float a;
   float a2;
   float f3;
   switch (b.a[ordinal()]) {
     case l.a /*1*/:
       if (aVar.equals(TOP)) {
         f2 = (float) rect.top;
         a = BOTTOM.a() - b;
         a2 = RIGHT.a();
         return a(f2, com.edmodo.cropper.a.a.b(f2, a2, a, f), a, a2, rect);
       } else if (aVar.equals(BOTTOM)) {
         a = (float) rect.bottom;
         f2 = TOP.a() - b;
         a2 = RIGHT.a();
         return a(f2, com.edmodo.cropper.a.a.b(f2, a2, a, f), a, a2, rect);
       }
       break;
     case kankan.wheel.widget.a.k /*2*/:
       if (aVar.equals(LEFT)) {
         f3 = (float) rect.left;
         a2 = RIGHT.a() - b;
         a = BOTTOM.a();
         return a(com.edmodo.cropper.a.a.c(f3, a2, a, f), f3, a, a2, rect);
       } else if (aVar.equals(RIGHT)) {
         a2 = (float) rect.right;
         f3 = LEFT.a() - b;
         a = BOTTOM.a();
         return a(com.edmodo.cropper.a.a.c(f3, a2, a, f), f3, a, a2, rect);
       }
       break;
     case kankan.wheel.widget.a.l /*3*/:
       if (aVar.equals(TOP)) {
         f2 = (float) rect.top;
         a = BOTTOM.a() - b;
         f3 = LEFT.a();
         return a(f2, f3, a, com.edmodo.cropper.a.a.d(f3, f2, a, f), rect);
       } else if (aVar.equals(BOTTOM)) {
         a = (float) rect.bottom;
         f2 = TOP.a() - b;
         f3 = LEFT.a();
         return a(f2, f3, a, com.edmodo.cropper.a.a.d(f3, f2, a, f), rect);
       }
       break;
     case kankan.wheel.widget.a.aQ /*4*/:
       if (aVar.equals(LEFT)) {
         f3 = (float) rect.left;
         a2 = RIGHT.a() - b;
         f2 = TOP.a();
         return a(f2, f3, com.edmodo.cropper.a.a.e(f3, f2, a2, f), a2, rect);
       } else if (aVar.equals(RIGHT)) {
         a2 = (float) rect.right;
         f3 = LEFT.a() - b;
         f2 = TOP.a();
         return a(f2, f3, com.edmodo.cropper.a.a.e(f3, f2, a2, f), a2, rect);
       }
       break;
   }
   return true;
 }