/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/ |
D | WallpaperCropActivity.java | 371 RectF cropRect = mCropView.getCrop(); in cropImageAndSetWallpaper() 376 float cropScale = mCropView.getWidth() / (float) cropRect.width(); in cropImageAndSetWallpaper() 387 cropRect.left = Math.max(0, cropRect.left); in cropImageAndSetWallpaper() 388 cropRect.right = Math.min(rotatedInSize[0], cropRect.right); in cropImageAndSetWallpaper() 389 cropRect.top = Math.max(0, cropRect.top); in cropImageAndSetWallpaper() 390 cropRect.bottom = Math.min(rotatedInSize[1], cropRect.bottom); in cropImageAndSetWallpaper() 397 extraSpace = 2f * Math.min(rotatedInSize[0] - cropRect.right, cropRect.left); in cropImageAndSetWallpaper() 399 extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left; in cropImageAndSetWallpaper() 402 float maxExtraSpace = defaultWallpaperSize.x / cropScale - cropRect.width(); in cropImageAndSetWallpaper() 406 cropRect.left -= extraSpace / 2f; in cropImageAndSetWallpaper() [all …]
|
/frameworks/base/media/java/android/media/ |
D | Image.java | 236 public void setCropRect(Rect cropRect) { in setCropRect() argument 239 if (cropRect != null) { in setCropRect() 240 cropRect = new Rect(cropRect); // make a copy in setCropRect() 241 if (!cropRect.intersect(0, 0, getWidth(), getHeight())) { in setCropRect() 242 cropRect.setEmpty(); in setCropRect() 245 mCropRect = cropRect; in setCropRect()
|
D | MediaCodec.java | 3559 public void setCropRect(@Nullable Rect cropRect) { in setCropRect() argument 3563 super.setCropRect(cropRect); in setCropRect() 3569 long timestamp, int xOffset, int yOffset, @Nullable Rect cropRect) { in MediaImage() argument 3634 if (cropRect == null) { in MediaImage() 3635 cropRect = new Rect(0, 0, mWidth, mHeight); in MediaImage() 3637 cropRect.offset(-xOffset, -yOffset); in MediaImage() 3638 super.setCropRect(cropRect); in MediaImage()
|
/frameworks/base/media/jni/ |
D | android_media_ImageWriter.cpp | 457 android_native_rect_t cropRect; in ImageWriter_queueImage() local 458 cropRect.left = left; in ImageWriter_queueImage() 459 cropRect.top = top; in ImageWriter_queueImage() 460 cropRect.right = right; in ImageWriter_queueImage() 461 cropRect.bottom = bottom; in ImageWriter_queueImage() 462 res = native_window_set_crop(anw.get(), &cropRect); in ImageWriter_queueImage() 542 android_native_rect_t cropRect; in ImageWriter_attachAndQueueImage() local 543 cropRect.left = left; in ImageWriter_attachAndQueueImage() 544 cropRect.top = top; in ImageWriter_attachAndQueueImage() 545 cropRect.right = right; in ImageWriter_attachAndQueueImage() [all …]
|
D | android_media_MediaCodec.cpp | 566 jobject cropRect = NULL; in getImage() local 576 cropRect = env->NewObject( in getImage() 591 (jint)0 /* xOffset */, (jint)0 /* yOffset */, cropRect); in getImage() 600 if (cropRect != NULL) { in getImage() 601 env->DeleteLocalRef(cropRect); in getImage() 602 cropRect = NULL; in getImage()
|
/frameworks/base/core/java/android/app/ |
D | WallpaperManager.java | 720 RectF cropRect = new RectF(0, 0, crop.getWidth(), crop.getHeight()); in getBuiltInDrawable() local 722 m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in getBuiltInDrawable() 741 RectF cropRect = new RectF(); in getMaxCropRect() local 744 cropRect.top = 0; in getMaxCropRect() 745 cropRect.bottom = inHeight; in getMaxCropRect() 747 cropRect.left = (inWidth - cropWidth) * horizontalAlignment; in getMaxCropRect() 748 cropRect.right = cropRect.left + cropWidth; in getMaxCropRect() 750 cropRect.left = 0; in getMaxCropRect() 751 cropRect.right = inWidth; in getMaxCropRect() 753 cropRect.top = (inHeight - cropHeight) * verticalAlignment; in getMaxCropRect() [all …]
|
/frameworks/native/libs/gui/ |
D | GLConsumer.cpp | 821 const sp<GraphicBuffer>& buf, const Rect& cropRect, uint32_t transform, in computeTransformMatrix() argument 851 if (!cropRect.isEmpty()) { in computeTransformMatrix() 885 if (cropRect.width() < bufferWidth) { in computeTransformMatrix() 886 tx = (float(cropRect.left) + shrinkAmount) / bufferWidth; in computeTransformMatrix() 887 sx = (float(cropRect.width()) - (2.0f * shrinkAmount)) / in computeTransformMatrix() 890 if (cropRect.height() < bufferHeight) { in computeTransformMatrix() 891 ty = (float(bufferHeight - cropRect.bottom) + shrinkAmount) / in computeTransformMatrix() 893 sy = (float(cropRect.height()) - (2.0f * shrinkAmount)) / in computeTransformMatrix() 1197 const Rect& cropRect, in createIfNeeded() argument 1202 bool cropInvalid = hasEglAndroidImageCrop() && mCropRect != cropRect; in createIfNeeded() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawable/ |
D | CircleFramedDrawable.java | 69 final Rect cropRect = new Rect((width - square) / 2, (height - square) / 2, square, square); in CircleFramedDrawable() local 86 canvas.drawBitmap(icon, cropRect, circleRect, mPaint); in CircleFramedDrawable()
|
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/ |
D | AndroidCamera2Settings.java | 573 RectF cropRect = new RectF(/*left*/0, /*top*/0, cropWidth, cropHeight); in effectiveCropRectFromRequested() local 577 translateMatrix.postTranslate(-cropRect.centerX(), -cropRect.centerY()); in effectiveCropRectFromRequested() 579 translateMatrix.mapRect(/*inout*/cropRect); in effectiveCropRectFromRequested() 583 cropRect.roundOut(result); in effectiveCropRectFromRequested()
|
/frameworks/native/libs/gui/include/gui/ |
D | GLConsumer.h | 138 const sp<GraphicBuffer>& buf, const Rect& cropRect, 319 const Rect& cropRect,
|
/frameworks/base/core/java/android/hardware/camera2/legacy/ |
D | ParameterUtils.java | 517 RectF cropRect = new RectF(/*left*/0, /*top*/0, cropW, cropH); in getPreviewCropRectangleUnzoomed() local 521 translateMatrix.postTranslate(-cropRect.centerX(), -cropRect.centerY()); in getPreviewCropRectangleUnzoomed() 523 translateMatrix.mapRect(/*inout*/cropRect); in getPreviewCropRectangleUnzoomed() 526 return ParamsUtils.createRect(cropRect); in getPreviewCropRectangleUnzoomed()
|
/frameworks/base/cmds/bootanimation/ |
D | BootAnimation.cpp | 566 int cropRect[4] = { 0, 0, font.char_width, -font.char_height }; in drawText() local 579 cropRect[0] = col * font.char_width; // Left of column in drawText() 580 cropRect[1] = row * font.char_height * 2; // Top of row in drawText() 582 cropRect[1] += bold ? 2 * font.char_height : font.char_height; in drawText() 583 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect); in drawText()
|
/frameworks/native/services/surfaceflinger/tests/ |
D | Transaction_test.cpp | 281 Rect cropRect(16, 16, 32, 32); in TEST_F() local 282 ASSERT_EQ(NO_ERROR, mFGSurfaceControl->setCrop(cropRect)); in TEST_F() 306 Rect cropRect(16, 16, 32, 32); in TEST_F() local 307 ASSERT_EQ(NO_ERROR, mFGSurfaceControl->setFinalCrop(cropRect)); in TEST_F()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/ |
D | CameraTestUtils.java | 1580 MeteringRectangle[] requestRegions, Rect cropRect){ in getExpectedOutputRegion() argument 1586 resultRect.setIntersect(requestRect, cropRect)); in getExpectedOutputRegion()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | WindowStateAnimator.java | 2036 final Rect cropRect = mService.mTmpRect; in seamlesslyRotateWindow() local
|