1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Make RenderingContext use Gfx::Painter instead of GUI::Painter

This commit is contained in:
Andreas Kling 2020-06-17 17:28:41 +02:00
parent 720825e3bd
commit 6fc3ffec46

View file

@ -28,20 +28,20 @@
#include <LibGfx/Palette.h>
#include <LibGfx/Rect.h>
#include <LibGUI/Forward.h>
#include <LibGfx/Forward.h>
namespace Web {
class RenderingContext {
public:
explicit RenderingContext(GUI::Painter& painter, const Palette& palette, const Gfx::IntPoint& scroll_offset)
explicit RenderingContext(Gfx::Painter& painter, const Palette& palette, const Gfx::IntPoint& scroll_offset)
: m_painter(painter)
, m_palette(palette)
, m_scroll_offset(scroll_offset)
{
}
GUI::Painter& painter() const { return m_painter; }
Gfx::Painter& painter() const { return m_painter; }
const Palette& palette() const { return m_palette; }
bool should_show_line_box_borders() const { return m_should_show_line_box_borders; }
@ -53,7 +53,7 @@ public:
const Gfx::IntPoint& scroll_offset() const { return m_scroll_offset; }
private:
GUI::Painter& m_painter;
Gfx::Painter& m_painter;
Palette m_palette;
Gfx::IntRect m_viewport_rect;
Gfx::IntPoint m_scroll_offset;