mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibWeb: Extract CanvasTransform class from CRC2D
The implementation of this got a little funky, because it has to access methods from CanvasState.
This commit is contained in:
parent
08e6071ebb
commit
aa87b9699e
5 changed files with 101 additions and 69 deletions
12
Userland/Libraries/LibWeb/HTML/Canvas/CanvasTransform.idl
Normal file
12
Userland/Libraries/LibWeb/HTML/Canvas/CanvasTransform.idl
Normal file
|
@ -0,0 +1,12 @@
|
|||
// https://html.spec.whatwg.org/multipage/canvas.html#canvastransform
|
||||
interface mixin CanvasTransform {
|
||||
undefined scale(unrestricted double x, unrestricted double y);
|
||||
undefined rotate(unrestricted double radians);
|
||||
undefined translate(unrestricted double x, unrestricted double y);
|
||||
undefined transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
||||
|
||||
// FIXME: [NewObject] DOMMatrix getTransform();
|
||||
undefined setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
||||
// FIXME: undefined setTransform(optional DOMMatrix2DInit transform = {});
|
||||
undefined resetTransform();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue