/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 | 3549 public void setCropRect(@Nullable Rect cropRect) { in setCropRect() argument 3553 super.setCropRect(cropRect); in setCropRect() 3559 long timestamp, int xOffset, int yOffset, @Nullable Rect cropRect) { in MediaImage() argument 3624 if (cropRect == null) { in MediaImage() 3625 cropRect = new Rect(0, 0, mWidth, mHeight); in MediaImage() 3627 cropRect.offset(-xOffset, -yOffset); in MediaImage() 3628 super.setCropRect(cropRect); in MediaImage()
|
/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/jni/ |
D | android_media_ImageWriter.cpp | 458 android_native_rect_t cropRect; in ImageWriter_queueImage() local 459 cropRect.left = left; in ImageWriter_queueImage() 460 cropRect.top = top; in ImageWriter_queueImage() 461 cropRect.right = right; in ImageWriter_queueImage() 462 cropRect.bottom = bottom; in ImageWriter_queueImage() 463 res = native_window_set_crop(anw.get(), &cropRect); in ImageWriter_queueImage() 543 android_native_rect_t cropRect; in ImageWriter_attachAndQueueImage() local 544 cropRect.left = left; in ImageWriter_attachAndQueueImage() 545 cropRect.top = top; in ImageWriter_attachAndQueueImage() 546 cropRect.right = right; in ImageWriter_attachAndQueueImage() [all …]
|
D | android_media_MediaCodec.cpp | 565 jobject cropRect = NULL; in getImage() local 575 cropRect = env->NewObject( in getImage() 590 (jint)0 /* xOffset */, (jint)0 /* yOffset */, cropRect); in getImage() 599 if (cropRect != NULL) { in getImage() 600 env->DeleteLocalRef(cropRect); in getImage() 601 cropRect = NULL; in getImage()
|
/frameworks/base/core/java/android/app/ |
D | WallpaperManager.java | 618 RectF cropRect = new RectF(0, 0, crop.getWidth(), crop.getHeight()); in getBuiltInDrawable() local 620 m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in getBuiltInDrawable() 639 RectF cropRect = new RectF(); in getMaxCropRect() local 642 cropRect.top = 0; in getMaxCropRect() 643 cropRect.bottom = inHeight; in getMaxCropRect() 645 cropRect.left = (inWidth - cropWidth) * horizontalAlignment; in getMaxCropRect() 646 cropRect.right = cropRect.left + cropWidth; in getMaxCropRect() 648 cropRect.left = 0; in getMaxCropRect() 649 cropRect.right = inWidth; in getMaxCropRect() 651 cropRect.top = (inHeight - cropHeight) * verticalAlignment; in getMaxCropRect() [all …]
|
/frameworks/native/libs/gui/ |
D | GLConsumer.cpp | 819 const sp<GraphicBuffer>& buf, const Rect& cropRect, uint32_t transform, in computeTransformMatrix() argument 849 if (!cropRect.isEmpty()) { in computeTransformMatrix() 883 if (cropRect.width() < bufferWidth) { in computeTransformMatrix() 884 tx = (float(cropRect.left) + shrinkAmount) / bufferWidth; in computeTransformMatrix() 885 sx = (float(cropRect.width()) - (2.0f * shrinkAmount)) / in computeTransformMatrix() 888 if (cropRect.height() < bufferHeight) { in computeTransformMatrix() 889 ty = (float(bufferHeight - cropRect.bottom) + shrinkAmount) / in computeTransformMatrix() 891 sy = (float(cropRect.height()) - (2.0f * shrinkAmount)) / in computeTransformMatrix() 1195 const Rect& cropRect, in createIfNeeded() argument 1200 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/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/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/cmds/bootanimation/ |
D | BootAnimation.cpp | 583 int cropRect[4] = { 0, 0, font.char_width, -font.char_height }; in drawText() local 596 cropRect[0] = col * font.char_width; // Left of column in drawText() 597 cropRect[1] = row * font.char_height * 2; // Top of row in drawText() 599 cropRect[1] += bold ? 2 * font.char_height : font.char_height; in drawText() 600 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect); in drawText()
|
/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 | 1995 final Rect cropRect = mService.mTmpRect; in seamlesslyRotateWindow() local
|