12 : matrix_{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1},
31 : matrix_{col1row1, col2row1, col3row1, col4row1, col1row2, col2row2,
32 col3row2, col4row2, col1row3, col2row3, col3row3, col4row3,
33 col4row4, col2row4, col3row4, col4row4} {
63 return matrix_[0] == rhs[0] && matrix_[1] == rhs[1] && matrix_[2] == rhs[2] &&
64 matrix_[3] == rhs[3] && matrix_[4] == rhs[4] && matrix_[5] == rhs[5] &&
65 matrix_[6] == rhs[6] && matrix_[7] == rhs[7] && matrix_[8] == rhs[8] &&
66 matrix_[9] == rhs[9] && matrix_[10] == rhs[10] &&
67 matrix_[11] == rhs[11] && matrix_[12] == rhs[12] &&
68 matrix_[13] == rhs[13] && matrix_[14] == rhs[14] &&
69 matrix_[15] == rhs[15];
78 "[ %+0.4f %+0.4f %+0.4f %+0.4f \n"
79 " %+0.4f %+0.4f %+0.4f %+0.4f \n"
80 " %+0.4f %+0.4f %+0.4f %+0.4f \n"
81 " %+0.4f %+0.4f %+0.4f %+0.4f ]\n",
82 matrix_[0], matrix_[1], matrix_[2], matrix_[3], matrix_[4], matrix_[5],
83 matrix_[6], matrix_[7], matrix_[8], matrix_[9], matrix_[10], matrix_[11],
84 matrix_[12], matrix_[13], matrix_[14], matrix_[15]);
102 rect->set_origin(origin);
103 rect->set_width(top_right.
x() - origin.
x());
104 rect->set_height(bottom_left.
y() - origin.
y());
110 float x = point->
x();
111 float y = point->
y();
112 point->
SetPoint(
x * matrix_[0] +
y * matrix_[1] + matrix_[2],
113 x * matrix_[4] +
y * matrix_[5] + matrix_[6]);
117void Transform::UpdateIdentity() {
118 for (
size_t i = 0;
i < 16;
i++) {
119 if (
i == 0 ||
i == 5 ||
i == 10 ||
i == 15) {
120 if (matrix_[
i] != 1) {
121 is_identity_ =
false;
125 if (matrix_[
i] != 0) {
126 is_identity_ =
false;
constexpr float x() const
void SetPoint(float x, float y)
constexpr float y() const
sk_sp< SkBlender > blender SkRect rect
std::string StringPrintf(const std::string &format, Args... args)