mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
PixelPaint: Add Wand Select Tool
Wand Selection tool uses similar logic to the Bucket Tool. Flood filling and threshold calculations to determine the affected area just in this case we do not set the pixels of the selected area, instead we use those pixels to alter the selection mask. In the future we can probably abstract out the shared flood logic so both tools can share the code.
This commit is contained in:
parent
5e11a512d6
commit
fcf86b07a5
5 changed files with 226 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "Tools/RectangleSelectTool.h"
|
||||
#include "Tools/RectangleTool.h"
|
||||
#include "Tools/SprayTool.h"
|
||||
#include "Tools/WandSelectTool.h"
|
||||
#include "Tools/ZoomTool.h"
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -81,6 +82,7 @@ void ToolboxWidget::setup_tools()
|
|||
add_tool("circle"sv, { Mod_Ctrl | Mod_Shift, Key_E }, make<EllipseTool>());
|
||||
add_tool("zoom"sv, { 0, Key_Z }, make<ZoomTool>());
|
||||
add_tool("rectangle-select"sv, { 0, Key_R }, make<RectangleSelectTool>());
|
||||
add_tool("wand-select"sv, { 0, Key_W }, make<WandSelectTool>());
|
||||
add_tool("guides"sv, { 0, Key_G }, make<GuideTool>());
|
||||
add_tool("clone"sv, { 0, Key_C }, make<CloneTool>());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue