Home
last modified time | relevance | path

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

12

/packages/apps/Camera2/src/com/android/camera/settings/
DResolutionUtil.java84 public Float aspectRatio; field in ResolutionUtil.ResolutionBucket
138 sortedDesiredAspectRatios.add(buckets.get(0).aspectRatio.floatValue()); in getDisplayableSizesFromSupported()
143 Float aspectRatio = bucket.aspectRatio; in getDisplayableSizesFromSupported() local
144 if (Arrays.asList(sDesiredAspectRatios).contains(aspectRatio) in getDisplayableSizesFromSupported()
145 && !sortedDesiredAspectRatios.contains(aspectRatio)) { in getDisplayableSizesFromSupported()
146 sortedDesiredAspectRatios.add(aspectRatio); in getDisplayableSizesFromSupported()
153 Number aspectRatio = bucket.aspectRatio; in getDisplayableSizesFromSupported() local
154 if (Math.abs(aspectRatio.floatValue() - targetRatio) <= ASPECT_RATIO_TOLERANCE) { in getDisplayableSizesFromSupported()
223 private static float fuzzAspectRatio(float aspectRatio) { in fuzzAspectRatio() argument
225 if ((Math.abs(aspectRatio - desiredAspectRatio)) < ASPECT_RATIO_TOLERANCE) { in fuzzAspectRatio()
[all …]
DResolutionSetting.java68 public void setPictureAspectRatio(CameraId cameraId, Rational aspectRatio) in setPictureAspectRatio() argument
97 ResolutionUtil.getLargestPictureSize(aspectRatio, supportedPictureSizes); in setPictureAspectRatio()
149 final Rational aspectRatio = ResolutionUtil.ASPECT_RATIO_4x3; in getPictureSize() local
159 ResolutionUtil.getLargestPictureSize(aspectRatio, supportedPictureSizes); in getPictureSize()
/packages/apps/Camera2/src/com/android/camera/
DTextureViewHelper.java135 public void updateAspectRatio(float aspectRatio) { in updateAspectRatio() argument
136 Log.v(TAG, "updateAspectRatio " + aspectRatio); in updateAspectRatio()
137 if (aspectRatio <= 0) { in updateAspectRatio()
138 Log.e(TAG, "Invalid aspect ratio: " + aspectRatio); in updateAspectRatio()
141 if (aspectRatio < 1f) { in updateAspectRatio()
142 aspectRatio = 1f / aspectRatio; in updateAspectRatio()
144 setAspectRatio(aspectRatio); in updateAspectRatio()
148 private void setAspectRatio(float aspectRatio) { in setAspectRatio() argument
149 Log.v(TAG, "setAspectRatio: " + aspectRatio); in setAspectRatio()
150 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()
/packages/services/Car/cpp/evs/support_library/
DConfigManager.h61 float getDisplayRightLocation(float aspectRatio) const { in getDisplayRightLocation() argument
63 return (getDisplayTopLocation() - getDisplayBottomLocation()) * 0.5f * aspectRatio; in getDisplayRightLocation()
65 float getDisplayLeftLocation(float aspectRatio) const { in getDisplayLeftLocation() argument
67 return -getDisplayRightLocation(aspectRatio); in getDisplayLeftLocation()
/packages/apps/TV/src/com/android/tv/util/images/
DImageLoader.java451 int aspectRatio; in getAspectRatioFromPosterArtUri() local
462 aspectRatio = PreviewPrograms.ASPECT_RATIO_2_3; in getAspectRatioFromPosterArtUri()
464 aspectRatio = PreviewPrograms.ASPECT_RATIO_MOVIE_POSTER; in getAspectRatioFromPosterArtUri()
466 aspectRatio = PreviewPrograms.ASPECT_RATIO_1_1; in getAspectRatioFromPosterArtUri()
468 aspectRatio = PreviewPrograms.ASPECT_RATIO_4_3; in getAspectRatioFromPosterArtUri()
470 aspectRatio = PreviewPrograms.ASPECT_RATIO_3_2; in getAspectRatioFromPosterArtUri()
472 aspectRatio = PreviewPrograms.ASPECT_RATIO_16_9; in getAspectRatioFromPosterArtUri()
474 return aspectRatio; in getAspectRatioFromPosterArtUri()
/packages/apps/Dialer/java/com/android/incallui/answer/impl/
DFixedAspectSurfaceView.java37 private float aspectRatio; field in FixedAspectSurfaceView
63 aspectRatio = aspect; in setAspectRatio()
74 width = (int) (height * aspectRatio); in onMeasure()
76 height = (int) (width / aspectRatio); in onMeasure()
/packages/services/Car/cpp/evs/apps/default/
DConfigManager.h70 float getDisplayRightLocation(float aspectRatio) const { in getDisplayRightLocation() argument
72 return (getDisplayTopLocation() - getDisplayBottomLocation()) * 0.5f * aspectRatio; in getDisplayRightLocation()
74 float getDisplayLeftLocation(float aspectRatio) const { in getDisplayLeftLocation() argument
76 return -getDisplayRightLocation(aspectRatio); in getDisplayLeftLocation()
/packages/apps/Messaging/src/com/android/messaging/ui/
DAsyncImageView.java338 final float aspectRatio = measuredWidth / (float) measuredHeight; in onMeasure() local
339 if (aspectRatio == 0) { in onMeasure()
345 height = resolveSize((int) (minimumWidth / aspectRatio), in onMeasure()
347 width = (int) (height * aspectRatio); in onMeasure()
351 width = resolveSize((int) (minimumHeight * aspectRatio), in onMeasure()
353 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.java995 final float aspectRatio = BugleGservices.get().getFloat( in chooseBestPictureSize() local
1003 Collections.sort(sizes, new SizeComparator(maxWidth, maxHeight, aspectRatio, maxPixels)); in chooseBestPictureSize()
1015 final float aspectRatio = pictureSize.width / (float) pictureSize.height; in chooseBestPreviewSize() local
1020 aspectRatio, capturePixels)); in chooseBestPreviewSize()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/
DCameraPreview.java105 final float aspectRatio = (float) cameraWidth / (float) cameraHeight; in getHeightMeasureSpec() local
108 height = (int) (width * aspectRatio); in getHeightMeasureSpec()
110 height = (int) (width / aspectRatio); in getHeightMeasureSpec()
/packages/apps/Camera2/src/com/android/camera/app/
DFirstRunDialog.java164 public void onConfirm(Rational aspectRatio) { in promptAspectRatioPreferenceDialog()
169 mResolutionSetting.setPictureAspectRatio(backCameraId, aspectRatio); in promptAspectRatioPreferenceDialog()
173 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
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/
DFixedRatioImageView.java56 public void setAspectRatio(float aspectRatio) { in setAspectRatio() argument
57 mAspectRatio = aspectRatio; in setAspectRatio()
/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()
/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/TV/src/com/android/tv/data/
DPreviewDataManager.java435 int aspectRatio = in doInBackground() local
442 program, aspectRatio) in doInBackground()
603 PreviewProgramContent program, int aspectRatio) { in createPreviewProgramFromContent() argument
610 .setPosterArtAspectRatio(aspectRatio) in createPreviewProgramFromContent()
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/
DWallpaperUtils.java104 float aspectRatio = width / (float) height; in wallpaperTravelToScreenWidthRatio() local
125 return x * aspectRatio + y; in wallpaperTravelToScreenWidthRatio()
/packages/apps/Launcher3/src/com/android/launcher3/views/
DFloatingIconView.java330 float aspectRatio = mLauncher.getDeviceProfile().aspectRatio; in setIcon() local
332 lp.width = (int) Math.max(lp.width, lp.height * aspectRatio); in setIcon()
334 lp.height = (int) Math.max(lp.height, lp.width * aspectRatio); in setIcon()
/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/Launcher3/src/com/android/launcher3/
DDeviceProfile.java81 public final float aspectRatio; field in DeviceProfile
243 aspectRatio = ((float) Math.max(widthPx, heightPx)) / Math.min(widthPx, heightPx); in DeviceProfile()
244 boolean isTallDevice = Float.compare(aspectRatio, TALL_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0; in DeviceProfile()
382 if (Float.compare(aspectRatio, TALLER_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0 in DeviceProfile()
922 writer.println(prefix + "\taspectRatio:" + aspectRatio); in dump()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DWallpaperCropUtils.java50 float aspectRatio = width / (float) height; in wallpaperTravelToScreenWidthRatio() local
65 return x * aspectRatio + y; in wallpaperTravelToScreenWidthRatio()

12