1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:17:35 +00:00

LibWeb: Add DOMMatrix translate

This commit is contained in:
Bastiaan van der Plaat 2023-09-03 12:43:09 +02:00 committed by Andreas Kling
parent 61c063f7b3
commit 5cd35b633a
8 changed files with 49 additions and 2 deletions

View file

@ -14,5 +14,20 @@
// 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)));
});
</script>