Home
last modified time | relevance | path

Searched refs:cropRect (Results 1 – 21 of 21) 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/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, final 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(), 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.java88 @Nullable Rect cropRect, float scale, @Destination final int destination, in setIndividualWallpaper() argument
92 if (cropRect == null && asset instanceof StreamableAsset) { in setIndividualWallpaper()
108 if (cropRect == null) { in setIndividualWallpaper()
126 bitmapCropper.cropAndScaleBitmap(asset, scale, cropRect, new Callback() { in setIndividualWallpaper()
206 Rect cropRect = new Rect( in setIndividualWallpaperWithCenterPosition() local
211 asset.decodeBitmapRegion(cropRect, screenSize.x, screenSize.y, new BitmapReceiver() { in setIndividualWallpaperWithCenterPosition()
254 Rect cropRect = new Rect( in setIndividualWallpaperWithCenterCropPosition() local
261 wallpaper, asset, cropRect, scale, WallpaperPersister.DEST_BOTH, callback); in setIndividualWallpaperWithCenterCropPosition()
DWallpaperSetter.java90 Rect cropRect = WallpaperCropUtils.calculateCropRect( in setCurrentWallpaper()
95 wallpaperScale, cropRect, callback); in setCurrentWallpaper()
114 float wallpaperScale, @Nullable Rect cropRect, in setCurrentWallpaper() argument
147 wallpaper, wallpaperAsset, cropRect, in setCurrentWallpaper()
DBitmapCropper.java34 void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, Callback callback); in cropAndScaleBitmap() argument
DWallpaperPersister.java55 void setIndividualWallpaper(WallpaperInfo wallpaper, Asset asset, @Nullable Rect cropRect, in setIndividualWallpaper() argument
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/util/
DWallpaperCropUtils.java191 Rect cropRect = new Rect(scrollX, scrollY, scrollX + screenSize.x, scrollY + screenSize.y); in calculateCropRect() local
201 cropRect.left = Math.max(cropRect.left - extraWidth, visibleRawWallpaperRect.left); in calculateCropRect()
203 cropRect.right = Math.min(cropRect.right + extraWidth, visibleRawWallpaperRect.right); in calculateCropRect()
207 int availableExtraHeightTop = cropRect.top - Math.max( in calculateCropRect()
209 cropRect.top - extraHeightTopAndBottom); in calculateCropRect()
212 cropRect.bottom + extraHeightTopAndBottom) - cropRect.bottom; in calculateCropRect()
216 cropRect.top -= availableExtraHeightTopAndBottom; in calculateCropRect()
217 cropRect.bottom += availableExtraHeightTopAndBottom; in calculateCropRect()
219 return cropRect; in calculateCropRect()
/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/testing/
DTestBitmapCropper.java37 public void cropAndScaleBitmap(Asset asset, float scale, Rect cropRect, 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(), in cropAndScaleBitmap()
DTestWallpaperPersister.java75 @Nullable final Rect cropRect, final float scale, final @Destination int destination, in setIndividualWallpaper() argument
91 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/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/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/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/src/com/android/wallpaper/asset/
DContentUriAsset.java294 public BitmapCropTask(Bitmap fromBitmap, Rect cropRect, BitmapReceiver receiver) { in BitmapCropTask() argument
296 mCropRect = cropRect; in BitmapCropTask()
/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/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,