mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibWeb: Move some of PaintContext out of line
This commit is contained in:
parent
ee50a4e060
commit
ed089586ea
3 changed files with 42 additions and 13 deletions
33
Userland/Libraries/LibWeb/Painting/PaintContext.cpp
Normal file
33
Userland/Libraries/LibWeb/Painting/PaintContext.cpp
Normal file
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue