Home
last modified time | relevance | path

Searched refs:aspectRatio (Results 1 – 25 of 27) sorted by relevance

12

/packages/apps/Camera2/src/com/android/camera/settings/
DResolutionUtil.java82 public Float aspectRatio; field in ResolutionUtil.ResolutionBucket
136 sortedDesiredAspectRatios.add(buckets.get(0).aspectRatio.floatValue()); in getDisplayableSizesFromSupported()
141 Float aspectRatio = bucket.aspectRatio; in getDisplayableSizesFromSupported() local
142 if (Arrays.asList(sDesiredAspectRatios).contains(aspectRatio) in getDisplayableSizesFromSupported()
143 && !sortedDesiredAspectRatios.contains(aspectRatio)) { in getDisplayableSizesFromSupported()
144 sortedDesiredAspectRatios.add(aspectRatio); in getDisplayableSizesFromSupported()
151 Number aspectRatio = bucket.aspectRatio; in getDisplayableSizesFromSupported() local
152 if (Math.abs(aspectRatio.floatValue() - targetRatio) <= ASPECT_RATIO_TOLERANCE) { in getDisplayableSizesFromSupported()
221 private static float fuzzAspectRatio(float aspectRatio) { in fuzzAspectRatio() argument
223 if ((Math.abs(aspectRatio - desiredAspectRatio)) < ASPECT_RATIO_TOLERANCE) { in fuzzAspectRatio()
[all …]
DResolutionSetting.java66 public void setPictureAspectRatio(CameraId cameraId, Rational aspectRatio) in setPictureAspectRatio() argument
95 ResolutionUtil.getLargestPictureSize(aspectRatio, supportedPictureSizes); in setPictureAspectRatio()
146 final Rational aspectRatio = ResolutionUtil.ASPECT_RATIO_4x3; in getPictureSize() local
156 ResolutionUtil.getLargestPictureSize(aspectRatio, supportedPictureSizes); in getPictureSize()
DSettingsUtil.java235 float aspectRatio = size.width() / (float) size.height(); in getSelectedCameraPictureSizes() local
237 if (Math.abs(aspectRatio - targetAspectRatio) < 0.01) { in getSelectedCameraPictureSizes()
/packages/apps/Camera2/src/com/android/camera/
DTextureViewHelper.java134 public void updateAspectRatio(float aspectRatio) { in updateAspectRatio() argument
135 Log.v(TAG, "updateAspectRatio " + aspectRatio); in updateAspectRatio()
136 if (aspectRatio <= 0) { in updateAspectRatio()
137 Log.e(TAG, "Invalid aspect ratio: " + aspectRatio); in updateAspectRatio()
140 if (aspectRatio < 1f) { in updateAspectRatio()
141 aspectRatio = 1f / aspectRatio; in updateAspectRatio()
143 setAspectRatio(aspectRatio); in updateAspectRatio()
147 private void setAspectRatio(float aspectRatio) { in setAspectRatio() argument
148 Log.v(TAG, "setAspectRatio: " + aspectRatio); in setAspectRatio()
149 if (mAspectRatio != aspectRatio) { in setAspectRatio()
[all …]
DVideoUI.java106 float aspectRatio; in setPreviewSize() local
108 aspectRatio = (float) width / height; in setPreviewSize()
110 aspectRatio = (float) height / width; in setPreviewSize()
112 setAspectRatio(aspectRatio); in setPreviewSize()
155 float aspectRatio = ratio > 1 ? ratio : 1 / ratio; in setAspectRatio() local
156 if (aspectRatio != mAspectRatio) { in setAspectRatio()
157 mAspectRatio = aspectRatio; in setAspectRatio()
DPhotoUI.java258 public void updatePreviewAspectRatio(float aspectRatio) { in updatePreviewAspectRatio() argument
259 if (aspectRatio <= 0) { in updatePreviewAspectRatio()
260 Log.e(TAG, "Invalid aspect ratio: " + aspectRatio); in updatePreviewAspectRatio()
263 if (aspectRatio < 1f) { in updatePreviewAspectRatio()
264 aspectRatio = 1f / aspectRatio; in updatePreviewAspectRatio()
267 if (mAspectRatio != aspectRatio) { in updatePreviewAspectRatio()
268 mAspectRatio = aspectRatio; in updatePreviewAspectRatio()
DCaptureLayoutHelper.java83 public void onPreviewAspectRatioChanged(float aspectRatio) { in onPreviewAspectRatioChanged() argument
84 if (mAspectRatio == aspectRatio) { in onPreviewAspectRatioChanged()
87 mAspectRatio = aspectRatio; in onPreviewAspectRatioChanged()
DVideoController.java38 public void updatePreviewAspectRatio(float aspectRatio); in updatePreviewAspectRatio() argument
DPhotoController.java55 public void updatePreviewAspectRatio(float aspectRatio); in updatePreviewAspectRatio() argument
DCaptureModule.java1279 final float aspectRatio = (size.getHeight() > size.getWidth())
1283 return Math.abs(aspectRatio - (16.f / 9.f)) < 0.001f;
DCameraActivity.java1124 public void updatePreviewAspectRatio(float aspectRatio) { in updatePreviewAspectRatio() argument
1125 mCameraAppUI.updatePreviewAspectRatio(aspectRatio); in updatePreviewAspectRatio()
1129 public void updatePreviewTransformFullscreen(Matrix matrix, float aspectRatio) { in updatePreviewTransformFullscreen() argument
1130 mCameraAppUI.updatePreviewTransformFullscreen(matrix, aspectRatio); in updatePreviewTransformFullscreen()
DVideoModule.java891 public void updatePreviewAspectRatio(float aspectRatio) { in updatePreviewAspectRatio() argument
892 mAppController.updatePreviewAspectRatio(aspectRatio); in updatePreviewAspectRatio()
/packages/apps/Messaging/src/com/android/messaging/ui/
DAsyncImageView.java336 final float aspectRatio = measuredWidth / (float) measuredHeight; in onMeasure() local
337 if (aspectRatio == 0) { in onMeasure()
343 height = resolveSize((int) (minimumWidth / aspectRatio), in onMeasure()
345 width = (int) (height * aspectRatio); in onMeasure()
349 width = resolveSize((int) (minimumHeight * aspectRatio), in onMeasure()
351 height = (int) (width / aspectRatio); in onMeasure()
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
DCameraPreview.java82 final float aspectRatio = (float) mCameraWidth / (float) mCameraHeight; in getHeightMeasureSpec() local
85 height = (int) (width * aspectRatio); in getHeightMeasureSpec()
87 height = (int) (width / aspectRatio); in getHeightMeasureSpec()
DCameraManager.java994 final float aspectRatio = BugleGservices.get().getFloat( in chooseBestPictureSize() local
1002 Collections.sort(sizes, new SizeComparator(maxWidth, maxHeight, aspectRatio, maxPixels)); in chooseBestPictureSize()
1014 final float aspectRatio = pictureSize.width / (float) pictureSize.height; in chooseBestPreviewSize() local
1019 aspectRatio, capturePixels)); in chooseBestPreviewSize()
/packages/apps/Camera2/src/com/android/camera/app/
DFirstRunDialog.java158 public void onConfirm(Rational aspectRatio) { in promptAspectRatioPreferenceDialog()
163 mResolutionSetting.setPictureAspectRatio(backCameraId, aspectRatio); in promptAspectRatioPreferenceDialog()
167 mResolutionSetting.setPictureAspectRatio(frontCameraId, aspectRatio); in promptAspectRatioPreferenceDialog()
DAppController.java213 public void updatePreviewAspectRatio(float aspectRatio); in updatePreviewAspectRatio() argument
223 public void updatePreviewTransformFullscreen(Matrix matrix, float aspectRatio); in updatePreviewTransformFullscreen() argument
DCameraAppUI.java665 public void updatePreviewAspectRatio(float aspectRatio) { in updatePreviewAspectRatio() argument
666 mTextureViewHelper.updateAspectRatio(aspectRatio); in updatePreviewAspectRatio()
692 public void updatePreviewTransformFullscreen(Matrix matrix, float aspectRatio) { in updatePreviewTransformFullscreen() argument
693 mTextureViewHelper.updateTransformFullScreen(matrix, aspectRatio); in updatePreviewTransformFullscreen()
1378 public void onPreviewAspectRatioChanged(float aspectRatio) { in prepareModuleUI()
/packages/apps/Camera2/src/com/android/camera/widget/
DAspectRatioDialogLayout.java107 private void setAspectRatio(Rational aspectRatio) { in setAspectRatio() argument
108 mAspectRatio = aspectRatio; in setAspectRatio()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DWallpaperUtils.java68 float aspectRatio = width / (float) height; in wallpaperTravelToScreenWidthRatio() local
89 return x * aspectRatio + y; in wallpaperTravelToScreenWidthRatio()
/packages/apps/Camera2/src/com/android/camera/util/
DCameraUtil.java428 public static Size constrainToAspectRatio(Size size, float aspectRatio) { in constrainToAspectRatio() argument
434 if (currentAspectRatio > aspectRatio) { in constrainToAspectRatio()
437 width = height * aspectRatio; in constrainToAspectRatio()
439 height = width / aspectRatio; in constrainToAspectRatio()
441 } else if (currentAspectRatio < aspectRatio) { in constrainToAspectRatio()
444 width = height * aspectRatio; in constrainToAspectRatio()
446 height = width / aspectRatio; in constrainToAspectRatio()
DSize.java127 public float aspectRatio() { in aspectRatio() method in Size
/packages/apps/Dialer/InCallUI/src/com/android/incallui/
DVideoCallPresenter.java911 float aspectRatio = 1.0f; in changePreviewDimensions() local
913 aspectRatio = (float) width / (float) height; in changePreviewDimensions()
918 setPreviewSize(mDeviceOrientation, aspectRatio); in changePreviewDimensions()
1001 private void setPreviewSize(int orientation, float aspectRatio) { in setPreviewSize() argument
1012 width = (int) (mMinimumVideoDimension * aspectRatio); in setPreviewSize()
1017 height = (int) (mMinimumVideoDimension * aspectRatio); in setPreviewSize()
/packages/apps/Camera2/src/com/android/camera/captureintent/
DCaptureIntentModuleUI.java173 public void updatePreviewAspectRatio(float aspectRatio) { in updatePreviewAspectRatio() argument
175 mAppUI.updatePreviewAspectRatio(aspectRatio); in updatePreviewAspectRatio()
/packages/apps/Camera2/src/com/android/camera/ui/
DPreviewStatusListener.java78 public void onPreviewAspectRatioChanged(float aspectRatio); in onPreviewAspectRatioChanged() argument

12