diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-28 12:13:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-28 14:17:44 +0100 |
commit | ed089586ea50ee6326d874b0491d5e4cec910e4e (patch) | |
tree | 0e0af299d226814204cfc7cfdf49bba8469c1879 /Userland/Libraries/LibWeb/Painting/PaintContext.cpp | |
parent | ee50a4e060ce782870545ead1c5fc0e712980ec3 (diff) | |
download | serenity-ed089586ea50ee6326d874b0491d5e4cec910e4e.zip |
LibWeb: Move some of PaintContext out of line
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/PaintContext.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/PaintContext.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/PaintContext.cpp b/Userland/Libraries/LibWeb/Painting/PaintContext.cpp new file mode 100644 index 0000000000..62a3082e04 --- /dev/null +++ b/Userland/Libraries/LibWeb/Painting/PaintContext.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <LibWeb/Painting/PaintContext.h> + +namespace Web { + +PaintContext::PaintContext(Gfx::Painter& painter, Palette const& palette, Gfx::IntPoint const& scroll_offset) + : m_painter(painter) + , m_palette(palette) + , m_scroll_offset(scroll_offset) +{ +} + +SVGContext& PaintContext::svg_context() +{ + return m_svg_context.value(); +} + +void PaintContext::set_svg_context(SVGContext context) +{ + m_svg_context = move(context); +} + +void PaintContext::clear_svg_context() +{ + m_svg_context.clear(); +} + +} |