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

LibWeb: Add ImageData objects and implement 2D context putImageData()

An ImageData is a wrapper around a Bitmap wrapper around a
JS::Uint8ClampedArray.
This commit is contained in:
Andreas Kling 2020-04-21 23:49:51 +02:00
parent 54133c683d
commit 2d4c91df8e
10 changed files with 359 additions and 0 deletions

View file

@ -71,6 +71,9 @@ public:
void line_to(float x, float y);
void stroke();
RefPtr<ImageData> create_image_data(JS::GlobalObject&, int width, int height) const;
void put_image_data(const ImageData&, float x, float y);
private:
explicit CanvasRenderingContext2D(HTMLCanvasElement&);