mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibWeb: Add DOMMatrix scale and scale3d
This commit is contained in:
parent
67f6a9ee12
commit
42c2a67c83
8 changed files with 125 additions and 5 deletions
27
Tests/LibWeb/Text/input/geometry/dommatrix-scale.html
Normal file
27
Tests/LibWeb/Text/input/geometry/dommatrix-scale.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. Scale DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).scale(1, 2, 3));
|
||||
|
||||
// 2. Scale DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().scale(1, 2, 3)));
|
||||
|
||||
// 3. Scale 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().scale(1, 2, 3)));
|
||||
|
||||
// 4. Scale 3D DOMMatrix
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).scale3d(5, 4, 3, 2));
|
||||
|
||||
// 5. Scale 3D DOMMatrix with multiply
|
||||
testPart(() => new DOMMatrix([10, 20, 30, 40, 50, 60]).multiply(new DOMMatrix().scale3d(5, 4, 3, 2)));
|
||||
|
||||
// 6. Scale 3D 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().scale3d(5, 4, 3, 2)));
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue