diff options
author | Andreas Kling <kling@serenityos.org> | 2021-06-14 17:36:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-14 18:25:17 +0200 |
commit | 1b897ec561f4731353a025ec028e1fbab7f335a2 (patch) | |
tree | d015885fe1a9465a99c7eab53cc80d71abbdff97 /Userland/Applications/PixelPaint/ImageEditor.h | |
parent | 96b52f13e47a33321c13308c5b2b7690fad2d488 (diff) | |
download | serenity-1b897ec561f4731353a025ec028e1fbab7f335a2.zip |
PixelPaint: Add a Selection class (ImageEditor has a Selection)
This will represent a complex, region-based selection in the future.
For now though, it's just a simple rectangle. :^)
Diffstat (limited to 'Userland/Applications/PixelPaint/ImageEditor.h')
-rw-r--r-- | Userland/Applications/PixelPaint/ImageEditor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/ImageEditor.h b/Userland/Applications/PixelPaint/ImageEditor.h index 9606402f5e..f57f040a64 100644 --- a/Userland/Applications/PixelPaint/ImageEditor.h +++ b/Userland/Applications/PixelPaint/ImageEditor.h @@ -7,6 +7,7 @@ #pragma once #include "Image.h" +#include "Selection.h" #include <LibGUI/Frame.h> #include <LibGUI/UndoStack.h> #include <LibGfx/Point.h> @@ -53,6 +54,9 @@ public: Color secondary_color() const { return m_secondary_color; } void set_secondary_color(Color); + Selection& selection() { return m_selection; } + Selection const& selection() const { return m_selection; } + Color color_for(GUI::MouseEvent const&) const; Color color_for(GUI::MouseButton) const; @@ -105,6 +109,8 @@ private: Gfx::FloatPoint m_pan_origin; Gfx::FloatPoint m_saved_pan_origin; Gfx::IntPoint m_click_position; + + Selection m_selection; }; } |