summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/RectangleSelectTool.h
diff options
context:
space:
mode:
authorDavipb <daviparca@gmail.com>2021-06-20 10:57:30 -0300
committerAndreas Kling <kling@serenityos.org>2021-06-22 11:00:00 +0200
commite58f78e667796871c13e2de2ccac81caca99bf37 (patch)
tree942d085808f38ba81bc10036040912b5e3fdc4bd /Userland/Applications/PixelPaint/RectangleSelectTool.h
parent22585e2845c0b9a3ea7799f576239a5478a18050 (diff)
downloadserenity-e58f78e667796871c13e2de2ccac81caca99bf37.zip
PixelPaint: Add more options to RectangleSelectTool
A "feather" value sets by how much the borders of the selection will be smoothed, and a "mode" value sets how the newly selected region will interact with an existing image selection (if any).
Diffstat (limited to 'Userland/Applications/PixelPaint/RectangleSelectTool.h')
-rw-r--r--Userland/Applications/PixelPaint/RectangleSelectTool.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/RectangleSelectTool.h b/Userland/Applications/PixelPaint/RectangleSelectTool.h
index a47fd35ee8..866dc417fa 100644
--- a/Userland/Applications/PixelPaint/RectangleSelectTool.h
+++ b/Userland/Applications/PixelPaint/RectangleSelectTool.h
@@ -6,8 +6,12 @@
#pragma once
+#include "Selection.h"
#include "Tool.h"
+#include <AK/Vector.h>
+#include <LibGUI/Widget.h>
+
namespace PixelPaint {
class RectangleSelectTool final : public Tool {
@@ -21,6 +25,7 @@ public:
virtual void on_keydown(GUI::KeyEvent&) override;
virtual void on_keyup(GUI::KeyEvent&) override;
virtual void on_second_paint(Layer const&, GUI::PaintEvent&) override;
+ virtual GUI::Widget* get_properties_widget() override;
private:
enum class MovingMode {
@@ -29,6 +34,10 @@ private:
None,
};
+ RefPtr<GUI::Widget> m_properties_widget;
+ Vector<String> m_merge_mode_names {};
+ Selection::MergeMode m_merge_mode { Selection::MergeMode::Set };
+ float m_edge_feathering { 0.0f };
bool m_selecting { false };
MovingMode m_moving_mode { MovingMode::None };
Gfx::IntPoint m_selection_start;