/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/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(); 72 ratio = 1 / ratio; 75 if (mAspectRatio != ratio) { 76 mAspectRatio = ratio; 98 // 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/DeskClock/src/com/android/alarmclock/ |
H A D | WidgetUtils.java | 53 float ratio = minWidth / res.getDimension(R.dimen.def_digital_widget_width); 54 return (ratio > 1) ? 1 : ratio; 72 float ratio = minHeight / res.getDimension(R.dimen.def_digital_widget_height); 73 return (ratio > 1) ? 1 : ratio;
|
H A D | DigitalAppWidgetProvider.java | 52 float ratio = WidgetUtils.getScaleRatio(ctxt, null, appWidgetId); 53 updateClock(ctxt, appWidgetManager, appWidgetId, ratio); 63 float ratio = WidgetUtils.getScaleRatio(context, newOptions, appWidgetId); 65 updateClock(context, widgetManager, appWidgetId, ratio); 73 Context c, AppWidgetManager appWidgetManager, int appWidgetId, float ratio) { 78 WidgetUtils.setClockSize(c, widget, ratio); 72 updateClock( Context c, AppWidgetManager appWidgetManager, int appWidgetId, float ratio) argument
|
H A D | DigitalWidgetViewsFactory.java | 273 float ratio = WidgetUtils.getScaleRatio(context, null, mId); 274 WidgetUtils.setClockSize(context, widget, ratio);
|
/packages/apps/Gallery2/tests/src/com/android/gallery3d/ui/ |
H A D | GLCanvasMock.java | 64 float ratio, int x, int y, int w, int h) { 66 mDrawMixedRatio = ratio; 63 drawMixed(BasicTexture from, BasicTexture to, float ratio, int x, int y, int w, int h) argument
|
H A D | GLCanvasStub.java | 64 float ratio, int x, int y, int w, int h) {} 66 float ratio, int x, int y, int w, int h) {} 68 float ratio, int x, int y, int width, int height, float alpha) {} 87 float ratio, RectF src, RectF target) {} 63 drawMixed(BasicTexture from, BasicTexture to, float ratio, int x, int y, int w, int h) argument 65 drawMixed(BasicTexture from, int to, float ratio, int x, int y, int w, int h) argument 67 drawMixed(BasicTexture from, BasicTexture to, float ratio, int x, int y, int width, int height, float alpha) argument 86 drawMixed(BasicTexture from, int toColor, float ratio, RectF src, RectF target) argument
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
H A D | KeyDrawParams.java | 116 final int dimens, final float ratio, final int defaultDimens) { 120 if (ResourceUtils.isValidFraction(ratio)) { 121 return (int)(keyHeight * ratio); 126 private static final int selectTextSize(final int keyHeight, final float ratio, argument 128 if (ResourceUtils.isValidFraction(ratio)) { 129 return (int)(keyHeight * ratio); 115 selectTextSizeFromDimensionOrRatio(final int keyHeight, final int dimens, final float ratio, final int defaultDimens) argument
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
H A D | GLCanvas.java | 97 // from * (1 - ratio) + to * ratio 100 float ratio, int x, int y, int w, int h); 103 // rectangle. The actual color used is from * (1 - ratio) + to * ratio. 107 float ratio, RectF src, RectF target); 99 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h) argument 106 drawMixed(BasicTexture from, int toColor, float ratio, RectF src, RectF target) argument
|
H A D | GLCanvasImpl.java | 448 int toColor, float ratio, int x, int y, int w, int h) { 449 drawMixed(from, toColor, ratio, x, y, w, h, mAlpha); 468 private void setMixedColor(int toColor, float ratio, float alpha) { argument 471 // alpha * ((1 - ratio) * from + ratio * to) 476 // So, we have combo = alpha * (1 - ratio) 477 // and scale = alpha * ratio / (1 - combo) 479 float combo = alpha * (1 - ratio); 480 float scale = alpha * ratio / (1 - combo); 510 public void drawMixed(BasicTexture from, int toColor, float ratio, argument 447 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int w, int h) argument 544 drawMixed(BasicTexture from, int toColor, float ratio, int x, int y, int width, int height, float alpha) argument [all...] |
H A D | TiledTexture.java | 267 // a rectangle. The used color is: from * (1 - ratio) + to * ratio. 268 public void drawMixed(GLCanvas canvas, int color, float ratio, argument 281 canvas.drawMixed(t, color, ratio, mSrcRect, mDestRect);
|
H A D | PositionController.java | 308 // The ratio of the old size and the new size. 310 // If the aspect ratio changes, we don't know if it is because one side 312 // angle of the longer side doesn't change (so the aspect ratio change 315 float ratio = (width > height) 323 // we change the scale directly. Otherwise adjust the scales by a ratio, 329 b.mCurrentScale *= ratio; 330 b.mFromScale *= ratio; 331 b.mToScale *= ratio; 335 mFocusX /= ratio; 336 mFocusY /= ratio; [all...] |
H A D | PhotoView.java | 1766 // When ratio = 0, the result is from. 1767 // When ratio = 1, the result is to. 1768 private static float interpolate(float ratio, float from, float to) { argument 1769 return from + (to - from) * ratio * ratio;
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
H A D | PhotoSource.java | 164 float ratio = (outsideRatio / insideRatio < mMaxCropRatio ? 167 while (ratio < 0.5) { 169 ratio *= 2; 179 ratio = Math.max((float) longSide / (float) rawLongSide, 182 if (Math.abs(ratio - 1.0f) > 0.001) { 183 log(TAG, "still too big, scaling down by " + ratio); 184 options.outWidth = (int) (ratio * options.outWidth); 185 options.outHeight = (int) (ratio * options.outHeight);
|
/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/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/Contacts/src/com/android/contacts/widget/ |
H A D | ProportionalLayout.java | 143 public void setRatio(float ratio) { argument 144 mRatio = ratio;
|
/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/Gallery2/src/com/android/gallery3d/filtershow/imageshow/ |
H A D | ImageZoom.java | 75 float ratio = (float) getWidth() / (float) getHeight(); 77 float mw = ratio * mh;
|
/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/Phone/src/com/android/phone/ |
H A D | ContactsAsyncHelper.java | 266 float ratio = ((float) longerEdge) / iconSize; 267 int newWidth = (int) (orgWidth / ratio); 268 int newHeight = (int) (orgHeight / ratio); 276 // It is sure ratio >= 1.0f in any case and thus the newly created Bitmap
|
/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/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);
|