mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix multiply matrix order for skew.
This commit is contained in:
parent
81e51b31d6
commit
b0a91ecd3a
1 changed files with 3 additions and 3 deletions
|
@ -2397,19 +2397,19 @@ impl From<MatrixDecomposed3D> for ComputedMatrix {
|
|||
let mut temp = ComputedMatrix::identity();
|
||||
if decomposed.skew.2 != 0.0 {
|
||||
temp.m32 = decomposed.skew.2;
|
||||
matrix = multiply(matrix, temp);
|
||||
matrix = multiply(temp, matrix);
|
||||
}
|
||||
|
||||
if decomposed.skew.1 != 0.0 {
|
||||
temp.m32 = 0.0;
|
||||
temp.m31 = decomposed.skew.1;
|
||||
matrix = multiply(matrix, temp);
|
||||
matrix = multiply(temp, matrix);
|
||||
}
|
||||
|
||||
if decomposed.skew.0 != 0.0 {
|
||||
temp.m31 = 0.0;
|
||||
temp.m21 = decomposed.skew.0;
|
||||
matrix = multiply(matrix, temp);
|
||||
matrix = multiply(temp, matrix);
|
||||
}
|
||||
|
||||
// Apply scale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue