diff options
Diffstat (limited to 'SharedGraphics')
-rw-r--r-- | SharedGraphics/Painter.cpp | 26 | ||||
-rw-r--r-- | SharedGraphics/Painter.h | 11 |
2 files changed, 1 insertions, 36 deletions
diff --git a/SharedGraphics/Painter.cpp b/SharedGraphics/Painter.cpp index 02a94ec938..6ff2f3f086 100644 --- a/SharedGraphics/Painter.cpp +++ b/SharedGraphics/Painter.cpp @@ -4,16 +4,6 @@ #include <SharedGraphics/CharacterBitmap.h> #include <AK/Assertions.h> #include <AK/StdLibExtras.h> - -#ifdef LIBGUI -#include <LibGUI/GWidget.h> -#include <LibGUI/GWindow.h> -#include <LibGUI/GEventLoop.h> -#include <LibC/stdio.h> -#include <LibC/errno.h> -#include <LibC/string.h> -#endif - #include <unistd.h> Painter::Painter(GraphicsBitmap& bitmap) @@ -25,22 +15,6 @@ Painter::Painter(GraphicsBitmap& bitmap) m_clip_origin = state().clip_rect; } -#ifdef LIBGUI -Painter::Painter(GWidget& widget) - : m_window(widget.window()) - , m_target(*m_window->back_bitmap()) -{ - m_state_stack.append(State()); - state().font = &widget.font(); - - auto origin_rect = widget.window_relative_rect(); - state().translation = origin_rect.location(); - state().clip_rect = origin_rect; - m_clip_origin = origin_rect; - state().clip_rect.intersect(m_target->rect()); -} -#endif - Painter::~Painter() { } diff --git a/SharedGraphics/Painter.h b/SharedGraphics/Painter.h index a9485c5e1f..adc802449c 100644 --- a/SharedGraphics/Painter.h +++ b/SharedGraphics/Painter.h @@ -12,16 +12,8 @@ class GlyphBitmap; class GraphicsBitmap; class Font; -#ifdef USERLAND -class GWidget; -class GWindow; -#endif - class Painter { public: -#ifdef USERLAND - explicit Painter(GWidget&); -#endif explicit Painter(GraphicsBitmap&); ~Painter(); void fill_rect(const Rect&, Color); @@ -64,7 +56,7 @@ public: void save() { m_state_stack.append(m_state_stack.last()); } void restore() { ASSERT(m_state_stack.size() > 1); m_state_stack.take_last(); } -private: +protected: void set_pixel_with_draw_op(dword& pixel, const Color&); void fill_rect_with_draw_op(const Rect&, Color); void blit_with_alpha(const Point&, const GraphicsBitmap&, const Rect& src_rect); @@ -80,7 +72,6 @@ private: const State& state() const { return m_state_stack.last(); } Rect m_clip_origin; - GWindow* m_window { nullptr }; Retained<GraphicsBitmap> m_target; Vector<State> m_state_stack; }; |