paint bucket fill area

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

paint bucket fill area

Postby brynn » Wed Sep 10, 2008 7:27 pm

Hi Friends,
I've been using the Paint Bucket tool :tool_paintbucket: a lot lately, and I notice that sometimes if I click to fill a closed area, and the entire area is not visible in the window, it doesn't fill the entire closed area. See images 1 and 2 below. (I'm not talking about the thin band around the border of an area that doesn't get filled - that's another issue entirely.)
Image

In the Tavmjong Bah Guide to Inkscape, I find this
The region to be filled is defined by the pixels on the screen at the time of the fill.

So that pretty much explains why this happens. But it doesn't always happen, as can be seen in my images 3 and 4. Significant parts of the fill area are not visible in #3, yet the paint bucket tool fills it completely, as seen in #4.

I find when using the paint bucket tool, the higher the zoom factor, when I click to fill an area, the smaller is the unfilled thin band between the fill and the border of the closed area. So I've gotten into the habit of reducing a stroke to 0.100, zooming in as far as I can, then click to fill with the paint bucket. Then later, when I put the stroke back to whatever I want, those unfilled areas are covered up by the stroke. Thereby, I avoid having to node edit the paths made by the paint bucket tool, to get rid of the thin unfilled area around the border. (Hhhmmm, maybe I'll post this in the Tricks and Tuts forum?) This has been particularly helpful since learning that paths made with the Spirograph Effect, which have over 500 nodes, can't snap or be snapped to. Although when there's no stroke, this technique really is not helpful.

Anyway, after a short while using this technique, I find that sometimes I can completely fill a closed area, whose entire area is not visible in the window, using the paint bucket tool (as in images 3 and 4 above). And sometimes not (as in images 1 and 2 above). So I'm curious how Inkscape determines whether the paint bucket tool is going to completely fill these areas, or whether it's not going to fill them completely.

I'm thinking the proportion of the visible to non-visible area must be the determining factor. But in practice, I notice it's not consistent. Sometimes maybe only about 2% of a closed area is not visible, and doesn't get filled by the paint bucket tool. But in other situations, with as much as (approx) 10% of a closed area not visible, it nevertheless is completely filled. I'm sorry I don't have examples to show, but I think my wording is clear enough. Also, I'm thinking the zoom factor in effect at the time, must have something to do with this.

So finally my question: How does Inkscape determine whether or not to completely fill an area which is not entirely visible on the canvas? Does it follow some particular mathematical calculation involving the visible/non-visible areas ratio, and/or zoom factor? Does the screen resolution have anything to do with this? Or is there not a calculation, and something else triggers this behavior?

It's not such a big problem, which is why I'm posting here, instead of the Help forum. But it would be helpful if a user could somehow anticipate this behavior "on the fly", especially when making heavy use of the paint bucket tool in an image; for example, some of the more complex Star shapes, even moderately complex spirograms, and certainly those very complex spirograph paths.

And so I guess that's it. Just looking for a smoother "ride" and to reduce the need to constantly be zooming in and out.

Thanks for any comments :D

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: paint bucket fill area

Postby microUgly » Wed Sep 10, 2008 8:49 pm

The tool fills an area a bit bigger than what you see. If you look at your images, you'll see 2 has more colour than what was visible in 1.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: paint bucket fill area

Postby brynn » Sat Sep 13, 2008 1:09 am

Yeah, I've noticed that too, micro. I didn't mention it because I thought it might make my question confusing. But even taking that into consideration, still Inkscape's paint bucket tool sometimes completely fills areas outside the window, and sometimes it doesn't. And I'm just curious what is the mechanism it uses to determine how much of an area to fill, when part of the area is not visible inside the window?


Return to “Discuss Software Issues”