Home
last modified time | relevance | path

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

/frameworks/native/libs/gui/
DGLConsumerUtils.cpp28 const sp<GraphicBuffer>& buf, const Rect& cropRect, uint32_t transform, in computeTransformMatrix() argument
61 if (!cropRect.isEmpty()) { in computeTransformMatrix()
95 if (cropRect.width() < bufferWidth) { in computeTransformMatrix()
96 tx = (float(cropRect.left) + shrinkAmount) / bufferWidth; in computeTransformMatrix()
97 sx = (float(cropRect.width()) - (2.0f * shrinkAmount)) / in computeTransformMatrix()
100 if (cropRect.height() < bufferHeight) { in computeTransformMatrix()
101 ty = (float(bufferHeight - cropRect.bottom) + shrinkAmount) / in computeTransformMatrix()
103 sy = (float(cropRect.height()) - (2.0f * shrinkAmount)) / in computeTransformMatrix()
/frameworks/base/packages/WallpaperCropper/src/com/android/wallpapercropper/
DWallpaperCropActivity.java371 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/
DImage.java278 public void setCropRect(Rect cropRect) { in setCropRect() argument
281 if (cropRect != null) { in setCropRect()
282 cropRect = new Rect(cropRect); // make a copy in setCropRect()
283 if (!cropRect.intersect(0, 0, getWidth(), getHeight())) { in setCropRect()
284 cropRect.setEmpty(); in setCropRect()
287 mCropRect = cropRect; in setCropRect()
DMediaCodec.java3891 public void setCropRect(@Nullable Rect cropRect) { in setCropRect() argument
3895 super.setCropRect(cropRect); in setCropRect()
3901 long timestamp, int xOffset, int yOffset, @Nullable Rect cropRect) { in MediaImage() argument
3966 if (cropRect == null) { in MediaImage()
3967 cropRect = new Rect(0, 0, mWidth, mHeight); in MediaImage()
3969 cropRect.offset(-xOffset, -yOffset); in MediaImage()
3970 super.setCropRect(cropRect); in MediaImage()
/frameworks/base/graphics/java/android/graphics/drawable/
DAnimatedImageDrawable.java295 Rect cropRect, InputStream inputStream, AssetFileDescriptor afd) in AnimatedImageDrawable() argument
300 if (cropRect == null) { in AnimatedImageDrawable()
304 cropRect.set(Bitmap.scaleFromDensity(cropRect.left, srcDensity, dstDensity), in AnimatedImageDrawable()
305 Bitmap.scaleFromDensity(cropRect.top, srcDensity, dstDensity), in AnimatedImageDrawable()
306 Bitmap.scaleFromDensity(cropRect.right, srcDensity, dstDensity), in AnimatedImageDrawable()
307 Bitmap.scaleFromDensity(cropRect.bottom, srcDensity, dstDensity)); in AnimatedImageDrawable()
308 mIntrinsicWidth = cropRect.width(); in AnimatedImageDrawable()
309 mIntrinsicHeight = cropRect.height(); in AnimatedImageDrawable()
313 extended, cropRect), inputStream, afd); in AnimatedImageDrawable()
578 boolean extended, Rect cropRect) throws IOException; in nCreate() argument
/frameworks/base/libs/hwui/surfacetexture/
DSurfaceTexture.cpp288 const Rect& cropRect, uint32_t transform, in computeTransformMatrix() argument
306 if (!cropRect.isEmpty() && buf.get()) { in computeTransformMatrix()
340 if (cropRect.width() < bufferWidth) { in computeTransformMatrix()
341 tx = (float(cropRect.left) + shrinkAmount) / bufferWidth; in computeTransformMatrix()
342 sx = (float(cropRect.width()) - (2.0f * shrinkAmount)) / bufferWidth; in computeTransformMatrix()
344 if (cropRect.height() < bufferHeight) { in computeTransformMatrix()
345 ty = (float(bufferHeight - cropRect.bottom) + shrinkAmount) / bufferHeight; in computeTransformMatrix()
346 sy = (float(cropRect.height()) - (2.0f * shrinkAmount)) / bufferHeight; in computeTransformMatrix()
DSurfaceTexture.h140 const Rect& cropRect, uint32_t transform, bool filtering);
/frameworks/base/media/jni/
Dandroid_media_ImageWriter.cpp602 android_native_rect_t cropRect; in ImageWriter_queueImage() local
603 cropRect.left = left; in ImageWriter_queueImage()
604 cropRect.top = top; in ImageWriter_queueImage()
605 cropRect.right = right; in ImageWriter_queueImage()
606 cropRect.bottom = bottom; in ImageWriter_queueImage()
607 res = native_window_set_crop(anw.get(), &cropRect); in ImageWriter_queueImage()
699 android_native_rect_t cropRect; in ImageWriter_attachAndQueueImage() local
700 cropRect.left = left; in ImageWriter_attachAndQueueImage()
701 cropRect.top = top; in ImageWriter_attachAndQueueImage()
702 cropRect.right = right; in ImageWriter_attachAndQueueImage()
[all …]
Dandroid_media_MediaCodec.cpp583 jobject cropRect = NULL; in getImage() local
593 cropRect = env->NewObject( in getImage()
608 (jint)0 /* xOffset */, (jint)0 /* yOffset */, cropRect); in getImage()
617 if (cropRect != NULL) { in getImage()
618 env->DeleteLocalRef(cropRect); in getImage()
619 cropRect = NULL; in getImage()
/frameworks/base/core/java/android/app/
DWallpaperManager.java730 RectF cropRect = new RectF(0, 0, crop.getWidth(), crop.getHeight()); in getBuiltInDrawable() local
732 m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); in getBuiltInDrawable()
751 RectF cropRect = new RectF(); in getMaxCropRect() local
754 cropRect.top = 0; in getMaxCropRect()
755 cropRect.bottom = inHeight; in getMaxCropRect()
757 cropRect.left = (inWidth - cropWidth) * horizontalAlignment; in getMaxCropRect()
758 cropRect.right = cropRect.left + cropWidth; in getMaxCropRect()
760 cropRect.left = 0; in getMaxCropRect()
761 cropRect.right = inWidth; in getMaxCropRect()
763 cropRect.top = (inHeight - cropHeight) * verticalAlignment; in getMaxCropRect()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawable/
DCircleFramedDrawable.java69 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/
DAndroidCamera2Settings.java573 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/base/services/core/java/com/android/server/am/
DCarUserSwitchingDialog.java128 final Rect cropRect = new Rect((width - square) / 2, (height - square) / 2, in CircleFramedDrawable() local
146 canvas.drawBitmap(icon, cropRect, circleRect, mPaint); in CircleFramedDrawable()
/frameworks/base/core/java/android/hardware/camera2/legacy/
DParameterUtils.java517 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/
DLayer.h132 RoundedCornerState(FloatRect cropRect, float radius) in RoundedCornerState()
133 : cropRect(cropRect), radius(radius) {} in RoundedCornerState()
136 FloatRect cropRect = FloatRect(); member
DLayer.cpp558 layer.geometry.roundedCornersCrop = roundedCornerState.cropRect; in prepareClientLayer()
1830 parentState.cropRect = t.transform(parentState.cropRect); in getRoundedCornerState()
/frameworks/base/cmds/bootanimation/
DBootAnimation.cpp637 int cropRect[4] = { 0, 0, font.char_width, -font.char_height }; in drawText() local
650 cropRect[0] = col * font.char_width; // Left of column in drawText()
651 cropRect[1] = row * font.char_height * 2; // Top of row in drawText()
653 cropRect[1] += bold ? 2 * font.char_height : font.char_height; in drawText()
654 glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect); in drawText()
/frameworks/native/libs/gui/include/gui/
DGLConsumer.h138 const sp<GraphicBuffer>& buf, const Rect& cropRect,
/frameworks/native/services/surfaceflinger/tests/fakehwc/
DSFFakeHwc_test.cpp633 Rect cropRect(16, 16, 32, 32); in TEST_F() local
634 ts.setCrop_legacy(mFGSurfaceControl, cropRect); in TEST_F()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraTestUtils.java1652 MeteringRectangle[] requestRegions, Rect cropRect){ in getExpectedOutputRegion() argument
1658 resultRect.setIntersect(requestRect, cropRect)); in getExpectedOutputRegion()
/frameworks/base/graphics/java/android/graphics/
DImageDecoder.java1988 @Nullable Rect cropRect, boolean mutable, in nDecodeBitmap() argument