Пример #1
0
 private static float d(float f, Rect rect, float f2, float f3) {
   float f4 = Float.NEGATIVE_INFINITY;
   if (((float) rect.bottom) - f < f2) {
     return (float) rect.bottom;
   }
   float a =
       f <= TOP.a() + BitmapDescriptorFactory.HUE_YELLOW
           ? TOP.a() + BitmapDescriptorFactory.HUE_YELLOW
           : Float.NEGATIVE_INFINITY;
   if ((f - TOP.a()) * f3 <= BitmapDescriptorFactory.HUE_YELLOW) {
     f4 = TOP.a() + (BitmapDescriptorFactory.HUE_YELLOW / f3);
   }
   return Math.max(f, Math.max(f4, a));
 }
Пример #2
0
 private static float d(float f, Rect rect, float f2, float f3) {
   float f4 = Float.NEGATIVE_INFINITY;
   if (((float) rect.bottom) - f < f2) {
     return (float) rect.bottom;
   }
   float a;
   if (f <= TOP.a() + 40.0f) {
     a = TOP.a() + 40.0f;
   } else {
     a = Float.NEGATIVE_INFINITY;
   }
   if ((f - TOP.a()) * f3 <= 40.0f) {
     f4 = TOP.a() + (40.0f / f3);
   }
   return Math.max(f, Math.max(f4, a));
 }
Пример #3
0
    /**
     * @param latexToken The latex token to test.
     * @return The TextPosition enumeration item corresponding to the given latex token.
     * @since 3.0
     */
    public static TextPosition getTextPosition(final String latexToken) {
      if (BOT.getLatexToken().equals(latexToken)) return BOT;
      if (BOT_LEFT.getLatexToken().equals(latexToken)) return BOT_LEFT;
      if (BOT_RIGHT.getLatexToken().equals(latexToken)) return BOT_RIGHT;
      if (TOP.getLatexToken().equals(latexToken)) return TOP;
      if (TOP_LEFT.getLatexToken().equals(latexToken)) return TOP_LEFT;
      if (TOP_RIGHT.getLatexToken().equals(latexToken)) return TOP_RIGHT;

      return null;
    }
Пример #4
0
 @Override
 protected A_Type privateBlockTypeRestriction() {
   return FunctionTypeDescriptor.create(
       TupleDescriptor.from(
           RAW_POJO.o(),
           TupleTypeDescriptor.mostGeneralType(),
           TupleTypeDescriptor.zeroOrMoreOf(RAW_POJO.o()),
           InstanceMetaDescriptor.topMeta()),
       TOP.o());
 }
Пример #5
0
 @Override
 protected A_Type privateBlockTypeRestriction() {
   return FunctionTypeDescriptor.create(
       TupleDescriptor.from(
           ATOM.o(),
           MapTypeDescriptor.mapTypeForSizesKeyTypeValueType(
               IntegerRangeTypeDescriptor.inclusive(
                   IntegerDescriptor.zero(), IntegerDescriptor.fromInt(socketOptions.length - 1)),
               IntegerRangeTypeDescriptor.inclusive(
                   IntegerDescriptor.one(), IntegerDescriptor.fromInt(socketOptions.length - 1)),
               ANY.o())),
       TOP.o());
 }
Пример #6
0
 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:
   }
 }
Пример #7
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;
   }
 }
Пример #8
0
 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;
 }
Пример #9
0
 public static float c() {
   return BOTTOM.a() - TOP.a();
 }
Пример #10
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;
 }