1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-12 23:31:01 +00:00

LibWeb: Implement CanvasRenderingContext2D.getImageData()

The actual copying of the pixel values into the created ImageData object
is a bit ugly, but Gfx::Painter doesn't like the underlying RGBA8888
bitmap.
This commit is contained in:
Linus Groh 2022-03-04 19:07:35 +01:00 committed by Andreas Kling
parent 08608932cc
commit e890cd5464
3 changed files with 42 additions and 0 deletions

View file

@ -78,6 +78,7 @@ public:
void fill(const String& fill_rule);
RefPtr<ImageData> create_image_data(int width, int height) const;
DOM::ExceptionOr<RefPtr<ImageData>> get_image_data(int x, int y, int width, int height) const;
void put_image_data(const ImageData&, float x, float y);
void save();