Home
last modified time | relevance | path

Searched refs:cropRect (Results 1 – 18 of 18) 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.java99 … @Nullable Rect cropRect, float scale, @Destination final int destination, in setIndividualWallpaper() argument
103 if (cropRect == null && asset instanceof StreamableAsset) { in setIndividualWallpaper()
119 if (cropRect == null) { in setIndividualWallpaper()
137 bitmapCropper.cropAndScaleBitmap(asset, scale, cropRect, new Callback() { in setIndividualWallpaper()
213 Rect cropRect = new Rect( in setIndividualWallpaperWithCenterPosition() local
218 asset.decodeBitmapRegion(cropRect, screenSize.x, screenSize.y, new BitmapReceiver() { in setIndividualWallpaperWithCenterPosition()
260 Rect cropRect = new Rect( in setIndividualWallpaperWithCenterCropPosition() local
267 wallpaper, asset, cropRect, scale, WallpaperPersister.DEST_BOTH, callback); in setIndividualWallpaperWithCenterCropPosition()
DWallpaperSetter.java76 @Nullable Rect cropRect, @Nullable SetWallpaperCallback callback) { in setCurrentWallpaper() argument
108 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/picker/
DPreviewFragment.java797 Rect cropRect = new Rect(scrollX, scrollY, scrollX + screenSize.x, scrollY + screenSize.y); in calculateCropRect() local
807 cropRect.left = Math.max(cropRect.left - extraWidth, rect.left); in calculateCropRect()
809 cropRect.right = Math.min(cropRect.right + extraWidth, rect.right); in calculateCropRect()
813 int availableExtraHeightTop = cropRect.top - Math.max( in calculateCropRect()
815 cropRect.top - extraHeightTopAndBottom); in calculateCropRect()
818 cropRect.bottom + extraHeightTopAndBottom) - cropRect.bottom; in calculateCropRect()
822 cropRect.top -= availableExtraHeightTopAndBottom; in calculateCropRect()
823 cropRect.bottom += availableExtraHeightTopAndBottom; in calculateCropRect()
825 return cropRect; in calculateCropRect()
/packages/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/
DAndroidImageProxy.java143 public void setCropRect(Rect cropRect) { in setCropRect() argument
145 mCropRect = cropRect; in setCropRect()
147 mImage.setCropRect(cropRect); in setCropRect()
DForwardingImageProxy.java51 public void setCropRect(Rect cropRect) { in setCropRect() argument
52 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/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,