Lines Matching defs:aspectRatio
82 public Float aspectRatio;
136 sortedDesiredAspectRatios.add(buckets.get(0).aspectRatio.floatValue());
141 Float aspectRatio = bucket.aspectRatio;
142 if (Arrays.asList(sDesiredAspectRatios).contains(aspectRatio)
143 && !sortedDesiredAspectRatios.contains(aspectRatio)) {
144 sortedDesiredAspectRatios.add(aspectRatio);
151 Number aspectRatio = bucket.aspectRatio;
152 if (Math.abs(aspectRatio.floatValue() - targetRatio) <= ASPECT_RATIO_TOLERANCE) {
217 * @param aspectRatio the aspect ratio to fuzz
221 private static float fuzzAspectRatio(float aspectRatio) {
223 if ((Math.abs(aspectRatio - desiredAspectRatio)) < ASPECT_RATIO_TOLERANCE) {
227 return aspectRatio;
244 Float aspectRatio = (float) size.getWidth() / (float) size.getHeight();
247 aspectRatio = fuzzAspectRatio(aspectRatio);
248 ResolutionBucket bucket = aspectRatioToBuckets.get(aspectRatio);
251 bucket.aspectRatio = aspectRatio;
252 aspectRatioToBuckets.put(aspectRatio, bucket);
277 Size aspectRatio = reduce(size);
278 return aspectRatio.width() + "x" + aspectRatio.height();
285 * @param aspectRatio the aspect ratio to reduce
288 public static Size reduce(Size aspectRatio) {
289 BigInteger width = BigInteger.valueOf(aspectRatio.width());
290 BigInteger height = BigInteger.valueOf(aspectRatio.height());
304 Size aspectRatio = reduce(size);
305 return aspectRatio.width();
317 Size aspectRatio = reduce(size);
321 aspectRatio = sDesiredAspectRatioSizes[index];
323 return aspectRatio;
393 Rational aspectRatio = getAspectRatio(size);
395 if (!hasSameAspectRatio(aspectRatio, desiredAspectRatio)) {