Home
last modified time | relevance | path

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

/packages/apps/WallpaperPicker/src/com/android/gallery3d/common/
DUtils.java110 RectF cropRect = new RectF(); in getMaxCropRect() local
113 cropRect.top = 0; in getMaxCropRect()
114 cropRect.bottom = inHeight; in getMaxCropRect()
115 cropRect.left = (inWidth - (outWidth / (float) outHeight) * inHeight) / 2; in getMaxCropRect()
116 cropRect.right = inWidth - cropRect.left; in getMaxCropRect()
118 cropRect.right -= cropRect.left; in getMaxCropRect()
119 cropRect.left = 0; in getMaxCropRect()
122 cropRect.left = 0; in getMaxCropRect()
123 cropRect.right = inWidth; in getMaxCropRect()
124 cropRect.top = (inHeight - (outHeight / (float) outWidth) * inWidth) / 2; in getMaxCropRect()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DWallpaperCropUtils.java203 Rect cropRect = new Rect(scrollX, scrollY, scrollX + targetHostSize.x, in calculateCropRect() local
212 cropRect.left = Math.max(cropRect.left - extraWidth, rect.left); in calculateCropRect()
214 cropRect.right = Math.min(cropRect.right + extraWidth, rect.right); in calculateCropRect()
218 int availableExtraHeightTop = cropRect.top - Math.max( in calculateCropRect()
220 cropRect.top - extraHeightTopAndBottom); in calculateCropRect()
223 cropRect.bottom + extraHeightTopAndBottom) - cropRect.bottom; in calculateCropRect()
227 cropRect.top -= availableExtraHeightTopAndBottom; in calculateCropRect()
228 cropRect.bottom += availableExtraHeightTopAndBottom; in calculateCropRect()
230 return cropRect; in calculateCropRect()
256 Rect cropRect) { in adjustCurrentWallpaperCropRect() argument
[all …]
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/
DWallpaperCropActivity.java368 RectF cropRect = mCropView.getCrop(); in cropImageAndSetWallpaper()
373 float cropScale = mCropView.getWidth() / (float) cropRect.width(); in cropImageAndSetWallpaper()
384 cropRect.left = Math.max(0, cropRect.left); in cropImageAndSetWallpaper()
385 cropRect.right = Math.min(rotatedInSize[0], cropRect.right); in cropImageAndSetWallpaper()
386 cropRect.top = Math.max(0, cropRect.top); in cropImageAndSetWallpaper()
387 cropRect.bottom = Math.min(rotatedInSize[1], cropRect.bottom); in cropImageAndSetWallpaper()
392 float extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left; in cropImageAndSetWallpaper()
394 float maxExtraSpace = defaultWallpaperSize.x / cropScale - cropRect.width(); in cropImageAndSetWallpaper()
398 cropRect.right += extraSpace; in cropImageAndSetWallpaper()
400 cropRect.left -= extraSpace; in cropImageAndSetWallpaper()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/module/
DDefaultBitmapCropper.java34 public void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, in cropAndScaleBitmap() argument
38 Math.round((float) cropRect.left / scale), in cropAndScaleBitmap()
39 Math.round((float) cropRect.top / scale), in cropAndScaleBitmap()
40 Math.round((float) cropRect.right / scale), in cropAndScaleBitmap()
41 Math.round((float) cropRect.bottom / scale)); in cropAndScaleBitmap()
43 asset.decodeBitmapRegion(scaledCropRect, cropRect.width(), cropRect.height(), isRtl, in cropAndScaleBitmap()
50 ScaleBitmapTask task = new ScaleBitmapTask(bitmap, cropRect, callback); in cropAndScaleBitmap()
68 public ScaleBitmapTask(Bitmap bitmap, Rect cropRect, Callback callback) { in ScaleBitmapTask() argument
71 mCropRect = cropRect; in ScaleBitmapTask()
DDefaultWallpaperPersister.java91 @Nullable Rect cropRect, float scale, @Destination final int destination, in setIndividualWallpaper() argument
95 if (cropRect == null && asset instanceof StreamableAsset) { in setIndividualWallpaper()
111 if (cropRect == null) { in setIndividualWallpaper()
129 bitmapCropper.cropAndScaleBitmap(asset, scale, cropRect, false, new Callback() { in setIndividualWallpaper()
209 Rect cropRect = new Rect( in setIndividualWallpaperWithCenterPosition() local
214 asset.decodeBitmapRegion(cropRect, screenSize.x, screenSize.y, false, in setIndividualWallpaperWithCenterPosition()
253 Rect cropRect = new Rect( in setIndividualWallpaperWithCenterCropPosition() local
260 wallpaper, asset, cropRect, scale, WallpaperPersister.DEST_BOTH, callback); in setIndividualWallpaperWithCenterCropPosition()
449 Rect cropRect = WallpaperCropUtils.calculateCropRect(mAppContext, minWallpaperZoom, in cropAndSetWallpaperBitmapInRotationStatic() local
453 Math.round((float) cropRect.left / minWallpaperZoom), in cropAndSetWallpaperBitmapInRotationStatic()
[all …]
DWallpaperSetter.java94 Rect cropRect = WallpaperCropUtils.calculateCropRect( in setCurrentWallpaper()
99 wallpaperScale, cropRect, callback); in setCurrentWallpaper()
118 float wallpaperScale, @Nullable Rect cropRect, in setCurrentWallpaper() argument
165 wallpaper, wallpaperAsset, cropRect, in setCurrentWallpaper()
DBitmapCropper.java34 void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, boolean adjustForRtl, in cropAndScaleBitmap() argument
DWallpaperPersister.java55 void setIndividualWallpaper(WallpaperInfo wallpaper, Asset asset, @Nullable Rect cropRect, in setIndividualWallpaper() argument
/packages/apps/WallpaperPicker2/tests/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.java75 @Nullable final Rect cropRect, final float scale, final @Destination int destination, in setIndividualWallpaper() argument
92 mCropRect = cropRect; in setIndividualWallpaper()
/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/asset/
DCurrentWallpaperAssetVN.java141 protected void adjustCropRect(Context context, Point assetDimensions, Rect cropRect) { in adjustCropRect() argument
142 cropRect.offsetTo(0, 0); in adjustCropRect()
143 WallpaperCropUtils.adjustCurrentWallpaperCropRect(context, assetDimensions, cropRect); in adjustCropRect()
DContentUriAsset.java294 public BitmapCropTask(Bitmap fromBitmap, Rect cropRect, BitmapReceiver receiver) { in BitmapCropTask() argument
296 mCropRect = cropRect; in BitmapCropTask()
DAsset.java366 protected void adjustCropRect(Context context, Point assetDimensions, Rect cropRect) { in adjustCropRect() argument
367 WallpaperCropUtils.adjustCropRect(context, cropRect, true /* zoomIn */); in adjustCropRect()
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/tileinfo/
DWallpaperTileInfo.java63 RectF cropRect = Utils.getMaxCropRect( in createThumbnail() local
65 return streamProvider.readCroppedBitmap(cropRect, width, height, rotation); in createThumbnail()
/packages/apps/WallpaperPicker/src/com/android/wallpaperpicker/common/
DInputStreamProvider.java187 RectF cropRect = new RectF(0, 0, dimsAfter[0], dimsAfter[1]); in readCroppedBitmap() local
192 m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in readCroppedBitmap()
201 m4.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in readCroppedBitmap()
/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.java371 Rect cropRect = mWallpaperPersister.getCropRect(); in testClickSetWallpaper_CropsAndScalesWallpaper()
374 assertTrue(cropRect.width() >= maxDim); in testClickSetWallpaper_CropsAndScalesWallpaper()
375 assertTrue(cropRect.height() >= maxDim); in testClickSetWallpaper_CropsAndScalesWallpaper()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DTaskViewUtils.java244 final Rect cropRect = new Rect(); in createRecentsWindowAnimator() local
256 finalTsv.getCurrentCropRect().round(cropRect); in createRecentsWindowAnimator()
258 .withWindowCrop(cropRect) in createRecentsWindowAnimator()
/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/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,