mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
svg_loader: Add missing implementation of skewX and skewY in transform-list
This commit is contained in:
parent
fb5586447f
commit
d23e0fd22c
1 changed files with 10 additions and 0 deletions
|
@ -786,6 +786,16 @@ static Matrix* _parseTransformationMatrix(const char* value)
|
|||
if (ptCount == 2) sy = points[1];
|
||||
Matrix tmp = { sx, 0, 0, 0, sy, 0, 0, 0, 1 };
|
||||
_matrixCompose(matrix, &tmp, matrix);
|
||||
} else if (state == MatrixState::SkewX) {
|
||||
if (ptCount != 1) goto error;
|
||||
auto deg = tanf(points[0] * (M_PI / 180.0));
|
||||
Matrix tmp = { 1, deg, 0, 0, 1, 0, 0, 0, 1 };
|
||||
_matrixCompose(matrix, &tmp, matrix);
|
||||
} else if (state == MatrixState::SkewY) {
|
||||
if (ptCount != 1) goto error;
|
||||
auto deg = tanf(points[0] * (M_PI / 180.0));
|
||||
Matrix tmp = { 1, 0, 0, deg, 1, 0, 0, 0, 1 };
|
||||
_matrixCompose(matrix, &tmp, matrix);
|
||||
}
|
||||
}
|
||||
return matrix;
|
||||
|
|
Loading…
Add table
Reference in a new issue