Home
last modified time | relevance | path

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

1234567

/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/rs/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/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/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/rs/scriptc/
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/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/base/graphics/java/android/graphics/
DColorMatrixColorFilter.java35 public ColorMatrixColorFilter(ColorMatrix matrix) { in ColorMatrixColorFilter() argument
36 mMatrix.set(matrix); in ColorMatrixColorFilter()
81 public void setColorMatrix(ColorMatrix matrix) { in setColorMatrix() argument
82 if (matrix == null) { in setColorMatrix()
84 } else if (matrix != mMatrix) { in setColorMatrix()
85 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.java89 Matrix matrix = new Matrix(); in copyViewImage() local
90 matrix.setTranslate(-parent.getScrollX(), -parent.getScrollY()); in copyViewImage()
91 view.transformMatrixToGlobal(matrix); in copyViewImage()
92 sceneRoot.transformMatrixToLocal(matrix); in copyViewImage()
94 matrix.mapRect(bounds); in copyViewImage()
102 Bitmap bitmap = createViewBitmap(view, matrix, bounds); in copyViewImage()
155 public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds) { in createViewBitmap() argument
163 matrix.postTranslate(-bounds.left, -bounds.top); in createViewBitmap()
164 matrix.postScale(scale, scale); in createViewBitmap()
167 canvas.concat(matrix); in createViewBitmap()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DDisplayAdjustmentUtils.java110 String matrix = Settings.Secure.getStringForUser(cr, in applyAdjustments() local
112 if (matrix != null) { in applyAdjustments()
113 final float[] userMatrix = get4x4Matrix(matrix); in applyAdjustments()
122 private static float[] get4x4Matrix(String matrix) { in get4x4Matrix() argument
123 String[] strValues = matrix.split(","); in get4x4Matrix()
138 private static float[] multiply(float[] matrix, float[] other) { in multiply() argument
139 if (matrix == null) { in multiply()
143 Matrix.multiplyMM(result, 0, matrix, 0, other, 0); in multiply()
/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/base/core/jni/android/graphics/
DMatrix.cpp185 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in postSkew__FF() local
186 matrix->postSkew(kx, ky); in postSkew__FF()
190 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in postConcat() local
192 matrix->postConcat(*other); in postConcat()
196 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in setRectToRect() local
202 return matrix->setRectToRect(src_, dst_, stf) ? JNI_TRUE : JNI_FALSE; in setRectToRect()
208 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in setPolyToPoly() local
220 result = matrix->setPolyToPoly((const SkPoint*)src, (const SkPoint*)dst, in setPolyToPoly()
229 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in invert() local
231 return matrix->invert(inverse); in invert()
[all …]
/frameworks/base/docs/html/guide/topics/renderscript/reference/
Drs_matrix.jd17 a vector is done by postmultiplying the vector, e.g. <code>(matrix * vector)</code>,
21 <p> To create a transformation matrix that performs two transformations at once,
23 argument. E.g. to create a transformation matrix that applies the
30 style simply stores the transformation matrix in the first argument. The latter
31 modifies a pre-existing transformation matrix so that the new transformation
32 …href='rs_matrix.html#android_rs:rsMatrixTranslate'>rsMatrixTranslate</a>() on a matrix that already
33 does a scaling, the resulting matrix when applied to a vector will first do the
68 Inverts a matrix in place
76 Inverts and transpose a matrix in place
84 Load or copy a matrix
[all …]
/frameworks/base/libs/hwui/
DCanvasState.cpp165 void CanvasState::getMatrix(SkMatrix* matrix) const { in getMatrix()
166 mSnapshot->transform->copyTo(*matrix); in getMatrix()
185 void CanvasState::setMatrix(const SkMatrix& matrix) { in setMatrix() argument
186 mSnapshot->transform->load(matrix); in setMatrix()
189 void CanvasState::setMatrix(const Matrix4& matrix) { in setMatrix() argument
190 *(mSnapshot->transform) = matrix; in setMatrix()
193 void CanvasState::concatMatrix(const SkMatrix& matrix) { in concatMatrix() argument
194 mat4 transform(matrix); in concatMatrix()
198 void CanvasState::concatMatrix(const Matrix4& matrix) { in concatMatrix() argument
199 mSnapshot->transform->multiply(matrix); in concatMatrix()
DMatrix.h221 friend std::ostream& operator<<(std::ostream& os, const Matrix4& matrix) {
222 if (matrix.isSimple()) {
223 os << "offset " << matrix.getTranslateX() << "x" << matrix.getTranslateY();
224 if (!matrix.isPureTranslate()) {
225 os << ", scale " << matrix[kScaleX] << "x" << matrix[kScaleY];
228 os << "[" << matrix[0];
230 os << ", " << matrix[i];
/frameworks/native/include/private/gui/
DLayerState.h69 matrix.dsdx = matrix.dtdy = 1.0f; in layer_state_t()
70 matrix.dsdy = matrix.dtdx = 0.0f; in layer_state_t()
94 matrix22_t matrix; member
/frameworks/native/libs/input/
DInput.cpp356 static void transformPoint(const float matrix[9], float x, float y, float *outX, float *outY) { in transformPoint()
358 float newX = matrix[0] * x + matrix[1] * y + matrix[2]; in transformPoint()
359 float newY = matrix[3] * x + matrix[4] * y + matrix[5]; in transformPoint()
360 float newZ = matrix[6] * x + matrix[7] * y + matrix[8]; in transformPoint()
368 static float transformAngle(const float matrix[9], float angleRadians, in transformAngle()
374 transformPoint(matrix, x, y, &x, &y); in transformAngle()
388 void MotionEvent::transform(const float matrix[9]) { in transform()
398 transformPoint(matrix, rawX + oldXOffset, rawY + oldYOffset, &newX, &newY); in transform()
405 transformPoint(matrix, 0, 0, &originX, &originY); in transform()
413 transformPoint(matrix, x, y, &x, &y); in transform()
[all …]
/frameworks/base/services/core/java/com/android/server/input/
DPersistentDataStore.java537 float[] matrix = TouchCalibration.IDENTITY.getAffineTransform(); in loadFromXml() local
543 for (int i = 0; i < matrix.length && i < CALIBRATION_NAME.length; i++) { in loadFromXml()
545 matrix[i] = Float.parseFloat(value); in loadFromXml()
554 mTouchCalibration[r] = new TouchCalibration(matrix[0], in loadFromXml()
555 matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); in loadFromXml()
558 mTouchCalibration[r] = new TouchCalibration(matrix[0], in loadFromXml()
559 matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); in loadFromXml()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DMatrix_Delegate.java84 public void set(Matrix_Delegate matrix) { in set() argument
85 System.arraycopy(matrix.mValues, 0, mValues, 0, MATRIX_SIZE); in set()
118 public static float[] makeValues(AffineTransform matrix) { in makeValues() argument
120 values[0] = (float) matrix.getScaleX(); in makeValues()
121 values[1] = (float) matrix.getShearX(); in makeValues()
122 values[2] = (float) matrix.getTranslateX(); in makeValues()
123 values[3] = (float) matrix.getShearY(); in makeValues()
124 values[4] = (float) matrix.getScaleY(); in makeValues()
125 values[5] = (float) matrix.getTranslateY(); in makeValues()
133 public static Matrix_Delegate make(AffineTransform matrix) { in make() argument
[all …]
/frameworks/opt/chips/src/com/android/ex/chips/
DCircularImageView.java25 private final Matrix matrix; field in CircularImageView
42 matrix = new Matrix(); in CircularImageView()
100 matrix.reset(); in drawBitmapWithCircleOnCanvas()
103 matrix.setRectToRect(source, dest, Matrix.ScaleToFit.FILL); in drawBitmapWithCircleOnCanvas()
105 shader.setLocalMatrix(matrix); in drawBitmapWithCircleOnCanvas()
/frameworks/base/core/jni/android/graphics/pdf/
DPdfEditor.cpp199 CFX_Matrix matrix; in nativeSetTransformAndClip() local
212 matrix.Set(1, 0, 0, -1, 0, page->GetPageHeight()); in nativeSetTransformAndClip()
215 matrix.Concat(transformValues[SkMatrix::kAScaleX], transformValues[SkMatrix::kASkewY], in nativeSetTransformAndClip()
220 matrix.Concat(1, 0, 0, -1, 0, page->GetPageHeight()); in nativeSetTransformAndClip()
222 FS_MATRIX transform = {matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f}; in nativeSetTransformAndClip()
/frameworks/base/core/java/android/app/
DSharedElementCallback.java183 Matrix matrix = imageView.getImageMatrix(); in onCaptureSharedElementSnapshot() local
185 matrix.getValues(values); in onCaptureSharedElementSnapshot()
232 Matrix matrix = new Matrix(); in onCreateSnapshotView() local
233 matrix.setValues(values); in onCreateSnapshotView()
234 imageView.setImageMatrix(matrix); in onCreateSnapshotView()
/frameworks/base/docs/html/training/graphics/opengl/
Dprojection.jd85 // this projection matrix is applied to object coordinates
91 <p>This code populates a projection matrix, {@code mProjectionMatrix} which you can then combine
105 method and then combined with the previously calculated projection matrix. The combined
112 // Set the camera position (View matrix)
126 <p>In order to use the combined projection and camera view transformation matrix shown in the
127 previews sections, first add a matrix variable to the <em>vertex shader</em> previously defined
134 // This matrix member variable provides a hook to manipulate
139 // the matrix must be included as a modifier of gl_Position
141 // for the matrix multiplication product to be correct.
153 transformation matrix and apply it to the shape:</p>
[all …]

1234567