/packages/apps/DeskClock/src/com/android/alarmclock/ |
H A D | WidgetUtils.java | 49 float ratio = (density * minWidth) / res.getDimension(R.dimen.min_digital_widget_width); 50 ratio = Math.min(ratio, getHeightScaleRatio(context, options, id)); 51 ratio *= .83f; 54 return (ratio > 1f) ? 1f : ratio; 57 ratio = Math.min(ratio, 1.6f); 59 ratio = Math.max(ratio, [all...] |
/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/ |
H A D | EndPointRatioClassifier.java | 20 * A classifier which looks at the ratio between the total length covered by the stroke and the 35 float ratio; 37 ratio = 1.0f; 39 ratio = stroke.getEndPointLength() / stroke.getTotalLength(); 41 return EndPointRatioEvaluator.evaluate(ratio);
|
/packages/apps/Dialer/java/com/android/dialer/callcomposer/util/ |
H A D | BitmapResizer.java | 54 float ratio = 1; 57 ratio = MAX_OUTPUT_RESOLUTION / (float) width; 60 ratio = MAX_OUTPUT_RESOLUTION / (float) height; 66 height * ratio, 67 width * ratio); 69 matrix.postScale(ratio, ratio);
|
/packages/apps/LegacyCamera/src/com/android/camera/ |
H A D | PreviewFrameLayout.java | 28 * A layout which handles the preview aspect ratio. 43 public void setAspectRatio(double ratio) { argument 44 if (ratio <= 0.0) throw new IllegalArgumentException(); 48 ratio = 1 / ratio; 51 if (mAspectRatio != ratio) { 52 mAspectRatio = ratio; 71 // Resize the preview frame with correct aspect ratio.
|
/packages/apps/Camera2/src/com/android/camera/ui/focus/ |
H A D | FocusRing.java | 60 * Set the target radius as a ratio of min to max visible radius 64 public void setRadiusRatio(float ratio); argument
|
H A D | FocusController.java | 132 public void setFocusRatio(final float ratio) { argument 138 mFocusRing.setRadiusRatio(ratio);
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/ |
H A D | LogoUtils.java | 86 int ratio = Math.max(streamWidth / maxDesiredWidth, streamHeight / maxDesiredHeight); 87 if (ratio > 1) { 88 // Decodes a smaller bitmap. Note that this ratio will be rounded down to the nearest 91 bounds.inSampleSize = ratio; 100 * necessary. Keeps the ratio of the original image. 106 double ratio = Math.max((double) width / maxWidth, (double) height / maxHeight); 108 if (ratio > 1) { 109 width /= ratio; 110 height /= ratio;
|
/packages/apps/Camera2/src/com/android/camera/ |
H A D | VideoController.java | 31 public void onZoomChanged(float ratio); argument
|
H A D | VideoUI.java | 151 public void setAspectRatio(float ratio) { argument 152 if (ratio <= 0) { 155 float aspectRatio = ratio > 1 ? ratio : 1 / ratio; 262 public void onZoomValueChanged(float ratio) { argument 263 mController.onZoomChanged(ratio); 297 // recalculate aspect ratio when restarting.
|
H A D | CaptureModuleUI.java | 66 public void onZoomValueChanged(float ratio) { 67 mListener.onZoomRatioChanged(ratio);
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
H A D | KeyDrawParams.java | 136 final int dimens, final float ratio, final int defaultDimens) { 140 if (ResourceUtils.isValidFraction(ratio)) { 141 return (int)(keyHeight * ratio); 146 private static int selectTextSize(final int keyHeight, final float ratio, argument 148 if (ResourceUtils.isValidFraction(ratio)) { 149 return (int)(keyHeight * ratio); 135 selectTextSizeFromDimensionOrRatio(final int keyHeight, final int dimens, final float ratio, final int defaultDimens) argument
|
/packages/apps/PhoneCommon/src/com/android/phone/common/util/ |
H A D | ViewUtil.java | 100 float ratio = width / paint.measureText(textView.getText().toString()); 101 if (ratio <= 1.0f) { 103 Math.max(minTextSize, originalTextSize * ratio));
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/cube/ |
H A D | CubeRenderer.java | 97 float ratio = (float) width / height; 100 gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10);
|
/packages/apps/DocumentsUI/src/com/android/documentsui/selection/ |
H A D | ViewAutoScroller.java | 30 // ratio used to calculate the top/bottom hotspot region; used with view height 102 // Calculate the ratio of how far out of the view the pointer currently resides to 106 // Interpolate this ratio and use it to compute the maximum scroll that should be 117 * Interpolates the given out of bounds ratio on a curve which starts at (0,0) and ends 123 * @param ratio A ratio which is in the range [0, 1]. 126 private float smoothOutOfBoundsRatio(float ratio) { argument 127 return (float) Math.pow(ratio, 10);
|
/packages/apps/Dialer/java/com/android/dialer/util/ |
H A D | ViewUtil.java | 84 float ratio = width / paint.measureText(textView.getText().toString()); 85 if (ratio <= 1.0f) { 87 TypedValue.COMPLEX_UNIT_PX, Math.max(minTextSize, originalTextSize * ratio));
|
/packages/apps/Dialer/java/com/android/incallui/ |
H A D | ContactsAsyncHelper.java | 194 float ratio = ((float) longerEdge) / iconSize; 195 int newWidth = (int) (orgWidth / ratio); 196 int newHeight = (int) (orgHeight / ratio); 206 // It is sure ratio >= 1.0f in any case and thus the newly created Bitmap
|
/packages/apps/LegacyCamera/src/com/android/camera/ui/ |
H A D | RotateImageView.java | 128 float ratio = Math.min((float) width / w, (float) height / h); 129 canvas.scale(ratio, ratio, width / 2.0f, height / 2.0f);
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
H A D | ContactsAsyncHelper.java | 168 float ratio = ((float) longerEdge) / iconSize; 169 int newWidth = (int) (orgWidth / ratio); 170 int newHeight = (int) (orgHeight / ratio); 178 // It is sure ratio >= 1.0f in any case and thus the newly created Bitmap
|
/packages/apps/Camera2/src/com/android/camera/data/ |
H A D | GlideFilmstripManager.java | 200 // Compute a ratio that will keep the number of pixels in the image (hence, 202 double ratio = Math.min(Math.sqrt(maxArea / original.area()), 1.0f); 203 int width = (int) Math.round(original.width() * ratio); 204 int height = (int) Math.round(original.height() * ratio); 206 // If that ratio results in an image where the edge length is still too large, 219 double ratio = widthRatio > heightRatio ? heightRatio : widthRatio; 224 Math.min((int) Math.round(original.width() * ratio), maxSize.width()), 225 Math.min((int) Math.round(original.height() * ratio), maxSize.height()));
|
/packages/apps/Contacts/src/com/android/contacts/widget/ |
H A D | ProportionalLayout.java | 143 public void setRatio(float ratio) { argument 144 mRatio = ratio;
|
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/ |
H A D | GLCanvas.java | 109 // from * (1 - ratio) + to * ratio 112 float ratio, int x, int y, int w, int h); 115 // rectangle. The actual color used is from * (1 - ratio) + to * ratio. 119 float ratio, RectF src, RectF target); 111 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h) argument 118 drawMixed(BasicTexture from, int toColor, float ratio, RectF src, RectF target) argument
|
H A D | GLES11Canvas.java | 449 int toColor, float ratio, int x, int y, int w, int h) { 450 drawMixed(from, toColor, ratio, x, y, w, h, mAlpha); 469 private void setMixedColor(int toColor, float ratio, float alpha) { argument 472 // alpha * ((1 - ratio) * from + ratio * to) 477 // So, we have combo = alpha * (1 - ratio) 478 // and scale = alpha * ratio / (1 - combo) 480 float combo = alpha * (1 - ratio); 481 float scale = alpha * ratio / (1 - combo); 511 public void drawMixed(BasicTexture from, int toColor, float ratio, argument 448 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h) argument 545 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int width, int height, float alpha) argument [all...] |
/packages/apps/TV/src/com/android/tv/util/images/ |
H A D | ImageCache.java | 148 double ratio = ((double) hit) / (hit + miss) * 100; 150 Log.d(TAG, "Memory cache " + hit + "h:" + miss + "m " + ratio + "%");
|
H A D | BitmapUtils.java | 70 final double ratio = maxHeight / (double) maxWidth; 73 if (ratio > bmRatio) { 176 int ratio = Math.max(width / reqWidth, height / reqHeight); 177 return Math.max(1, Integer.highestOneBit(ratio));
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
H A D | PhotoSource.java | 180 float ratio = (outsideRatio / insideRatio < mMaxCropRatio ? 183 while (ratio < 0.5) { 185 ratio *= 2; 203 ratio = Math.max((float) longSide / (float) rawLongSide, 206 if (Math.abs(ratio - 1.0f) > 0.001) { 207 log(TAG, "still too big, scaling down by " + ratio); 208 options.outWidth = (int) (ratio * options.outWidth); 209 options.outHeight = (int) (ratio * options.outHeight);
|