Skip to content

Commit b236e55

Browse files
committed
💚
1 parent a34e956 commit b236e55

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

package/cpp/rnskia/dom/props/TransformProp.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,33 @@ class TransformProp : public DerivedProp<SkMatrix> {
9191
m4.preConcat(scale);
9292
} else if (key == PropNameSkewX) {
9393
auto angle = el.getValue(key).getAsNumber();
94-
SkM44 skewX(1, 0, 0, 0, std::tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
94+
SkM44 skewX(1, 0, 0, 0, std::tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
95+
1);
9596
m4.preConcat(skewX);
9697
} else if (key == PropNameSkewY) {
9798
auto angle = el.getValue(key).getAsNumber();
98-
SkM44 skewY(1, std::tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
99+
SkM44 skewY(1, std::tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
100+
1);
99101
m4.preConcat(skewY);
100102
} else if (key == PropNameRotate || key == PropNameRotateZ) {
101103
auto angle = el.getValue(key).getAsNumber();
102104
SkM44 rotate;
103-
rotate.setRotateUnit({ 0, 0, 1 }, angle);
105+
rotate.setRotateUnit({0, 0, 1}, angle);
104106
m4.preConcat(rotate);
105107
} else if (key == PropNameRotateY) {
106108
auto angle = el.getValue(key).getAsNumber();
107109
SkM44 rotate;
108-
rotate.setRotateUnit({ 0, 1, 0 }, angle);
110+
rotate.setRotateUnit({0, 1, 0}, angle);
109111
m4.preConcat(rotate);
110112
} else if (key == PropNameRotateX) {
111113
auto angle = el.getValue(key).getAsNumber();
112114
SkM44 rotate;
113-
rotate.setRotateUnit({ 1, 0, 0 }, angle);
115+
rotate.setRotateUnit({1, 0, 0}, angle);
114116
m4.preConcat(rotate);
115117
} else if (key == PropNamePerspective) {
116118
auto p = el.getValue(key).getAsNumber();
117-
SkM44 perspective(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1 / p, 1);
119+
SkM44 perspective(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1 / p,
120+
1);
118121
m4.preConcat(perspective);
119122
} else if (key == PropNameMatrix4) {
120123
auto arr = el.getValue(key).getAsArray();

0 commit comments

Comments
 (0)