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

LibWeb: Extract CanvasDrawImage class from CRC2D

This commit is contained in:
Sam Atkins 2022-08-12 17:28:54 +01:00 committed by Andreas Kling
parent 7cf42ede68
commit 270c60c5e8
7 changed files with 105 additions and 47 deletions

View file

@ -0,0 +1,10 @@
#import <HTML/HTMLCanvasElement.idl>
#import <HTML/HTMLImageElement.idl>
// https://html.spec.whatwg.org/multipage/canvas.html#canvasdrawimage
interface mixin CanvasDrawImage {
// FIXME: These `image` params should be CanvasImageSource
undefined drawImage((HTMLImageElement or HTMLCanvasElement) image, unrestricted double dx, unrestricted double dy);
undefined drawImage((HTMLImageElement or HTMLCanvasElement) image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
undefined drawImage((HTMLImageElement or HTMLCanvasElement) image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
};