# Enclose and Fill Tool Proposal

**URL:** <https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397>\
**Category:** Artists Feedback & Testing\
**Created:** [November 5, 2021, 12:19pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397 "2021-11-05T12:19:50Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Grum999](https://krita-artists.org/user_avatar/krita-artists.org/grum999/32/66488_2.png) [@Grum999](https://krita-artists.org/u/Grum999)\
**Post date:** [November 23, 2021, 4:17pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/21 "2021-11-23T16:17:55Z")

</div>

> [@acc4](#):
>
> In 99% of the time people’s gonna use freehand selections

I love statistics 😅

I’m unfortunately the 1% who never use the freehand selection tool 🤷‍♂️

On my side, if it’s possible to let the tool remind automatically which mode has been used last time, it would be an interesting compromise for everyone 😊

Grum999

---

<div class="post-metadata">

**Author:** ![acc4](https://krita-artists.org/user_avatar/krita-artists.org/acc4/32/211051_2.png) [@acc4](https://krita-artists.org/u/acc4)\
**Post date:** [November 23, 2021, 4:43pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/22 "2021-11-23T16:43:55Z")

</div>

I’m very sorry for representing the majority and wanting for Krita to gain more popularity from the artists, buddy.

---

<div class="post-metadata">

**Author:** ![Grum999](https://krita-artists.org/user_avatar/krita-artists.org/grum999/32/66488_2.png) [@Grum999](https://krita-artists.org/u/Grum999)\
**Post date:** [November 23, 2021, 5:13pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/23 "2021-11-23T17:13:44Z")

</div>

What I see here is, @Deif_Lou choose the same order for selection mode in list than in Krita’s default user interface: having a consistency in interface is a good thing.

As you can see, the polygonal selection tool I use in 99% of time (statistics about _my_ usage) is in 3rd place.  
I could ask to get it in first place but it will be a non-sense.  
Not because 99% of world-wide users don’t use it, but because of consistency with default order in interface.

My proposal to keep in mind the last used method is a good compromise I think.  
I remember @halla implemented something about tools settings, but can’t found it… I have to dig in forum.  
But if it can be used here to let users being able to keep last tool settings (across session) I think it would fit your need as it would fit my need 😜

note @Deif_Lou: I didn’t had the time to watch the 17minutes video yet, maybe this is already implemented, maybe not. Accept my apologies if it’s already implemented 🙂

Grum999

---

<div class="post-metadata">

**Author:** ![Grum999](https://krita-artists.org/user_avatar/krita-artists.org/grum999/32/66488_2.png) [@Grum999](https://krita-artists.org/u/Grum999)\
**Post date:** [November 23, 2021, 10:08pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/24 "2021-11-23T22:08:33Z")

</div>

> [@Grum999](#):
>
> I remember @halla implemented something about tools settings, but can’t found it… I have to dig in forum.

I found it:

> [@Tool presets](https://krita-artists.org/t/tool-presets/13726):
>
> I just completed a small new feature: tool presets. I’m not sure anymore who actually asked for those, but not only do the tools now remember their settings between sessions, you can also save combinations of settings as presets and switch between them with a single click slight_smile

@Deif_Lou is the tool will be compatible with this functionality?  
🙂

Grum999

---

<div class="post-metadata">

**Author:** ![Deif\_Lou](https://krita-artists.org/user_avatar/krita-artists.org/deif_lou/32/231530_2.png) [@Deif\_Lou](https://krita-artists.org/u/Deif_Lou)\
**Post date:** [November 23, 2021, 11:27pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/25 "2021-11-23T23:27:10Z")

</div>

> [@TheTwo](#):
>
> Looks great! But can it change the polygon to Bezier? I think Bezier is a complete replacement for polygons.

The point of this is to fill by creating quick and dirty regions around. Doesn’t using a bezier path make it more cumbersome?  
By the way, I don’t think this tool will be the most useful in every case. I also implemented the [“continuous fill” in the fill tool](https://invent.kde.org/graphics/krita/-/merge_requests/1160) (click and drag to fill more than one region in one pointer press/move/release iteration), and I think that can be as useful.

> [@acc4](#):
>
> Could you make the freehand selection method as default if you don’t mind? In 99% of the time people’s gonna use freehand selections, and I don’t want to select it in the tool option every time I use it…

> [@Grum999](#):
>
> On my side, if it’s possible to let the tool remind automatically which mode has been used last time, it would be an interesting compromise for everyone 😊

I’ve put the lasso as the default, but the settings are stored when you change them. So they are loaded the next time as you left them. The solution to this is to have tool presets as @Grum999 says. That way you can have multiple sets of settings stored and you can easily switch between them.

> [@Grum999](#):
>
> @Deif_Lou is the tool will be compatible with this functionality?

It should be. It is made just like the other tools.

---

<div class="post-metadata">

**Author:** ![Deif\_Lou](https://krita-artists.org/user_avatar/krita-artists.org/deif_lou/32/231530_2.png) [@Deif\_Lou](https://krita-artists.org/u/Deif_Lou)\
**Post date:** [November 23, 2021, 11:31pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/26 "2021-11-23T23:31:04Z")

</div>

I’ve just implemented new region selection modes that instead of filling the closed areas, allow to fill around some specific color, but leaving the closed areas untouched, kind of the opposite. But it’s experimental. Here is a video showing it. Sorry the menus don’t show up, but I think it’s clear. Also, the erase mode in krita can be used with the tool to remove the areas around:

[/uploads/default/original/3X/8/a/8ac4de1d54685f573de0ae9efd30782ab17cbbde.webm](https://krita-artists.org/uploads/default/original/3X/8/a/8ac4de1d54685f573de0ae9efd30782ab17cbbde.webm)

---

<div class="post-metadata">

**Author:** ![TheTwo](https://krita-artists.org/user_avatar/krita-artists.org/thetwo/32/32836_2.png) [@TheTwo](https://krita-artists.org/u/TheTwo)\
**Post date:** [November 24, 2021, 3:06am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/27 "2021-11-24T03:06:58Z")

</div>

> [@Deif\_Lou](#):
>
> Doesn’t using a bezier path make it more cumbersome?

I don’t think so. Bezier curves will use polylines as long as they are not dragged. But polygon can’t use curves.  
There are times when facing a slightly complex object, a polyline requires several clicks, while a curve would be much easier

---

<div class="post-metadata">

**Author:** ![acc4](https://krita-artists.org/user_avatar/krita-artists.org/acc4/32/211051_2.png) [@acc4](https://krita-artists.org/u/acc4)\
**Post date:** [November 24, 2021, 3:54am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/28 "2021-11-24T03:54:13Z")

</div>

This is sorcery.

---

<div class="post-metadata">

**Author:** ![kaichi1342](https://krita-artists.org/user_avatar/krita-artists.org/kaichi1342/32/8174_2.png) [@kaichi1342](https://krita-artists.org/u/kaichi1342)\
**Post date:** [November 24, 2021, 5:10am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/29 "2021-11-24T05:10:00Z")

</div>

OMG this is magic.

I would not even have problem even if i paint the way i do now, if i can magic wand erase it this way. Woahhh. Im blown. You sir is amazing.

---

<div class="post-metadata">

**Author:** ![Deif\_Lou](https://krita-artists.org/user_avatar/krita-artists.org/deif_lou/32/231530_2.png) [@Deif\_Lou](https://krita-artists.org/u/Deif_Lou)\
**Post date:** [April 12, 2022, 11:01pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/30 "2022-04-12T23:01:44Z")

</div>

Ok, after some time… I finished it: [Add "Enclose and Fill" tool (!1415) · Merge requests · Graphics / Krita · GitLab](https://invent.kde.org/graphics/krita/-/merge_requests/1415)

Still, I need to tackle some things and there has to be some review. I leave a video here showcasing the tool (keep in mind that I only use this tool there, and that some simple regions would be filled faster with the fill tool, just one click) :

[![](https://krita-artists.org/uploads/default/original/3X/2/9/294adaed8d9fe66b03da3f18af947cee63910005.jpeg "krita enclose and fill tool #1") ](https://www.youtube.com/watch?v=YApfKvfUOhg)

---

<div class="post-metadata">

**Author:** ![TheTwo](https://krita-artists.org/user_avatar/krita-artists.org/thetwo/32/32836_2.png) [@TheTwo](https://krita-artists.org/u/TheTwo)\
**Post date:** [April 12, 2022, 11:46pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/31 "2022-04-12T23:46:12Z")

</div>

Now I still think “Path Selection Tool” is a better choice than “Polygonal Selection Tool”. It can draw straight lines and curves, and more importantly, it can be withdrawn by right-clicking, which “Polygonal Selection Tool” cannot do.  
 ![舒服垫](https://krita-artists.org/uploads/default/original/3X/c/a/ca5c8af2c228f232816074bfea67382310990b18.gif)

PS: Once I asked someone how to withdraw the “Polygonal Selection Tool”, he said: Why don’t you use the “Path Selection Tool” it? I tried it and found it worked well. Now I even doubt if we can remove “Polygonal Selection Tool” because there is nothing special about it.

> [@Deif\_Lou](#):
>
> Doesn’t using a bezier path make it more cumbersome?

From previous talk this does not seem to be a code problem. So I’d like to see what other community members have to say.

---

<div class="post-metadata">

**Author:** ![SchrodingerCat](https://krita-artists.org/user_avatar/krita-artists.org/schrodingercat/32/137932_2.png) [@SchrodingerCat](https://krita-artists.org/u/SchrodingerCat)\
**Post date:** [April 13, 2022, 1:17am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/32 "2022-04-13T01:17:04Z")

</div>

Excellent, this will really help a lot the work process of several of us 😊

Speaking of Clip, it is interesting how it manages the tools, even users can create their own version.

![imagen](https://krita-artists.org/uploads/default/original/3X/0/b/0b1e43f7f256410401101b6223c0441a5bbe47cb.png)

---

<div class="post-metadata">

**Author:** ![acc4](https://krita-artists.org/user_avatar/krita-artists.org/acc4/32/211051_2.png) [@acc4](https://krita-artists.org/u/acc4)\
**Post date:** [April 13, 2022, 2:40am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/33 "2022-04-13T02:40:17Z")

</div>

I can’t wait to try it.

---

<div class="post-metadata">

**Author:** ![ari](https://krita-artists.org/user_avatar/krita-artists.org/ari/32/96851_2.png) [@ari](https://krita-artists.org/u/ari)\
**Post date:** [April 13, 2022, 6:04am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/34 "2022-04-13T06:04:42Z")

</div>

This is fantastic !!!  
It can become such a helpful tool for comics flatting and colouring !  
I will be eagerly waiting for this 😃 !!

---

<div class="post-metadata">

**Author:** ![Deif\_Lou](https://krita-artists.org/user_avatar/krita-artists.org/deif_lou/32/231530_2.png) [@Deif\_Lou](https://krita-artists.org/u/Deif_Lou)\
**Post date:** [April 13, 2022, 10:15am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/35 "2022-04-13T10:15:18Z")

</div>

@TheTwo, I agree with you, but I forgot to change that. I just have done the changes and now it uses the path tool instead of the polygon.

---

<div class="post-metadata">

**Author:** ![LunarKreatures](https://krita-artists.org/user_avatar/krita-artists.org/lunarkreatures/32/231342_2.png) [@LunarKreatures](https://krita-artists.org/u/LunarKreatures)\
**Post date:** [April 13, 2022, 1:55pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/36 "2022-04-13T13:55:38Z")

</div>

Sorry this will be a bit off- topic for this thread but i kinda want to explain a possible misunderstanding.

> [@SchrodingerCat](#):
>
> Speaking of Clip, it is interesting how it manages the tools, even users can create their own version.

The way clip studio names things is a bit misleading. From my understanding what clip allows is for you to create presets for tools, not new tools, you can configure a new preset using the already available settings. No different from making brushes.

I believe the krita devs are working on something similar, tool presets. At least i remember halla showing something like that a while ago.

Just wanted to clear this up.

---

<div class="post-metadata">

**Author:** ![SchrodingerCat](https://krita-artists.org/user_avatar/krita-artists.org/schrodingercat/32/137932_2.png) [@SchrodingerCat](https://krita-artists.org/u/SchrodingerCat)\
**Post date:** [April 13, 2022, 2:36pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/37 "2022-04-13T14:36:56Z")

</div>

Yes, that’s what I meant by it’s “own version”, maybe the problem is the translation, English is not my main language, but I did mean that, new presets.

---

<div class="post-metadata">

**Author:** ![urzeye](https://krita-artists.org/letter_avatar_proxy/v4/letter/u/4491bb/32.png) [@urzeye](https://krita-artists.org/u/urzeye)\
**Post date:** [April 14, 2022, 1:29am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/38 "2022-04-14T01:29:14Z")

</div>

It looks great, but I encountered some problems during compilation. After consulting relevant materials, I found that krita’s current QT version is 5.12.12, but clear is a function added in QT version 5.13. Is there any way to solve this problem? Thank you!

 ![image](https://krita-artists.org/uploads/default/original/3X/a/4/a41392c67c6537feb8a0cfe89035e809b3401e8f.png)

---

<div class="post-metadata">

**Author:** ![Deif\_Lou](https://krita-artists.org/user_avatar/krita-artists.org/deif_lou/32/231530_2.png) [@Deif\_Lou](https://krita-artists.org/u/Deif_Lou)\
**Post date:** [April 14, 2022, 6:03am UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/39 "2022-04-14T06:03:56Z")

</div>

@urzeye I normally use my system’s qt to compile, which is 5.15, so this happens sometimes (who would thought a function like `clear` was added so late to `QPainterPath`). Anyway, I already pushed a fix.

Keep in mind there is still an issue I talk about at the end of the MR description.

Thanks for testing.

---

<div class="post-metadata">

**Author:** ![EyeOdin](https://krita-artists.org/user_avatar/krita-artists.org/eyeodin/32/2662_2.png) [@EyeOdin](https://krita-artists.org/u/EyeOdin)\
**Post date:** [April 14, 2022, 2:05pm UTC](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397/40 "2022-04-14T14:05:13Z")

</div>

Damn! looks amazing each time I see your demo videos

[Previous page](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397.md?page=1)

[Next page](https://krita-artists.org/t/enclose-and-fill-tool-proposal/31397.md?page=3)
