mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
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).
This commit is contained in:
parent
22585e2845
commit
e58f78e667
2 changed files with 121 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue