diff options
author | Linus Groh <mail@linusgroh.de> | 2021-12-27 14:31:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-27 16:43:23 +0100 |
commit | 7d435b5adacdaa8f038669d10fba9f615265897a (patch) | |
tree | b4602ec22b105ad8b412b3a241f1e21702334ce5 /Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp | |
parent | 6d50ff71de74ccb3b0b8dbf7a46b53fd7c93e424 (diff) | |
download | serenity-7d435b5adacdaa8f038669d10fba9f615265897a.zip |
LibWeb: Implement CanvasRenderingContext2D.save()
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp index 1cade07f81..a7eab5c996 100644 --- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp +++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp @@ -313,4 +313,11 @@ void CanvasRenderingContext2D::put_image_data(const ImageData& image_data, float did_draw(Gfx::FloatRect(x, y, image_data.width(), image_data.height())); } +// https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-save +void CanvasRenderingContext2D::save() +{ + // The save() method steps are to push a copy of the current drawing state onto the drawing state stack. + m_drawing_state_stack.append(m_drawing_state); +} + } |