mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:47:44 +00:00
LibWeb: Fix DOMMatrix fromMatrix to use complete DOMMatrixInit struct
DOMMatrix fromMatrix was using create_from_dom_matrix_2d_init to make a DOMMatrix for it's init struct this is wrong because only the 2D params of the DOMMatrix are put into the new matrix. I have added a non 2D version of that function that takes the full DOMMatrixInit so now fromMatrix works correctly again. I also have added some text tests to test if it works correctly. I split the dommatrix.html text tests into multiple files because that file was becoming to big so now every sub function is a seperate file.
This commit is contained in:
parent
5d37e1c220
commit
67f6a9ee12
14 changed files with 174 additions and 69 deletions
4
Tests/LibWeb/Text/expected/geometry/dommatrix-create.txt
Normal file
4
Tests/LibWeb/Text/expected/geometry/dommatrix-create.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
1. {"a":10,"b":20,"c":30,"d":40,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
2. {"a":10,"b":20,"c":30,"d":40,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
3. {"a":10,"b":20,"c":50,"d":60,"e":130,"f":140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
||||
4. {"a":10,"b":20,"c":50,"d":60,"e":130,"f":140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
4
Tests/LibWeb/Text/expected/geometry/dommatrix-flip.txt
Normal file
4
Tests/LibWeb/Text/expected/geometry/dommatrix-flip.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
1. {"a":-10,"b":-20,"c":30,"d":40,"e":50,"f":60,"m11":-10,"m12":-20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
2. {"a":-10,"b":-20,"c":50,"d":60,"e":130,"f":140,"m11":-10,"m12":-20,"m13":-30,"m14":-40,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
||||
3. {"a":10,"b":20,"c":-30,"d":-40,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":-30,"m22":-40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
4. {"a":10,"b":20,"c":-50,"d":-60,"e":130,"f":140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":-50,"m22":-60,"m23":-70,"m24":-80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
8
Tests/LibWeb/Text/expected/geometry/dommatrix-skew.txt
Normal file
8
Tests/LibWeb/Text/expected/geometry/dommatrix-skew.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
1. {"a":10,"b":20,"c":31.76326980708465,"d":43.5265396141693,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":31.76326980708465,"m22":43.5265396141693,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
2. {"a":10,"b":20,"c":31.76326980708465,"d":43.5265396141693,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":31.76326980708465,"m22":43.5265396141693,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
3. {"a":10,"b":20,"c":53.63970234266203,"d":67.27940468532405,"e":130,"f":140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":53.63970234266203,"m22":67.27940468532405,"m23":80.91910702798607,"m24":94.55880937064809,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
||||
4. {"a":10,"b":20,"c":53.63970234266203,"d":67.27940468532405,"e":130,"f":140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":53.63970234266203,"m22":67.27940468532405,"m23":80.91910702798607,"m24":94.55880937064809,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
||||
5. {"a":15.289809421253949,"b":27.0530792283386,"c":30,"d":40,"e":50,"f":60,"m11":15.289809421253949,"m12":27.0530792283386,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
6. {"a":15.289809421253949,"b":27.0530792283386,"c":30,"d":40,"e":50,"f":60,"m11":15.289809421253949,"m12":27.0530792283386,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
7. {"a":28.19851171331012,"b":41.838214055972145,"c":50,"d":60,"e":130,"f":140,"m11":28.19851171331012,"m12":41.838214055972145,"m13":55.477916398634164,"m14":69.11761874129618,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
||||
8. {"a":28.19851171331012,"b":41.838214055972145,"c":50,"d":60,"e":130,"f":140,"m11":28.19851171331012,"m12":41.838214055972145,"m13":55.477916398634164,"m14":69.11761874129618,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":130,"m42":140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
|
@ -0,0 +1,6 @@
|
|||
1. {"a":10,"b":20,"c":30,"d":40,"e":1050,"f":1560,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":1050,"m42":1560,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
2. {"a":10,"b":20,"c":30,"d":40,"e":1050,"f":1560,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":1050,"m42":1560,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
3. {"a":10,"b":20,"c":30,"d":40,"e":75,"f":85,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":75,"m42":85,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
4. {"a":10,"b":20,"c":50,"d":60,"e":3130,"f":4140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":3130,"m42":4140,"m43":5150,"m44":6160,"is2D":false,"isIdentity":false}
|
||||
5. {"a":10,"b":20,"c":50,"d":60,"e":3130,"f":4140,"m11":10,"m12":20,"m13":30,"m14":40,"m21":50,"m22":60,"m23":70,"m24":80,"m31":90,"m32":100,"m33":110,"m34":120,"m41":3130,"m42":4140,"m43":5150,"m44":6160,"is2D":false,"isIdentity":false}
|
||||
6. {"a":2010,"b":2020,"c":4050,"d":4060,"e":8130,"f":8140,"m11":2010,"m12":2020,"m13":30,"m14":40,"m21":4050,"m22":4060,"m23":70,"m24":80,"m31":6090,"m32":6100,"m33":110,"m34":120,"m41":8130,"m42":8140,"m43":150,"m44":160,"is2D":false,"isIdentity":false}
|
|
@ -1,14 +0,0 @@
|
|||
1. {"a":10,"b":20,"c":30,"d":40,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
2. {"a":10,"b":20,"c":30,"d":40,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
3. {"a":700,"b":1000,"c":1500,"d":2200,"e":2350,"f":3460,"m11":700,"m12":1000,"m13":0,"m14":0,"m21":1500,"m22":2200,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":2350,"m42":3460,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
4. {"a":1,"b":0,"c":0,"d":1,"e":25,"f":25,"m11":1,"m12":0,"m13":0,"m14":0,"m21":0,"m22":1,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":25,"m42":25,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
5. {"a":10,"b":20,"c":30,"d":40,"e":1050,"f":1560,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":1050,"m42":1560,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
6. {"a":10,"b":20,"c":30,"d":40,"e":1050,"f":1560,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":1050,"m42":1560,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
7. {"a":10,"b":20,"c":30,"d":40,"e":1050,"f":1560,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":1050,"m42":1560,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
8. {"a":10,"b":20,"c":30,"d":40,"e":75,"f":85,"m11":10,"m12":20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":75,"m42":85,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
9. {"a":10,"b":20,"c":31.76326980708465,"d":43.5265396141693,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":31.76326980708465,"m22":43.5265396141693,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
10. {"a":10,"b":20,"c":31.76326980708465,"d":43.5265396141693,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":31.76326980708465,"m22":43.5265396141693,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
11. {"a":15.289809421253949,"b":27.0530792283386,"c":30,"d":40,"e":50,"f":60,"m11":15.289809421253949,"m12":27.0530792283386,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
12. {"a":15.289809421253949,"b":27.0530792283386,"c":30,"d":40,"e":50,"f":60,"m11":15.289809421253949,"m12":27.0530792283386,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
13. {"a":-10,"b":-20,"c":30,"d":40,"e":50,"f":60,"m11":-10,"m12":-20,"m13":0,"m14":0,"m21":30,"m22":40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
||||
14. {"a":10,"b":20,"c":-30,"d":-40,"e":50,"f":60,"m11":10,"m12":20,"m13":0,"m14":0,"m21":-30,"m22":-40,"m23":0,"m24":0,"m31":0,"m32":0,"m33":1,"m34":0,"m41":50,"m42":60,"m43":0,"m44":1,"is2D":true,"isIdentity":false}
|
21
Tests/LibWeb/Text/input/geometry/dommatrix-create.html
Normal file
21
Tests/LibWeb/Text/input/geometry/dommatrix-create.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Creating a DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]));
|
||||
|
||||
// 2. Creating a DOMMatrix with fromMatrix
|
||||
testPart(() => DOMMatrix.fromMatrix({ a: 10, b: 20, c: 30, d: 40, e: 50, f: 60 }));
|
||||
|
||||
// 3. Creating a DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]));
|
||||
|
||||
// 4. Creating a DOMMatrix with fromMatrix
|
||||
testPart(() => DOMMatrix.fromMatrix({ m11: 10, m12: 20, m13: 30, m14: 40, m21: 50, m22: 60, m23: 70, m24: 80, m31: 90, m32: 100, m33: 110, m34: 120, m41: 130, m42: 140, m43: 150, m44: 160 }));
|
||||
});
|
||||
</script>
|
21
Tests/LibWeb/Text/input/geometry/dommatrix-flip.html
Normal file
21
Tests/LibWeb/Text/input/geometry/dommatrix-flip.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Flip X DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).flipX());
|
||||
|
||||
// 2. Flip X DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).flipX());
|
||||
|
||||
// 2. Flip Y DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).flipY());
|
||||
|
||||
// 3. Flip Y DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).flipY());
|
||||
});
|
||||
</script>
|
33
Tests/LibWeb/Text/input/geometry/dommatrix-skew.html
Normal file
33
Tests/LibWeb/Text/input/geometry/dommatrix-skew.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Skew X DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).skewXSelf(10));
|
||||
|
||||
// 2. Skew X DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().skewX(10)));
|
||||
|
||||
// 3. Skew X DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).skewXSelf(20));
|
||||
|
||||
// 4. Skew X DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).multiply(new DOMMatrix().skewX(20)));
|
||||
|
||||
// 5. Skew Y DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).skewYSelf(10));
|
||||
|
||||
// 6. Skew Y DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().skewY(10)));
|
||||
|
||||
// 7. Skew Y DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).skewYSelf(20));
|
||||
|
||||
// 8. Skew Y DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).multiply(new DOMMatrix().skewY(20)));
|
||||
});
|
||||
</script>
|
27
Tests/LibWeb/Text/input/geometry/dommatrix-translate.html
Normal file
27
Tests/LibWeb/Text/input/geometry/dommatrix-translate.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Translate DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).translateSelf(25, 25));
|
||||
|
||||
// 2. Translate DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().translate(25, 25)));
|
||||
|
||||
// 3. Translate DOMMatrix with preMultiplySelf
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).preMultiplySelf(new DOMMatrix().translate(25, 25)));
|
||||
|
||||
// 4. Translate DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).translateSelf(50, 50));
|
||||
|
||||
// 5. Translate DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).multiply(new DOMMatrix().translate(50, 50)));
|
||||
|
||||
// 6. Translate DOMMatrix with preMultiplySelf
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]).preMultiplySelf(new DOMMatrix().translate(50, 50)));
|
||||
});
|
||||
</script>
|
|
@ -1,51 +0,0 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let testCounter = 1;
|
||||
function testPart(part) {
|
||||
println(`${testCounter++}. ${JSON.stringify(part())}`);
|
||||
}
|
||||
|
||||
// 1. Creating a DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]));
|
||||
|
||||
// 2. Creating a DOMMatrix with fromMatrix
|
||||
testPart(() => DOMMatrix.fromMatrix({ a: 10, b: 20, c: 30, d: 40, e: 50, f: 60 }));
|
||||
|
||||
// 3. Multiply DOMMatrix by DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix([10, 20, 30, 40, 50, 60])));
|
||||
|
||||
// 4. Create translation DOMMatrix
|
||||
testPart(() => new DOMMatrix().translate(25, 25));
|
||||
|
||||
// 5. Translate DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).translateSelf(25, 25));
|
||||
|
||||
// 6. Translate DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().translate(25, 25)));
|
||||
|
||||
// 7. Translate DOMMatrix with multiplySelf
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiplySelf(new DOMMatrix().translate(25, 25)));
|
||||
|
||||
// 8. Translate DOMMatrix with preMultiplySelf
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).preMultiplySelf(new DOMMatrix().translate(25, 25)));
|
||||
|
||||
// 9. Skew X DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).skewXSelf(10));
|
||||
|
||||
// 10. Skew X DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().skewX(10)));
|
||||
|
||||
// 11. Skew Y DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).skewYSelf(10));
|
||||
|
||||
// 12. Skew Y DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().skewY(10)));
|
||||
|
||||
// 13. Flip X DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).flipX());
|
||||
|
||||
// 14. Flip Y DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).flipY());
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue