/packages/apps/DeskClock/src/com/android/alarmclock/ |
D | WidgetUtils.java | 49 float ratio = (density * minWidth) / res.getDimension(R.dimen.min_digital_widget_width); in getScaleRatio() local 50 ratio = Math.min(ratio, getHeightScaleRatio(context, options, id)); in getScaleRatio() 51 ratio *= .83f; in getScaleRatio() 54 return (ratio > 1f) ? 1f : ratio; in getScaleRatio() 57 ratio = Math.min(ratio, 1.6f); in getScaleRatio() 59 ratio = Math.max(ratio, .71f); in getScaleRatio() 62 ratio = Math.max(ratio, .45f); in getScaleRatio() 64 return ratio; in getScaleRatio() 87 float ratio = density * minHeight / res.getDimension(R.dimen.min_digital_widget_height); in getHeightScaleRatio() local 89 return ratio * 1.75f; in getHeightScaleRatio() [all …]
|
D | WidgetUtils.kt | 44 var ratio: Float = in getScaleRatio() variable 46 ratio = Math.min(ratio, getHeightScaleRatio(context, it)) in getScaleRatio() 47 ratio *= .83f in getScaleRatio() 50 return if (ratio > 1f) 1f else ratio in getScaleRatio() 53 ratio = Math.min(ratio, 1.6f) in getScaleRatio() 54 ratio = if (Utils.isPortrait(context)) { in getScaleRatio() 55 Math.max(ratio, .71f) in getScaleRatio() 57 Math.max(ratio, .45f) in getScaleRatio() 59 return ratio in getScaleRatio() 73 val ratio: Float = density * minHeight / res.getDimension(R.dimen.min_digital_widget_height) in getHeightScaleRatio() constant [all …]
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/util/ |
D | BitmapResizer.java | 54 float ratio = 1; in resizeForEnrichedCalling() local 57 ratio = MAX_OUTPUT_RESOLUTION / (float) width; in resizeForEnrichedCalling() 60 ratio = MAX_OUTPUT_RESOLUTION / (float) height; in resizeForEnrichedCalling() 66 height * ratio, in resizeForEnrichedCalling() 67 width * ratio); in resizeForEnrichedCalling() 69 matrix.postScale(ratio, ratio); in resizeForEnrichedCalling()
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
D | LogoUtils.java | 86 int ratio = Math.max(streamWidth / maxDesiredWidth, streamHeight / maxDesiredHeight); in getBitmapPartiallyResized() local 87 if (ratio > 1) { in getBitmapPartiallyResized() 91 bounds.inSampleSize = ratio; in getBitmapPartiallyResized() 106 double ratio = Math.max((double) width / maxWidth, (double) height / maxHeight); in resizeBitmap() local 108 if (ratio > 1) { in resizeBitmap() 109 width /= ratio; in resizeBitmap() 110 height /= ratio; in resizeBitmap()
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
D | PreviewFrameLayout.java | 43 public void setAspectRatio(double ratio) { in setAspectRatio() argument 44 if (ratio <= 0.0) throw new IllegalArgumentException(); in setAspectRatio() 48 ratio = 1 / ratio; in setAspectRatio() 51 if (mAspectRatio != ratio) { in setAspectRatio() 52 mAspectRatio = ratio; in setAspectRatio()
|
/packages/apps/Camera2/src/com/android/camera/ |
D | VideoUI.java | 151 public void setAspectRatio(float ratio) { in setAspectRatio() argument 152 if (ratio <= 0) { in setAspectRatio() 155 float aspectRatio = ratio > 1 ? ratio : 1 / ratio; in setAspectRatio() 262 public void onZoomValueChanged(float ratio) { in onZoomValueChanged() argument 263 mController.onZoomChanged(ratio); in onZoomValueChanged()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | KeyDrawParams.java | 136 final int dimens, final float ratio, final int defaultDimens) { in selectTextSizeFromDimensionOrRatio() argument 140 if (ResourceUtils.isValidFraction(ratio)) { in selectTextSizeFromDimensionOrRatio() 141 return (int)(keyHeight * ratio); in selectTextSizeFromDimensionOrRatio() 146 private static int selectTextSize(final int keyHeight, final float ratio, in selectTextSize() argument 148 if (ResourceUtils.isValidFraction(ratio)) { in selectTextSize() 149 return (int)(keyHeight * ratio); in selectTextSize()
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | PhotoSource.java | 180 float ratio = (outsideRatio / insideRatio < mMaxCropRatio ? in load() local 183 while (ratio < 0.5) { in load() 185 ratio *= 2; in load() 203 ratio = Math.max((float) longSide / (float) rawLongSide, in load() 206 if (Math.abs(ratio - 1.0f) > 0.001) { in load() 207 log(TAG, "still too big, scaling down by " + ratio); in load() 208 options.outWidth = (int) (ratio * options.outWidth); in load() 209 options.outHeight = (int) (ratio * options.outHeight); in load()
|
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/ |
D | EndPointRatioClassifier.java | 35 float ratio; in getFalseTouchEvaluation() local 37 ratio = 1.0f; in getFalseTouchEvaluation() 39 ratio = stroke.getEndPointLength() / stroke.getTotalLength(); in getFalseTouchEvaluation() 41 return EndPointRatioEvaluator.evaluate(ratio); in getFalseTouchEvaluation()
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
D | GLES11Canvas.java | 449 int toColor, float ratio, int x, int y, int w, int h) { in drawMixed() argument 450 drawMixed(from, toColor, ratio, x, y, w, h, mAlpha); in drawMixed() 469 private void setMixedColor(int toColor, float ratio, float alpha) { in setMixedColor() argument 480 float combo = alpha * (1 - ratio); in setMixedColor() 481 float scale = alpha * ratio / (1 - combo); in setMixedColor() 511 public void drawMixed(BasicTexture from, int toColor, float ratio, in drawMixed() argument 515 if (ratio <= 0.01f) { in drawMixed() 518 } else if (ratio >= 1) { in drawMixed() 538 setMixedColor(toColor, ratio, alpha); in drawMixed() 546 float ratio, int x, int y, int width, int height, float alpha) { in drawMixed() argument [all …]
|
D | GLCanvas.java | 112 float ratio, int x, int y, int w, int h); in drawMixed() argument 119 float ratio, RectF src, RectF target); in drawMixed() argument
|
/packages/apps/Camera2/src/com/android/camera/data/ |
D | GlideFilmstripManager.java | 202 double ratio = Math.min(Math.sqrt(maxArea / original.area()), 1.0f); in clampSize() local 203 int width = (int) Math.round(original.width() * ratio); in clampSize() 204 int height = (int) Math.round(original.height() * ratio); in clampSize() 219 double ratio = widthRatio > heightRatio ? heightRatio : widthRatio; in computeFitWithinSize() local 224 Math.min((int) Math.round(original.width() * ratio), maxSize.width()), in computeFitWithinSize() 225 Math.min((int) Math.round(original.height() * ratio), maxSize.height())); in computeFitWithinSize()
|
/packages/apps/TV/src/com/android/tv/util/ |
D | Utils.java | 524 for (AspectRatio ratio : AspectRatio.values()) { in getAspectRatioString() 525 if (Math.abs((float) ratio.height / ratio.width - (float) height / width) < 0.05f) { in getAspectRatioString() 526 return ratio.toString(); in getAspectRatioString() 537 for (AspectRatio ratio : AspectRatio.values()) { in getAspectRatioString() 538 if (Math.abs((float) ratio.width / ratio.height - videoDisplayAspectRatio) < 0.05f) { in getAspectRatioString() 539 return ratio.toString(); in getAspectRatioString()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/cube/ |
D | CubeRenderer.java | 97 float ratio = (float) width / height; in onSurfaceChanged() local 100 gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10); in onSurfaceChanged()
|
/packages/apps/PhoneCommon/src/com/android/phone/common/util/ |
D | ViewUtil.java | 100 float ratio = width / paint.measureText(textView.getText().toString()); in resizeText() local 101 if (ratio <= 1.0f) { in resizeText() 103 Math.max(minTextSize, originalTextSize * ratio)); in resizeText()
|
/packages/apps/Settings/src/com/android/settings/wifi/qrcode/ |
D | QrCamera.java | 381 double ratio = getRatio(size.width, size.height); in getBestPreviewSize() local 384 || Math.abs(ratio - winRatio) / winRatio <= minRatioDiffPercent)) { in getBestPreviewSize() 402 double ratio = getRatio(size.width, size.height); in getBestPictureSize() local 403 if (ratio == previewRatio) { in getBestPictureSize() 405 } else if (Math.abs(ratio - previewRatio) < MAX_RATIO_DIFF) { in getBestPictureSize()
|
/packages/apps/Dialer/java/com/android/dialer/util/ |
D | ViewUtil.java | 81 float ratio = width / paint.measureText(textView.getText().toString()); in resizeText() local 82 if (ratio <= 1.0f) { in resizeText() 84 TypedValue.COMPLEX_UNIT_PX, Math.max(minTextSize, originalTextSize * ratio)); in resizeText()
|
/packages/apps/TV/src/com/android/tv/util/images/ |
D | BitmapUtils.java | 73 final double ratio = maxHeight / (double) maxWidth; in calculateNewSize() local 76 if (ratio > bmRatio) { in calculateNewSize() 192 int ratio = Math.max(width / reqWidth, height / reqHeight); in calculateInSampleSize() local 193 return Math.max(1, Integer.highestOneBit(ratio)); in calculateInSampleSize()
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
D | MultiShrinkScroller.java | 199 void onTransparentViewHeightChange(float ratio); in onTransparentViewHeightChange() argument 1077 final float ratio = (toolbarHeight - mMinimumHeaderHeight) in updateHeaderTextSizeAndMargin() local 1080 float bezierOutput = mTextSizePathInterpolator.getInterpolation(ratio); in updateHeaderTextSizeAndMargin() 1183 final float ratio = calculateHeightRatioToBlendingStartHeight(toolbarHeight); in updatePhotoTintAndDropShadow() local 1184 final float alpha = 1.0f - (float) Math.min(Math.pow(ratio, 1.5f) * 2f, 1f); in updatePhotoTintAndDropShadow() 1185 final float tint = (float) Math.min(Math.pow(ratio, 1.5f) * 3f, 1f); in updatePhotoTintAndDropShadow() 1199 final float ratio = calculateHeightRatioToFullyOpen(toolbarHeight); in updatePhotoTintAndDropShadow() local 1205 float linearBeforeIntermediate = Math.max(1 - (1 - ratio) / intermediateRatio in updatePhotoTintAndDropShadow()
|
/packages/apps/Dialer/java/com/android/incallui/ |
D | ContactsAsyncHelper.java | 194 float ratio = ((float) longerEdge) / iconSize; in getPhotoIconWhenAppropriate() local 195 int newWidth = (int) (orgWidth / ratio); in getPhotoIconWhenAppropriate() 196 int newHeight = (int) (orgHeight / ratio); in getPhotoIconWhenAppropriate()
|
/packages/apps/LegacyCamera/src/com/android/camera/ui/ |
D | RotateImageView.java | 128 float ratio = Math.min((float) width / w, (float) height / h); in onDraw() local 129 canvas.scale(ratio, ratio, width / 2.0f, height / 2.0f); in onDraw()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | ContactsAsyncHelper.java | 179 float ratio = ((float) longerEdge) / iconSize; in getPhotoIconWhenAppropriate() local 180 int newWidth = (int) (orgWidth / ratio); in getPhotoIconWhenAppropriate() 181 int newHeight = (int) (orgHeight / ratio); in getPhotoIconWhenAppropriate()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | ViewAutoScroller.java | 125 private float smoothOutOfBoundsRatio(float ratio) { in smoothOutOfBoundsRatio() argument 126 return (float) Math.pow(ratio, 10); in smoothOutOfBoundsRatio()
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
D | PreviewOverlay.java | 100 void onZoomValueChanged(float ratio); // only for immediate zoom in onZoomValueChanged() argument 322 public void setZoom(float ratio) { in setZoom() argument 323 mCurrentRatio = ratio; in setZoom()
|
/packages/apps/Camera2/src/com/android/camera/ui/focus/ |
D | FocusController.java | 132 public void setFocusRatio(final float ratio) { in setFocusRatio() argument 138 mFocusRing.setRadiusRatio(ratio); in setFocusRatio()
|