diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-25 20:42:56 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-26 01:04:52 +0200 |
commit | 67596d9546fc2a08b5022dc60e5a30e3ea2c2f18 (patch) | |
tree | dd80c00ce6dc61b93dd9d2e570ed7906581efd03 /Userland/Applications/PixelPaint/Selection.h | |
parent | e6d860f2fe49ad8f39300087d1d9da3e052f3faf (diff) | |
download | serenity-67596d9546fc2a08b5022dc60e5a30e3ea2c2f18.zip |
PixelPaint: Move "marching ants" painting logic to ImageEditor
Since this code needs to look at a bunch of ImageEditor state anyway,
it makes more sense for it to live in ImageEditor.
Diffstat (limited to 'Userland/Applications/PixelPaint/Selection.h')
-rw-r--r-- | Userland/Applications/PixelPaint/Selection.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Userland/Applications/PixelPaint/Selection.h b/Userland/Applications/PixelPaint/Selection.h index 4080b9c09e..7f269cc1e0 100644 --- a/Userland/Applications/PixelPaint/Selection.h +++ b/Userland/Applications/PixelPaint/Selection.h @@ -40,22 +40,17 @@ public: [[nodiscard]] u8 get_selection_alpha(int x, int y) const { return m_mask.get(x, y); } [[nodiscard]] u8 get_selection_alpha(Gfx::IntPoint const& point) const { return get_selection_alpha(point.x(), point.y()); } - void paint(Gfx::Painter&); - - void draw_marching_ants(Gfx::Painter&, Gfx::IntRect const&) const; - void draw_marching_ants(Gfx::Painter&, Mask const&) const; + Mask const& mask() const { return m_mask; } void begin_interactive_selection() { m_in_interactive_selection = true; } void end_interactive_selection() { m_in_interactive_selection = false; } + bool in_interactive_selection() { return m_in_interactive_selection; } + private: ImageEditor& m_editor; Mask m_mask; - RefPtr<Core::Timer> m_marching_ants_timer; - int m_marching_ants_offset { 0 }; bool m_in_interactive_selection { false }; - - void draw_marching_ants_pixel(Gfx::Painter&, int x, int y) const; }; } |