Home
last modified time | relevance | path

Searched refs:matrix (Results 1 – 25 of 207) sorted by relevance

123456789

/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DTransform3dActivity.java61 final Matrix matrix = mMatrix; in onDraw() local
63 rotate(centerX, centerY, camera, matrix, 32.0f); in onDraw()
64 drawBitmap(canvas, centerX, centerY, 0.0f, matrix); in onDraw()
66 rotate(centerX, centerY, camera, matrix, 12.0f); in onDraw()
67 drawBitmap(canvas, centerX, centerY, -mBitmap1.getWidth(), matrix); in onDraw()
69 rotate(centerX, centerY, camera, matrix, 52.0f); in onDraw()
70 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth(), matrix); in onDraw()
72 rotate(centerX, centerY, camera, matrix, 122.0f); in onDraw()
73 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth() * 2.0f, matrix); in onDraw()
78 Matrix matrix) { in drawBitmap() argument
[all …]
/frameworks/support/transition/src/androidTest/java/androidx/transition/
DChangeImageTransformTest.java100 Matrix matrix = new Matrix(); in centerMatrix() local
101 matrix.postTranslate(tx, ty); in centerMatrix()
102 return matrix; in centerMatrix()
114 Matrix matrix = new Matrix(); in fitXYMatrix() local
115 matrix.postScale(scaleX, scaleY); in fitXYMatrix()
116 return matrix; in fitXYMatrix()
135 Matrix matrix = new Matrix(); in centerCropMatrix() local
136 matrix.postScale(maxScale, maxScale); in centerCropMatrix()
137 matrix.postTranslate(tx, ty); in centerCropMatrix()
138 return matrix; in centerCropMatrix()
[all …]
/frameworks/opt/bitmap/src/com/android/bitmap/util/
DRectUtils.java39 final Matrix matrix = new Matrix(); in rotateRectForOrientation() local
42 matrix.setRotate(-orientation); in rotateRectForOrientation()
45 matrix.mapRect(fullRectF); in rotateRectForOrientation()
46 matrix.mapRect(partialRectF); in rotateRectForOrientation()
48 matrix.reset(); in rotateRectForOrientation()
49 matrix.setTranslate(-fullRectF.left, -fullRectF.top); in rotateRectForOrientation()
50 matrix.mapRect(fullRectF); in rotateRectForOrientation()
51 matrix.mapRect(partialRectF); in rotateRectForOrientation()
61 final Matrix matrix = new Matrix(); in rotateRect() local
62 matrix.setRotate(degrees, px, py); in rotateRect()
[all …]
/frameworks/rs/script_api/
Drs_matrix.spec28 a vector is done by postmultiplying the vector, e.g. <code>(matrix * vector)</code>,
31 To create a transformation matrix that performs two transformations at once,
33 argument. E.g. to create a transformation matrix that applies the
39 style simply stores the transformation matrix in the first argument. The latter
40 modifies a pre-existing transformation matrix so that the new transformation
41 happens first. E.g. if you call @rsMatrixTranslate() on a matrix that already
42 does a scaling, the resulting matrix when applied to a vector will first do the
60 Computes 6 frustum planes from the view projection matrix
187 Returns one element of a matrix.
196 summary: Inverts a matrix in place
[all …]
/frameworks/opt/photoviewer/sample/src/com/example/photoviewersample/
DSampleProvider.java63 MatrixCursor matrix = new MatrixCursor(projection); in query() local
72 addRow(matrix, PHOTO_INDIVIDUAL_1); in query()
73 addRow(matrix, PHOTO_INDIVIDUAL_2); in query()
74 addRow(matrix, PHOTO_INDIVIDUAL_3); in query()
75 addRow(matrix, PHOTO_INDIVIDUAL_4); in query()
80 addRow(matrix, PHOTO_INDIVIDUAL_1); in query()
83 addRow(matrix, PHOTO_INDIVIDUAL_2); in query()
86 addRow(matrix, PHOTO_INDIVIDUAL_3); in query()
89 addRow(matrix, PHOTO_INDIVIDUAL_4); in query()
97 return matrix; in query()
[all …]
/frameworks/support/transition/src/main/java/androidx/transition/
DViewUtilsBase.java61 public void transformMatrixToGlobal(@NonNull View view, @NonNull Matrix matrix) { in transformMatrixToGlobal() argument
65 transformMatrixToGlobal(vp, matrix); in transformMatrixToGlobal()
66 matrix.preTranslate(-vp.getScrollX(), -vp.getScrollY()); in transformMatrixToGlobal()
68 matrix.preTranslate(view.getLeft(), view.getTop()); in transformMatrixToGlobal()
71 matrix.preConcat(vm); in transformMatrixToGlobal()
75 public void transformMatrixToLocal(@NonNull View view, @NonNull Matrix matrix) { in transformMatrixToLocal() argument
79 transformMatrixToLocal(vp, matrix); in transformMatrixToLocal()
80 matrix.postTranslate(vp.getScrollX(), vp.getScrollY()); in transformMatrixToLocal()
82 matrix.postTranslate(view.getLeft(), view.getTop()); in transformMatrixToLocal()
87 matrix.postConcat(inverted); in transformMatrixToLocal()
[all …]
DTransitionUtils.java51 Matrix matrix = new Matrix(); in copyViewImage() local
52 matrix.setTranslate(-parent.getScrollX(), -parent.getScrollY()); in copyViewImage()
53 ViewUtils.transformMatrixToGlobal(view, matrix); in copyViewImage()
54 ViewUtils.transformMatrixToLocal(sceneRoot, matrix); in copyViewImage()
56 matrix.mapRect(bounds); in copyViewImage()
64 Bitmap bitmap = createViewBitmap(view, matrix, bounds, sceneRoot); in copyViewImage()
89 private static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds, in createViewBitmap() argument
117 matrix.postTranslate(-bounds.left, -bounds.top); in createViewBitmap()
118 matrix.postScale(scale, scale); in createViewBitmap()
124 canvas.concat(matrix); in createViewBitmap()
[all …]
DViewUtilsApi21.java42 public void transformMatrixToGlobal(@NonNull View view, @NonNull Matrix matrix) { in transformMatrixToGlobal() argument
46 sTransformMatrixToGlobalMethod.invoke(view, matrix); in transformMatrixToGlobal()
56 public void transformMatrixToLocal(@NonNull View view, @NonNull Matrix matrix) { in transformMatrixToLocal() argument
60 sTransformMatrixToLocalMethod.invoke(view, matrix); in transformMatrixToLocal()
70 public void setAnimationMatrix(@NonNull View view, Matrix matrix) { in setAnimationMatrix() argument
74 sSetAnimationMatrixMethod.invoke(view, matrix); in setAnimationMatrix()
/frameworks/rs/script_api/include/
Drs_matrix.rsh30 * a vector is done by postmultiplying the vector, e.g. (matrix * vector),
33 * To create a transformation matrix that performs two transformations at once,
35 * argument. E.g. to create a transformation matrix that applies the
41 * style simply stores the transformation matrix in the first argument. The latter
42 * modifies a pre-existing transformation matrix so that the new transformation
43 * happens first. E.g. if you call rsMatrixTranslate() on a matrix that already
44 * does a scaling, the resulting matrix when applied to a vector will first do the
56 * Computes 6 frustum planes from the view projection matrix
178 * Returns one element of a matrix.
197 * rsMatrixInverse: Inverts a matrix in place
[all …]
/frameworks/base/libs/hwui/tests/common/scenes/
DSimpleColorMatrixAnimation.cpp56 float matrix[20] = {0}; in createCard() local
59 matrix[SkColorMatrix::kR_Scale] = 1.1f; in createCard()
60 matrix[SkColorMatrix::kG_Scale] = 1.1f; in createCard()
61 matrix[SkColorMatrix::kB_Scale] = 1.1f; in createCard()
62 matrix[SkColorMatrix::kA_Scale] = 0.5f; in createCard()
64 matrix[SkColorMatrix::kR_Trans] = 5.0f; in createCard()
65 matrix[SkColorMatrix::kG_Trans] = 5.0f; in createCard()
66 matrix[SkColorMatrix::kB_Trans] = 5.0f; in createCard()
67 matrix[SkColorMatrix::kA_Trans] = 10.0f; in createCard()
69 paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); in createCard()
/frameworks/base/core/jni/android/graphics/
DShader.cpp66 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in BitmapShader_constructor() local
82 if (matrix) { in BitmapShader_constructor()
83 shader = shader->makeWithLocalMatrix(*matrix); in BitmapShader_constructor()
98 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in LinearGradient_create1() local
118 if (matrix) { in LinearGradient_create1()
119 shader = baseShader->makeWithLocalMatrix(*matrix).release(); in LinearGradient_create1()
131 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in LinearGradient_create2() local
145 if (matrix) { in LinearGradient_create2()
146 s = baseShader->makeWithLocalMatrix(*matrix).release(); in LinearGradient_create2()
159 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in RadialGradient_create1() local
[all …]
DMatrix.cpp62 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in mapPoints() local
71 matrix->mapPoints((SkPoint*) dstArray, (const SkPoint*) srcArray, in mapPoints()
74 matrix->mapVectors((SkVector*) dstArray, (const SkVector*) srcArray, in mapPoints()
80 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in mapRect__RectFRectF() local
83 jboolean rectStaysRect = matrix->mapRect(&dst_, src_); in mapRect__RectFRectF()
90 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in setRectToRect() local
96 return matrix->setRectToRect(src_, dst_, stf) ? JNI_TRUE : JNI_FALSE; in setRectToRect()
102 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in setPolyToPoly() local
115 result = matrix->setPolyToPoly((const SkPoint*) src, in setPolyToPoly()
122 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in getValues() local
[all …]
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/
DAssistVisualizer.java38 final Matrix matrix; field in AssistVisualizer.TextEntry
47 TextEntry(AssistStructure.ViewNode node, int parentLeft, int parentTop, Matrix matrix) { in TextEntry() argument
53 this.matrix = new Matrix(matrix); in TextEntry()
97 Matrix matrix = new Matrix(); in setAssistStructure() local
98 matrix.setTranslate(windowNode.getLeft(), windowNode.getTop()); in setAssistStructure()
99 mMatrixStack.add(matrix); in setAssistStructure()
120 + " matrix=" + te.matrix.toShortString() in logText()
147 Matrix matrix;
149 matrix = mMatrixStack.get(matrixStackIndex);
150 matrix.set(parentMatrix);
[all …]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DImageShader.java434 public void setSourceTransform(float[] matrix) { in setSourceTransform() argument
435 if (matrix.length != 16) { in setSourceTransform()
439 matrix[12], in setSourceTransform()
440 matrix[13], in setSourceTransform()
442 matrix[0] + matrix[12], in setSourceTransform()
443 matrix[1] + matrix[13], in setSourceTransform()
445 matrix[4] + matrix[12], in setSourceTransform()
446 matrix[5] + matrix[13], in setSourceTransform()
448 matrix[0] + matrix[4] + matrix[12], in setSourceTransform()
449 matrix[1] + matrix[5] + matrix[13], in setSourceTransform()
[all …]
/frameworks/base/core/java/android/gesture/
DOrientedBoundingBox.java60 Matrix matrix = new Matrix(); in toPath() local
61 matrix.setRotate(orientation); in toPath()
62 matrix.postTranslate(centerX, centerY); in toPath()
63 matrix.mapPoints(point); in toPath()
68 matrix.mapPoints(point); in toPath()
73 matrix.mapPoints(point); in toPath()
78 matrix.mapPoints(point); in toPath()
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/
DCanvasTest.kt33 canvas.matrix.getValues(values) in withSave()
42 canvas.matrix.getValues(values) in withSave()
55 matrix.getValues(values) // will work for a software canvas in withTranslation()
69 matrix.getValues(values) // will work for a software canvas in withRotation()
85 matrix.getValues(values) // will work for a software canvas in withScale()
101 matrix.getValues(values) // will work for a software canvas in withSkew()
111 val originMatrix = canvas.matrix in withMatrix()
121 assertEquals(inputMatrix, matrix) in withMatrix()
124 assertEquals(originMatrix, canvas.matrix) in withMatrix()
/frameworks/base/libs/hwui/tests/unit/
DSkiaRenderPropertiesTests.cpp127 Matrix4 matrix; in TEST() local
128 matrix.loadTranslate(10, 10, 0); // left, top in TEST()
129 matrix.scale(1.2f, 1.2f, 1); // static matrix in TEST()
133 matrix.translate(10, 20); in TEST()
136 matrix.translate(50, 50); in TEST()
137 matrix.scale(0.5f, 0.7f, 1); in TEST()
138 matrix.translate(-50, -50); in TEST()
140 EXPECT_MATRIX_APPROX_EQ(matrix, actual) << "Op draw matrix must match expected " in TEST()
/frameworks/base/libs/hwui/
DRenderProperties.cpp98 SkMatrix* matrix) { in dumpMatrix() argument
99 if (matrix) { in dumpMatrix()
100 output << indent << "(" << label << " " << matrix << ": "; in dumpMatrix()
102 output << "[" << matrix->get(0) << " " << matrix->get(1) << " " << matrix->get(2) << "]"; in dumpMatrix()
103 output << " [" << matrix->get(3) << " " << matrix->get(4) << " " << matrix->get(5) << "]"; in dumpMatrix()
104 output << " [" << matrix->get(6) << " " << matrix->get(7) << " " << matrix->get(8) << "]"; in dumpMatrix()
DCanvasState.cpp157 void CanvasState::getMatrix(SkMatrix* matrix) const { in getMatrix()
158 mSnapshot->transform->copyTo(*matrix); in getMatrix()
177 void CanvasState::setMatrix(const SkMatrix& matrix) { in setMatrix() argument
178 mSnapshot->transform->load(matrix); in setMatrix()
181 void CanvasState::setMatrix(const Matrix4& matrix) { in setMatrix() argument
182 *(mSnapshot->transform) = matrix; in setMatrix()
185 void CanvasState::concatMatrix(const SkMatrix& matrix) { in concatMatrix() argument
186 mat4 transform(matrix); in concatMatrix()
190 void CanvasState::concatMatrix(const Matrix4& matrix) { in concatMatrix() argument
191 mSnapshot->transform->multiply(matrix); in concatMatrix()
/frameworks/base/graphics/java/android/graphics/
DColorMatrixColorFilter.java38 public ColorMatrixColorFilter(@NonNull ColorMatrix matrix) { in ColorMatrixColorFilter() argument
39 mMatrix.set(matrix); in ColorMatrixColorFilter()
79 public void setColorMatrix(@Nullable ColorMatrix matrix) { in setColorMatrix() argument
81 if (matrix == null) { in setColorMatrix()
84 mMatrix.set(matrix); in setColorMatrix()
/frameworks/base/core/java/android/transition/
DChangeImageTransform.java98 Matrix matrix; in captureValues() local
101 matrix = imageView.getImageMatrix(); in captureValues()
102 if (!matrix.isIdentity()) { in captureValues()
103 matrix = new Matrix(matrix); in captureValues()
110 matrix = new Matrix(); in captureValues()
111 matrix.setScale(scaleX, scaleY); in captureValues()
113 matrix = null; in captureValues()
117 matrix = new Matrix(imageView.getImageMatrix()); in captureValues()
119 values.put(PROPNAME_MATRIX, matrix); in captureValues()
DTransitionUtils.java90 Matrix matrix = new Matrix(); in copyViewImage() local
91 matrix.setTranslate(-parent.getScrollX(), -parent.getScrollY()); in copyViewImage()
92 view.transformMatrixToGlobal(matrix); in copyViewImage()
93 sceneRoot.transformMatrixToLocal(matrix); in copyViewImage()
95 matrix.mapRect(bounds); in copyViewImage()
103 Bitmap bitmap = createViewBitmap(view, matrix, bounds, sceneRoot); in copyViewImage()
160 public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds, in createViewBitmap() argument
180 matrix.postTranslate(-bounds.left, -bounds.top); in createViewBitmap()
181 matrix.postScale(scale, scale); in createViewBitmap()
185 canvas.concat(matrix); in createViewBitmap()
/frameworks/support/core/ktx/src/main/java/androidx/core/graphics/
DShader.kt26 val matrix = Matrix() in transform() constant
27 getLocalMatrix(matrix) in transform()
28 block(matrix) in transform()
29 setLocalMatrix(matrix) in transform()
/frameworks/base/core/java/android/view/
DGhostView.java60 public void setMatrix(Matrix matrix) { in setMatrix() argument
61 mRenderNode.setAnimationMatrix(matrix); in setMatrix()
86 public static void calculateMatrix(View view, ViewGroup host, Matrix matrix) { in calculateMatrix() argument
88 matrix.reset(); in calculateMatrix()
89 parent.transformMatrixToGlobal(matrix); in calculateMatrix()
90 matrix.preTranslate(-parent.getScrollX(), -parent.getScrollY()); in calculateMatrix()
91 host.transformMatrixToLocal(matrix); in calculateMatrix()
94 public static GhostView addGhost(View view, ViewGroup viewGroup, Matrix matrix) { in addGhost() argument
112 if (matrix == null) { in addGhost()
113 matrix = new Matrix(); in addGhost()
[all …]
/frameworks/support/samples/SupportTransitionDemos/src/main/java/com/example/android/support/transition/widget/
DChangeImageTransformUsage.java71 case R.id.matrix: in onCreate()
73 final Matrix matrix = new Matrix(); in onCreate()
74 matrix.setRotate(45.f); in onCreate()
75 matrix.postTranslate(200, 10); in onCreate()
76 mPhoto.setImageMatrix(matrix); in onCreate()
86 findViewById(R.id.matrix).setOnClickListener(listener); in onCreate()

123456789