LibWeb: Make 2D canvas save/restore perform save/restore on painter

This ensures that any internal state maintained by the painter gets
synchronized appropriately.
This commit is contained in:
Andreas Kling 2024-08-15 14:52:40 +02:00 committed by Andreas Kling
commit 0d57de4236
Notes: github-actions[bot] 2024-08-20 07:37:26 +00:00
3 changed files with 13 additions and 0 deletions

View file

@ -26,6 +26,9 @@ class CanvasState {
public:
virtual ~CanvasState() = default;
virtual Gfx::Painter* painter_for_canvas_state() = 0;
virtual Gfx::Path& path_for_canvas_state() = 0;
void save();
void restore();
void reset();