ladybird/Userland/Libraries/LibWeb/HTML/ImageBitmap.idl
Lucas CHOLLET 676fc5e8c6 LibWeb: Implement HTML::ImageBitmap
And the two methods of `WindowOrWorkerGlobalScope` that are used as
constructors for it.
2024-04-08 14:25:36 +02:00

29 lines
1.0 KiB
Plaintext

#import <FileAPI/Blob.idl>
#import <HTML/ImageData.idl>
// https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#images-2
[Exposed=(Window,Worker), Serializable, Transferable]
interface ImageBitmap {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
undefined close();
};
// FIXME: This should also includes CanvasImageSource
typedef (Blob or
ImageData) ImageBitmapSource;
enum ImageOrientation { "from-image", "flipY" };
enum PremultiplyAlpha { "none", "premultiply", "default" };
enum ColorSpaceConversion { "none", "default" };
enum ResizeQuality { "pixelated", "low", "medium", "high" };
dictionary ImageBitmapOptions {
// FIXME: ImageOrientation imageOrientation = "from-image";
// FIXME: PremultiplyAlpha premultiplyAlpha = "default";
// FIXME: ColorSpaceConversion colorSpaceConversion = "default";
// FIXME: [EnforceRange] unsigned long resizeWidth;
// FIXME: [EnforceRange] unsigned long resizeHeight;
// FIXME: ResizeQuality resizeQuality = "low";
};