summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/ImageEditor.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-06-14 17:36:18 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-14 18:25:17 +0200
commit1b897ec561f4731353a025ec028e1fbab7f335a2 (patch)
treed015885fe1a9465a99c7eab53cc80d71abbdff97 /Userland/Applications/PixelPaint/ImageEditor.h
parent96b52f13e47a33321c13308c5b2b7690fad2d488 (diff)
downloadserenity-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.h6
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;
};
}