Home
last modified time | relevance | path

Searched refs:cropRect (Results 1 – 24 of 24) sorted by relevance

/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DWallpaperCropUtils.java207 Rect cropRect = new Rect(scrollX, scrollY, scrollX + targetHostSize.x, in calculateCropRect() local
217 cropRect.left = Math.max(cropRect.left - extraWidth, scaledWallpaperRect.left); in calculateCropRect()
219 cropRect.right = Math.min(cropRect.right + extraWidth, scaledWallpaperRect.right); in calculateCropRect()
224 int availableExtraHeightTop = cropRect.top - Math.max( in calculateCropRect()
226 cropRect.top - extraHeightTopAndBottom); in calculateCropRect()
229 cropRect.bottom + extraHeightTopAndBottom) - cropRect.bottom; in calculateCropRect()
241 cropRect.top -= availableExtraHeightTopAndBottom; in calculateCropRect()
242 cropRect.bottom += availableExtraHeightTopAndBottom; in calculateCropRect()
244 return cropRect; in calculateCropRect()
270 Rect cropRect) { in adjustCurrentWallpaperCropRect() argument
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/module/
DDefaultBitmapCropper.java39 public void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, in cropAndScaleBitmap() argument
43 (int) Math.floor((float) cropRect.left / scale), in cropAndScaleBitmap()
44 (int) Math.floor((float) cropRect.top / scale), in cropAndScaleBitmap()
45 (int) Math.floor((float) cropRect.right / scale), in cropAndScaleBitmap()
46 (int) Math.floor((float) cropRect.bottom / scale)); in cropAndScaleBitmap()
48 asset.decodeBitmapRegion(scaledCropRect, cropRect.width(), cropRect.height(), isRtl, in cropAndScaleBitmap()
64 cropRect.width(), in cropAndScaleBitmap()
65 cropRect.height(), in cropAndScaleBitmap()
DDefaultWallpaperPersister.java110 @Nullable Rect cropRect, float scale, @Destination final int destination, in setIndividualWallpaper() argument
121 setIndividualWallpaper(wallpaper, bitmap, cropRect, destination, callback); in setIndividualWallpaper()
126 if ((cropRect == null || WallpaperManager.isMultiCropEnabled()) in setIndividualWallpaper()
135 setIndividualWallpaper(wallpaper, inputStream, cropRect, destination, callback); in setIndividualWallpaper()
143 if (cropRect == null) { in setIndividualWallpaper()
160 mBitmapCropper.cropAndScaleBitmap(asset, scale, cropRect, false, new Callback() { in setIndividualWallpaper()
325 Rect cropRect = WallpaperCropUtils.calculateCropRect(mAppContext, minWallpaperZoom, in cropAndSetWallpaperBitmapInRotationStatic() local
330 (int) Math.floor((float) cropRect.left / minWallpaperZoom), in cropAndSetWallpaperBitmapInRotationStatic()
331 (int) Math.floor((float) cropRect.top / minWallpaperZoom), in cropAndSetWallpaperBitmapInRotationStatic()
332 (int) Math.floor((float) cropRect.right / minWallpaperZoom), in cropAndSetWallpaperBitmapInRotationStatic()
[all …]
DBitmapCropper.java34 void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, boolean adjustForRtl, in cropAndScaleBitmap() argument
DWallpaperSetter.java90 @Destination final int destination, float wallpaperScale, @Nullable Rect cropRect, in setCurrentWallpaper() argument
138 wallpaper, wallpaperAsset, cropRect, in setCurrentWallpaper()
DWallpaperPersister.java60 void setIndividualWallpaper(WallpaperInfo wallpaper, Asset asset, @Nullable Rect cropRect, in setIndividualWallpaper() argument
/packages/apps/WallpaperPicker2/tests/common/src/com/android/wallpaper/testing/
DTestBitmapCropper.java37 public void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, boolean adjustRtl, in cropAndScaleBitmap() argument
45 Math.round((float) cropRect.left / scale), in cropAndScaleBitmap()
46 Math.round((float) cropRect.top / scale), in cropAndScaleBitmap()
47 Math.round((float) cropRect.right / scale), in cropAndScaleBitmap()
48 Math.round((float) cropRect.bottom / scale)); in cropAndScaleBitmap()
50 asset.decodeBitmapRegion(scaledCropRect, cropRect.width(), cropRect.height(), adjustRtl, in cropAndScaleBitmap()
DTestWallpaperPersister.java79 @Nullable final Rect cropRect, final float scale, final @Destination int destination, in setIndividualWallpaper() argument
96 mCropRect = cropRect; in setIndividualWallpaper()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java221 Rect cropRect = rect; in runDecodeBitmapRegionTask() local
233 cropRect = CropRectRotator.rotateCropRectForExifOrientation( in runDecodeBitmapRegionTask()
234 dimensions, cropRect, exifOrientation); in runDecodeBitmapRegionTask()
238 cropRect.set(dimensions.x - cropRect.right, cropRect.top, in runDecodeBitmapRegionTask()
239 dimensions.x - cropRect.left, cropRect.bottom); in runDecodeBitmapRegionTask()
244 cropRect.width(), cropRect.height(), newTargetWidth, newTargetHeight); in runDecodeBitmapRegionTask()
254 Bitmap bitmap = mBitmapRegionDecoder.decodeRegion(cropRect, options); in runDecodeBitmapRegionTask()
DCurrentWallpaperAsset.java143 protected void adjustCropRect(Context context, Point assetDimensions, Rect cropRect, in adjustCropRect() argument
146 cropRect.offsetTo(0, 0); in adjustCropRect()
148 WallpaperCropUtils.adjustCurrentWallpaperCropRect(context, assetDimensions, cropRect); in adjustCropRect()
DAsset.java459 protected void adjustCropRect(Context context, Point assetDimensions, Rect cropRect, in adjustCropRect() argument
461 WallpaperCropUtils.adjustCropRect(context, cropRect, true /* zoomIn */); in adjustCropRect()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/preview/ui/util/
DCropSizeUtil.kt71 cropRect: Rect, in fitCropRectToLayoutDirection()
75 val parallax = cropRect.width() - displaySize.x * cropRect.height() / displaySize.y in fitCropRectToLayoutDirection()
76 return Rect(cropRect).apply { if (isRtl) left += parallax else right -= parallax } in fitCropRectToLayoutDirection()
DFullResImageViewUtil.kt33 cropRect: Rect?, in getScaleAndCenter()
52 cropRect?.let { fitCropRectToLayoutDirection(it, displaySize, isRtl) } in getScaleAndCenter()
/packages/apps/WallpaperPicker2/tests/robotests/src/com/android/wallpaper/picker/preview/ui/util/
DFullResImageViewUtilTest.kt25 cropRect = null, in getScaleAndCenter_wallpaperSizeSameAsScreen()
50 cropRect = null, in getScaleAndCenter_wallpaperSizeLargerThanScreen()
75 cropRect = null, in getScaleAndCenter_wallpaperSizeSmallerThanScreen()
100 cropRect = null, in getScaleAndCenter_wallpaperSmallerThanScreenEightTimes_getsSameScales()
/packages/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/
DAndroidImageProxy.java144 public void setCropRect(Rect cropRect) { in setCropRect() argument
146 mCropRect = cropRect; in setCropRect()
148 mImage.setCropRect(cropRect); in setCropRect()
DForwardingImageProxy.java52 public void setCropRect(Rect cropRect) { in setCropRect() argument
53 mImpl.setCropRect(cropRect); in setCropRect()
DImageProxy.java74 public void setCropRect(Rect cropRect); in setCropRect() argument
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/picker/
DImagePreviewFragment.java223 Rect cropRect = calculateCropRect(context, !mDisplayUtils.hasMultiInternalDisplays()); in setWallpaper() local
225 mFullResImageView.getScale(), cropRect, mWallpaperScreenSize.x, in setWallpaper()
228 Math.round((float) cropRect.left * screenScale), in setWallpaper()
229 Math.round((float) cropRect.top * screenScale), in setWallpaper()
230 Math.round((float) cropRect.right * screenScale), in setWallpaper()
231 Math.round((float) cropRect.bottom * screenScale)); in setWallpaper()
/packages/apps/EmergencyInfo/src/com/android/emergency/
DCircleFramedDrawable.java66 final Rect cropRect = new Rect((width - square) / 2, (height - square) / 2, square, square); in CircleFramedDrawable() local
83 canvas.drawBitmap(icon, cropRect, circleRect, mPaint); in CircleFramedDrawable()
/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/picker/
DPreviewActivityTest.java411 Rect cropRect = mWallpaperPersister.getCropRect(); in testClickSetWallpaper_CropsAndScalesWallpaper()
414 assertTrue(cropRect.width() >= maxDim); in testClickSetWallpaper_CropsAndScalesWallpaper()
415 assertTrue(cropRect.height() >= maxDim); in testClickSetWallpaper_CropsAndScalesWallpaper()
/packages/apps/Gallery/src/com/android/camera/
DHighlightView.java367 public void setup(Matrix m, Rect imageRect, RectF cropRect, boolean circle, in setup() argument
374 mCropRect = cropRect; in setup()
DCropImage.java492 RectF cropRect = new RectF(x, y, x + cropWidth, y + cropHeight);
493 hv.setup(mImageMatrix, imageRect, cropRect, mCircleCrop,
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
DCropActivity.java518 RectF cropRect = new RectF(0, 0, crop.getWidth(), crop.getHeight()); in doInBackground() local
521 m.mapRect(cropRect); in doInBackground()
524 m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in doInBackground()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DTaskViewUtils.java268 final Rect cropRect = new Rect(); in createRecentsWindowAnimator() local
293 taskViewSimulator.getCurrentCropRect().round(cropRect); in createRecentsWindowAnimator()
295 .setWindowCrop(cropRect) in createRecentsWindowAnimator()