/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.
|
H A D | Util.java | 397 // Try to find an size match aspect ratio and size 399 double ratio = (double) size.width / size.height; 400 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; 407 // Cannot find the one match the aspect ratio. This should not happen. 410 Log.w(TAG, "No preview size match the aspect ratio"); 422 // Returns the largest picture size which matches the given aspect ratio. 431 // Try to find a size matches aspect ratio and has the largest width 433 double ratio = (double) size.width / size.height; 434 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; 440 // Cannot find one that matches the aspect ratio [all...] |
/packages/apps/DeskClock/src/com/android/alarmclock/ |
H A D | WidgetUtils.java | 60 float ratio = (density * minWidth) / res.getDimension(R.dimen.min_digital_widget_width); 65 ratio = Math.min(ratio, getHeightScaleRatio(context, options, id)); 67 return (ratio > 1) ? 1 : ratio; 92 // Ensure divisor for ratio is positive number 94 float ratio = ((density * minHeight) - lblBox) 96 return (ratio > 1) ? 1 : ratio;
|
H A D | DigitalAppWidgetProvider.java | 96 float ratio = WidgetUtils.getScaleRatio(context, null, appWidgetId); 98 WidgetUtils.setClockSize(context, widget, ratio); 140 float ratio = WidgetUtils.getScaleRatio(context, null, appWidgetId); 141 updateClock(context, appWidgetManager, appWidgetId, ratio); 151 float ratio = WidgetUtils.getScaleRatio(context, newOptions, appWidgetId); 153 updateClock(context, widgetManager, appWidgetId, ratio); 157 Context context, AppWidgetManager appWidgetManager, int appWidgetId, float ratio) { 172 WidgetUtils.setClockSize(context, widget, ratio); 156 updateClock( Context context, AppWidgetManager appWidgetManager, int appWidgetId, float ratio) argument
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
H A D | KeyDrawParams.java | 117 final int dimens, final float ratio, final int defaultDimens) { 121 if (ResourceUtils.isValidFraction(ratio)) { 122 return (int)(keyHeight * ratio); 127 private static final int selectTextSize(final int keyHeight, final float ratio, argument 129 if (ResourceUtils.isValidFraction(ratio)) { 130 return (int)(keyHeight * ratio); 116 selectTextSizeFromDimensionOrRatio(final int keyHeight, final int dimens, final float ratio, final int defaultDimens) argument
|
/packages/apps/Camera/src/com/android/camera/ |
H A D | PreviewFrameLayout.java | 31 * A layout which handles the preview aspect ratio. 67 public void setAspectRatio(double ratio) { argument 68 if (ratio <= 0.0) throw new IllegalArgumentException(); 70 if (mAspectRatio != ratio) { 71 mAspectRatio = ratio; 94 // Resize the preview frame with correct aspect ratio.
|
H A D | Util.java | 453 // Try to find an size match aspect ratio and size 455 double ratio = (double) size.width / size.height; 456 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; 462 // Cannot find the one match the aspect ratio. This should not happen. 465 Log.w(TAG, "No preview size match the aspect ratio"); 477 // Returns the largest picture size which matches the given aspect ratio. 486 // Try to find a size matches aspect ratio and has the largest width 488 double ratio = (double) size.width / size.height; 489 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; 495 // Cannot find one that matches the aspect ratio [all...] |
/packages/apps/Camera/src/com/android/camera/ui/ |
H A D | RotateImageView.java | 130 float ratio = Math.min((float) width / w, (float) height / h); 131 canvas.scale(ratio, ratio, width / 2.0f, height / 2.0f);
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
H A D | RotateImageView.java | 130 float ratio = Math.min((float) width / w, (float) height / h); 131 canvas.scale(ratio, ratio, width / 2.0f, height / 2.0f);
|
/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/apps/ContactsCommon/src/com/android/contacts/common/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 | 451 int toColor, float ratio, int x, int y, int w, int h) { 452 drawMixed(from, toColor, ratio, x, y, w, h, mAlpha); 471 private void setMixedColor(int toColor, float ratio, float alpha) { argument 474 // alpha * ((1 - ratio) * from + ratio * to) 479 // So, we have combo = alpha * (1 - ratio) 480 // and scale = alpha * ratio / (1 - combo) 482 float combo = alpha * (1 - ratio); 483 float scale = alpha * ratio / (1 - combo); 513 public void drawMixed(BasicTexture from, int toColor, float ratio, argument 450 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h) argument 547 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int width, int height, float alpha) argument [all...] |
H A D | TiledTexture.java | 275 // a rectangle. The used color is: from * (1 - ratio) + to * ratio. 276 public void drawMixed(GLCanvas canvas, int color, float ratio, argument 289 canvas.drawMixed(t, color, ratio, mSrcRect, mDestRect);
|
/packages/apps/Launcher3/WallpaperPicker/src/com/android/gallery3d/glrenderer/ |
H A D | GLCanvas.java | 107 // from * (1 - ratio) + to * ratio 110 float ratio, int x, int y, int w, int h); 113 // rectangle. The actual color used is from * (1 - ratio) + to * ratio. 117 float ratio, RectF src, RectF target); 109 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h) argument 116 drawMixed(BasicTexture from, int toColor, float ratio, RectF src, RectF target) argument
|
/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);
|
/packages/wallpapers/HoloSpiral/src/com/android/wallpaper/holospiral/ |
H A D | HoloSpiralView.java | 130 float ratio = realPosition / (mWallpaperWidth * 4); 131 mWallpaperRS.setOffset(ratio, 0, 0, 0);
|
/packages/apps/InCallUI/src/com/android/incallui/ |
H A D | ContactsAsyncHelper.java | 251 float ratio = ((float) longerEdge) / iconSize; 252 int newWidth = (int) (orgWidth / ratio); 253 int newHeight = (int) (orgHeight / ratio); 261 // It is sure ratio >= 1.0f in any case and thus the newly created Bitmap
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
H A D | Utilities.java | 121 final float ratio = (float) sourceWidth / sourceHeight; 123 height = (int) (width / ratio); 125 width = (int) (height * ratio);
|
/packages/apps/Mms/src/com/android/mms/ui/ |
H A D | SlideshowPresenter.java | 77 // The ratio indicates how to reduce the source to match the View, 79 float ratio = mWidthTransformRatio > mHeightTransformRatio ? 81 mWidthTransformRatio = ratio; 82 mHeightTransformRatio = ratio;
|
/packages/services/Telephony/src/com/android/phone/ |
H A D | ContactsAsyncHelper.java | 282 float ratio = ((float) longerEdge) / iconSize; 283 int newWidth = (int) (orgWidth / ratio); 284 int newHeight = (int) (orgHeight / ratio); 292 // It is sure ratio >= 1.0f in any case and thus the newly created Bitmap
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
H A D | AttachmentTile.java | 177 // ratio of the image 178 final float ratio = Math.min((float) width / height, (float) height / width); 184 ratio < skinnyThresholdRatio &&
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
H A D | Utilities.java | 155 final float ratio = (float) sourceWidth / sourceHeight; 157 height = (int) (width / ratio); 159 width = (int) (height * ratio);
|
/packages/apps/Settings/src/com/android/settings/ |
H A D | ActivityPicker.java | 379 final float ratio = (float) iconWidth / iconHeight; 382 height = (int) (width / ratio); 384 width = (int) (height * ratio);
|
/packages/apps/Camera2/src/com/android/camera/util/ |
H A D | CameraUtil.java | 508 // Try to find an size match aspect ratio and size 511 double ratio = (double) size.x / size.y; 512 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; 518 // Cannot find the one match the aspect ratio. This should not happen. 521 Log.w(TAG, "No preview size match the aspect ratio"); 534 // Returns the largest picture size which matches the given aspect ratio. 543 // Try to find a size matches aspect ratio and has the largest width 545 double ratio = (double) size.width / size.height; 546 if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; 552 // Cannot find one that matches the aspect ratio [all...] |