Home
last modified time | relevance | path

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

1234

/foundation/ace/ace_engine/frameworks/base/geometry/
Dmatrix4.cpp92 Matrix4 Matrix4::Invert(const Matrix4& matrix) in Invert() argument
94 Matrix4 inverted = CreateInvert(matrix); in Invert()
95 …double determinant = matrix(0, 0) * inverted(0, 0) + matrix(0, 1) * inverted(1, 0) + matrix(0, 2) … in Invert()
96 matrix(0, 3) * inverted(3, 0); in Invert()
111 Matrix4::Matrix4(const Matrix4& matrix) in Matrix4() argument
113 std::copy_n(&matrix.matrix4x4_[0][0], MATRIX_LENGTH, &matrix4x4_[0][0]); in Matrix4()
180 Matrix4 Matrix4::CreateInvert(const Matrix4& matrix) in CreateInvert() argument
183 matrix(1, 1) * matrix(2, 2) * matrix(3, 3) - matrix(1, 1) * matrix(2, 3) * matrix(3, 2) - in CreateInvert()
184matrix(2, 1) * matrix(1, 2) * matrix(3, 3) + matrix(2, 1) * matrix(1, 3) * matrix(3, 2) + in CreateInvert()
185 matrix(3, 1) * matrix(1, 2) * matrix(2, 3) - matrix(3, 1) * matrix(1, 3) * matrix(2, 2), in CreateInvert()
[all …]
Dmatrix3.cpp29 bool Matrix3::Invert(Matrix3& matrix) const in Invert()
44 matrix[0][0] = matrix3X3_[1][1] * matrix3X3_[2][2] - matrix3X3_[1][2] * matrix3X3_[2][1]; in Invert()
46 matrix[0][1] = matrix3X3_[0][2] * matrix3X3_[2][1] - matrix3X3_[0][1] * matrix3X3_[2][2]; in Invert()
48 matrix[0][2] = matrix3X3_[0][1] * matrix3X3_[1][2] - matrix3X3_[0][2] * matrix3X3_[1][1]; in Invert()
50 matrix[1][0] = matrix3X3_[1][2] * matrix3X3_[2][0] - matrix3X3_[1][0] * matrix3X3_[2][2]; in Invert()
52 matrix[1][1] = matrix3X3_[0][0] * matrix3X3_[2][2] - matrix3X3_[0][2] * matrix3X3_[2][0]; in Invert()
54 matrix[1][2] = matrix3X3_[1][0] * matrix3X3_[0][2] - matrix3X3_[0][0] * matrix3X3_[1][2]; in Invert()
56 matrix[2][0] = matrix3X3_[1][0] * matrix3X3_[2][1] - matrix3X3_[1][1] * matrix3X3_[2][0]; in Invert()
58 matrix[2][1] = matrix3X3_[0][1] * matrix3X3_[2][0] - matrix3X3_[0][0] * matrix3X3_[2][1]; in Invert()
60 matrix[2][2] = matrix3X3_[0][0] * matrix3X3_[1][1] - matrix3X3_[1][0] * matrix3X3_[0][1]; in Invert()
[all …]
Dtransform_util.cpp73 Matrix4 matrix = Matrix4::CreateIdentity(); in BuildPerspectiveMatrix() local
76 matrix.Set(3, i, decomp.perspective[i]); in BuildPerspectiveMatrix()
78 return matrix; in BuildPerspectiveMatrix()
83 Matrix4 matrix = Matrix4::CreateIdentity(); in BuildTranslationMatrix() local
88 return matrix; in BuildTranslationMatrix()
91 matrix.Set(0, 3, dx); in BuildTranslationMatrix()
92 matrix.Set(1, 3, dy); in BuildTranslationMatrix()
93 matrix.Set(2, 3, dz); in BuildTranslationMatrix()
94 return matrix; in BuildTranslationMatrix()
130 Matrix4 matrix = Matrix4::CreateIdentity(); in BuildSkewMatrix() local
[all …]
Dmatrix4.h48 static Matrix4 Invert(const Matrix4& matrix);
51 Matrix4(const Matrix4& matrix);
66 bool operator==(const Matrix4& matrix) const;
68 Matrix4 operator*(const Matrix4& matrix);
70 Matrix4N operator*(const Matrix4N& matrix) const;
74 Matrix4& operator=(const Matrix4& matrix);
100 static Matrix4 CreateInvert(const Matrix4& matrix);
135 Matrix4 operator*(const MatrixN4& matrix) const;
/foundation/graphic/standard/rosen/modules/2d_graphics/src/engine_adapter/skia_adapter/
Dskia_camera.cpp91 SkMatrix matrix; in ApplyToMatrix() local
92 view_.getMatrix(&matrix); in ApplyToMatrix()
93 …m.SetMatrix(matrix.getScaleX(), matrix.getSkewX(), matrix.getTranslateX(), matrix.getScaleY(), mat… in ApplyToMatrix()
94matrix.getTranslateY(), matrix.getPerspX(), matrix.getPerspY(), matrix.get(SkMatrix::kMPersp2)); in ApplyToMatrix()
/foundation/graphic/utils/frameworks/
Dgraphic_math.cpp108 bool IsIdentity(Matrix3<float>& matrix) in IsIdentity() argument
111 …if (!FloatEqual(matrix[0][0], 1) || !FloatEqual(matrix[1][1], 1) || !FloatEqual(matrix[2][2], 1)) { in IsIdentity()
115 if (!FloatEqual(matrix[0][1], 0) || !FloatEqual(matrix[0][2], 0) || in IsIdentity()
116 !FloatEqual(matrix[2][0], 0) || !FloatEqual(matrix[2][1], 0) || in IsIdentity()
117 !FloatEqual(matrix[1][0], 0) || !FloatEqual(matrix[1][2], 0)) { in IsIdentity()
123 bool IsIdentity(Matrix4<float>& matrix) in IsIdentity() argument
127 … bool flag = (row == col) ? FloatEqual(matrix[row][col], 1) : FloatEqual(matrix[row][col], 0); in IsIdentity()
/foundation/ace/ace_engine/frameworks/core/components/svg/
Drender_svg_fe_colormatrix.cpp36 std::vector<float> matrix; in Update() local
37 StringUtils::StringSpliter(values_, ' ', matrix); in Update()
38 if (matrix.empty()) { in Update()
39 StringUtils::StringSpliter(values_, ',', matrix); in Update()
41 for (int i = 0; i < int(sizeof(matrix_) / sizeof(float)) && i < (int)matrix.size(); i++) { in Update()
44 matrix_[i] = matrix[i] * 255; in Update()
47 matrix_[i] = matrix[i]; in Update()
/foundation/ace/ace_engine/frameworks/core/components/custom_paint/
Dflutter_render_offscreen_canvas.cpp228 float matrix[20] = {0}; in SetPaintImage() local
229 matrix[0] = matrix[6] = matrix[12] = matrix[18] = 1.0f; in SetPaintImage()
231 imagePaint_.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); in SetPaintImage()
233 imagePaint_.setColorFilter(SkColorFilters::Matrix(matrix)); in SetPaintImage()
883 SkMatrix matrix; in Path2DEllipse() local
884 matrix.setRotate(-rotation, x, y); in Path2DEllipse()
885 strokePath_.transform(matrix); in Path2DEllipse()
895 SkMatrix matrix; in Path2DEllipse() local
896 matrix.setRotate(rotation, x, y); in Path2DEllipse()
897 strokePath_.transform(matrix); in Path2DEllipse()
[all …]
Drosen_render_offscreen_canvas.cpp222 float matrix[20] = {0}; in SetPaintImage() local
223 matrix[0] = matrix[6] = matrix[12] = matrix[18] = 1.0f; in SetPaintImage()
225 imagePaint_.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); in SetPaintImage()
227 imagePaint_.setColorFilter(SkColorFilters::Matrix(matrix)); in SetPaintImage()
869 SkMatrix matrix; in Path2DEllipse() local
870 matrix.setRotate(-rotation, x, y); in Path2DEllipse()
871 strokePath_.transform(matrix); in Path2DEllipse()
881 SkMatrix matrix; in Path2DEllipse() local
882 matrix.setRotate(rotation, x, y); in Path2DEllipse()
883 strokePath_.transform(matrix); in Path2DEllipse()
[all …]
/foundation/ace/ace_engine/frameworks/bridge/declarative_frontend/engine/jsi/modules/
Djsi_matrix4_module.cpp50 shared_ptr<JsValue> ConvertToJSValue(const shared_ptr<JsRuntime>& runtime, const Matrix4& matrix) in ConvertToJSValue() argument
56 … result->SetProperty(runtime, runtime->NewInt32(index), runtime->NewNumber(matrix.Get(j, i))); in ConvertToJSValue()
86 auto matrix = ConvertToMatrix(runtime, argv[0]); in Init() local
87 thisObj->SetProperty(runtime, MATRIX_4X4, ConvertToJSValue(runtime, matrix)); in Init()
116 auto matrix = ConvertToMatrix(runtime, matrixArray); in Invert() local
117 matrix = Matrix4::Invert(matrix); in Invert()
118 matrixArray = ConvertToJSValue(runtime, matrix); in Invert()
136 auto matrix = ConvertToMatrix(runtime, matrixArray); in Translate() local
144matrix = Matrix4::CreateTranslate(static_cast<float>(dx), static_cast<float>(dy), static_cast<floa… in Translate()
145 thisObj->SetProperty(runtime, MATRIX_4X4, ConvertToJSValue(runtime, matrix)); in Translate()
[all …]
/foundation/ace/ace_engine/frameworks/bridge/declarative_frontend/engine/quickjs/modules/
Dqjs_matrix4_module.cpp51 JSValue ConvertToJSValue(JSContext* ctx, const Matrix4& matrix) in ConvertToJSValue() argument
57 JS_SetPropertyUint32(ctx, result, index, JS_NewFloat64(ctx, matrix.Get(j, i))); in ConvertToJSValue()
93 auto matrix = ConvertToMatrix(ctx, argv[0]); in Init() local
94 JS_SetPropertyStr(ctx, other, MATRIX_4X4, ConvertToJSValue(ctx, matrix)); in Init()
100 auto matrix = ConvertToMatrix(ctx, JS_GetPropertyStr(ctx, value, MATRIX_4X4)); in Copy() local
106 JS_SetPropertyStr(ctx, other, MATRIX_4X4, ConvertToJSValue(ctx, matrix)); in Copy()
143 auto matrix = ConvertToMatrix(ctx, matrixArray); in Invert() local
144 matrix = Matrix4::Invert(matrix); in Invert()
145 matrixArray = ConvertToJSValue(ctx, matrix); in Invert()
162 auto matrix = ConvertToMatrix(ctx, matrixArray); in Translate() local
[all …]
/foundation/ace/ace_engine/frameworks/bridge/common/utils/
Dtransform_convertor.cpp151 void TransformConvertor::AddKeyframe(AnimationType type, double time, const Matrix4& matrix) in AddKeyframe() argument
155 operation.matrix4_ = matrix; in AddKeyframe()
320 std::vector<double> matrix; in __anondd22934b1402() local
322 matrix.push_back(StringUtils::StringToDouble(offset)); in __anondd22934b1402()
324 Matrix4 m(matrix[0], matrix[4], matrix[8], matrix[12], in __anondd22934b1402()
325 matrix[1], matrix[5], matrix[9], matrix[13], in __anondd22934b1402()
326 matrix[2], matrix[6], matrix[10], matrix[14], in __anondd22934b1402()
327 matrix[3], matrix[7], matrix[11], matrix[15]); in __anondd22934b1402()
342 … Matrix4 matrix = Matrix4::CreateMatrix2D(scaleX, skewY, skewX, scaleY, translateX, translateY); in __anondd22934b1502() local
343 convertor.AddKeyframe(AnimationType::MATRIX_2D, time, matrix); in __anondd22934b1502()
/foundation/graphic/utils/test/
Dgraphic_math_unit_test.cpp439 Matrix3<uint16_t>* matrix = new Matrix3<uint16_t>(1, 1, 1, 1, 1, 1, 1, 1, 1); variable
440 if (matrix == nullptr) {
444 EXPECT_EQ(matrix->GetData()[0], 1);
446 delete matrix;
526 Matrix3<uint16_t>* matrix = new Matrix3<uint16_t>(1, 0, 0, 1, 0, 0, 1, 0, 0); variable
527 if (matrix == nullptr) {
532 EXPECT_EQ(*matrix->operator[](i++), 1);
533 EXPECT_EQ(*matrix->operator[](i++), 1);
534 EXPECT_EQ(*matrix->operator[](i++), 1);
536 delete matrix;
[all …]
/foundation/ace/ace_engine/frameworks/bridge/declarative_frontend/engine/v8/
Dv8_js_matrix4.cpp47 void Matrix4ToArray(const Matrix4& matrix, v8::Isolate* isolate, v8::Local<v8::Array>& out) in Matrix4ToArray() argument
53 …uccess = out->Set(context, i * Matrix4::DIMENSION + j, v8::Number::New(isolate, matrix.Get(j, i))); in Matrix4ToArray()
71 Matrix4 matrix; in CreateMatrix4Object() local
73 Matrix4ToArray(matrix, isolate, arr); in CreateMatrix4Object()
130 Matrix4 matrix = Matrix4::CreateIdentity(); in Identity() local
131 Matrix4ToArray(matrix, isolate, array); in Identity()
232 Matrix4 matrix = ArrayToMatrix4(array, context); in Translate() local
233 matrix = translateMatrix * matrix; in Translate()
235 Matrix4ToArray(matrix, isolate, arr); in Translate()
268 auto matrix = ArrayToMatrix4(array, context); in Scale() local
[all …]
/foundation/ace/ace_engine/frameworks/core/pipeline/layers/
Dtransform_layer.h28 … TransformLayer(const Matrix4& matrix, double x, double y) : OffsetLayer(x, y), matrix_(matrix) {} in DECLARE_ACE_TYPE()
31 void Update(const Matrix4& matrix);
Dgradient_layer.cpp52 tonic::Float64List matrix; in AddToScene() local
54 … gradientShader->initLinear(endPoints, colorList, colorStops, SkShader::kClamp_TileMode, matrix); in AddToScene()
56 gradientShader->initLinear(endPoints, colorList, colorStops, SkTileMode::kClamp, matrix); in AddToScene()
/foundation/ace/ace_engine/frameworks/core/components/common/painter/
Drosen_decoration_painter.cpp388 SkMatrix matrix = SkMatrix::I(); in CreateGradientShader() local
391 matrix.preScale(1.0f, 1 / ratio_, center_.x(), center_.y()); in CreateGradientShader()
420 … center_, radius0_, center_, radius1_, &colors[0], &pos[0], colors.size(), tileMode, 0, &matrix); in CreateGradientShader()
621 SkMatrix matrix = SkMatrix::I(); in CreateGradientShader() local
623 matrix.preRotate(rotation_, center_.fX, center_.fY); in CreateGradientShader()
642 ….fX, center_.fY, &colors[0], &pos[0], colors.size(), tileMode, startAngle_, endAngle_, 0, &matrix); in CreateGradientShader()
1295 float matrix[20] = { 0 }; in PaintGrayScale() local
1296 matrix[0] = matrix[5] = matrix[10] = 0.2126f * scale; in PaintGrayScale()
1297 matrix[1] = matrix[6] = matrix[11] = 0.7152f * scale; in PaintGrayScale()
1298 matrix[2] = matrix[7] = matrix[12] = 0.0722f * scale; in PaintGrayScale()
[all …]
Dflutter_decoration_painter.cpp386 SkMatrix matrix = SkMatrix::I(); in CreateGradientShader() local
389 matrix.preScale(1.0f, 1 / ratio_, center_.x(), center_.y()); in CreateGradientShader()
418 … center_, radius0_, center_, radius1_, &colors[0], &pos[0], colors.size(), tileMode, 0, &matrix); in CreateGradientShader()
619 SkMatrix matrix = SkMatrix::I(); in CreateGradientShader() local
621 matrix.preRotate(rotation_, center_.fX, center_.fY); in CreateGradientShader()
640 ….fX, center_.fY, &colors[0], &pos[0], colors.size(), tileMode, startAngle_, endAngle_, 0, &matrix); in CreateGradientShader()
1341 float matrix[20] = { 0 }; in PaintGrayScale() local
1342 matrix[0] = matrix[5] = matrix[10] = 0.2126f * scale; in PaintGrayScale()
1343 matrix[1] = matrix[6] = matrix[11] = 0.7152f * scale; in PaintGrayScale()
1344 matrix[2] = matrix[7] = matrix[12] = 0.0722f * scale; in PaintGrayScale()
[all …]
/foundation/graphic/standard/utils/color_manager/src/
Dcolor_space_convertor.cpp37 static Matrix3x3 Adaptation(const Matrix3x3& matrix, in Adaptation() argument
41 Vector3 srcLMS = matrix * srcWhitePoint; in Adaptation()
42 Vector3 dstLMS = matrix * dstWhitePoint; in Adaptation()
43 return Invert(matrix) * (dstLMS / srcLMS) * matrix; in Adaptation()
/foundation/graphic/standard/rosen/modules/2d_graphics/src/effect/
Dshader_effect.cpp39 const SamplingOptions& sampling, const Matrix& matrix) noexcept in ShaderEffect() argument
43 impl_->InitWithImage(image, tileX, tileY, sampling, matrix); in ShaderEffect()
47 const Matrix& matrix, const Rect& rect) noexcept in ShaderEffect() argument
51 impl_->InitWithPicture(picture, tileX, tileY, mode, matrix, rect); in ShaderEffect()
106 …mage& image, TileMode tileX, TileMode tileY, const SamplingOptions& sampling, const Matrix& matrix) in CreateImageShader() argument
108 …shared<ShaderEffect>(ShaderEffect::ShaderEffectType::IMAGE, image, tileX, tileY, sampling, matrix); in CreateImageShader()
112 …const Picture& picture, TileMode tileX, TileMode tileY, FilterMode mode, const Matrix& matrix, con… in CreatePictureShader() argument
115 ShaderEffect::ShaderEffectType::PICTURE, picture, tileX, tileY, mode, matrix, rect); in CreatePictureShader()
/foundation/graphic/standard/utils/
DBUILD.gn58 group("matrix") {
59 public_deps = [ "matrix:matrix" ]
96 "matrix:matrix",
/foundation/graphic/standard/rosen/modules/2d_graphics/src/image/
Dimage.cpp30 …age* Image::BuildFromPicture(const Picture& picture, const SizeI& dimensions, const Matrix& matrix, in BuildFromPicture() argument
34 imageImplPtr->BuildFromPicture(picture, dimensions, matrix, brush, bitDepth, colorSpace)); in BuildFromPicture()
/foundation/graphic/standard/rosen/modules/render_service/core/pipeline/
Drs_surface_capture_task.cpp188 auto matrix = node.GetMatrix(); in ProcessSurfaceRenderNode() local
189 param.matrix = matrix; in ProcessSurfaceRenderNode()
202 [this, &matrix](SkCanvas& canvas, BufferDrawParam& params) -> void { in ProcessSurfaceRenderNode()
203 … canvas.translate(-matrix.getTranslateX() * scaleX_, -matrix.getTranslateY() * scaleY_); in ProcessSurfaceRenderNode()
207 param.matrix = SkMatrix::I(); in ProcessSurfaceRenderNode()
/foundation/graphic/standard/rosen/modules/render_service_base/src/pipeline/
Drs_paint_filter_canvas.cpp37 void RSPaintFilterCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkP… in onDrawPicture() argument
41 this->SkCanvas::onDrawPicture(picture, matrix, &filteredPaint); in onDrawPicture()
Drs_draw_cmd.cpp112 MatrixOpItem::MatrixOpItem(const SkMatrix& matrix) : OpItem(sizeof(MatrixOpItem)), matrix_(matrix) … in MatrixOpItem() argument
319 ConcatOpItem::ConcatOpItem(const SkMatrix& matrix) : OpItem(sizeof(ConcatOpItem)), matrix_(matrix) … in ConcatOpItem() argument
350 DrawableOpItem::DrawableOpItem(SkDrawable* drawable, const SkMatrix* matrix) : OpItem(sizeof(Drawab… in DrawableOpItem() argument
353 if (matrix) { in DrawableOpItem()
354 matrix_ = *matrix; in DrawableOpItem()
363 PictureOpItem::PictureOpItem(const sk_sp<SkPicture> picture, const SkMatrix* matrix, const SkPaint*… in PictureOpItem() argument
366 if (matrix) { in PictureOpItem()
367 matrix_ = *matrix; in PictureOpItem()

1234