19

I've noticed there's a slight gap between shapes and lines in which bucket-fill is applied (to the enclosed areas found therein) and the colour fill in Inkscape, is there any way of removing this gap (besides the older-fashion manual way by manipulating the borders of the bucket fill, which is very tedious)?

7 Answers 7

12

The area of fill (inset/outset) can be controlled by using grow/shrink option displayed in control panel when paint bucket is selected. Setting this value less than 0 (negative) makes the fill path smaller (ref image 1). Here I have set the value to -5px. Image 1

Setting the value greater than 1 (positive) makes the fill path larger than the enclosed area (ref image 2). Have set this value to +5 px. im 2

Thus the required fill can be achieved by varying the values.

1
  • There are great chance to spill over another area on a complex graphic. Check all the small part of a complex graphic is a very tedious work. Commented May 24, 2016 at 8:57
8
  1. Select all the Paths with :tool_selector:
  2. Duplicate them (Ctrl+D)
  3. Convert them to paths (Ctrl+Alt+C)
  4. Create a union from the paths (Ctrl+Shift+ + )
  5. Break Apart the new shape (Ctrl+Shift+k)

One of the shape is an exact fill. delete all others.

This is a much more fool proof solution for a complex graphic like a map or a drawing with lot of small regions and turns.

1
  • This does not seem to work on complex objects (e.g. a group of paths and shapes), even when the outline has no gaps.
    – David.P
    Commented Nov 20, 2023 at 20:02
6

Using the bucket fill tool in Inkscape generates an additional object with dimensions and shape extrapolated from the strokes enclosing an area.

This will lead to some visible rounding errors at the new object's border:

enter image description here

Here is how to remove this white line between the stroke of the original and the new fill object:

  • Select the fill object.
  • Open the Fill & Stroke menu for this object (ShiftCtrlF)
  • Define a stroke with a color identical to the fill
  • Make the stroke width > 1 px.
  • Lower the fill object below the original stroke (PageDown)

enter image description here

2
  • 1
    This will partially solve the problem. But in a complex graphic with lots of small curves and jumps this may not work. There are lot of chances the stroke of fill object may overflow to the other area. How to fix this. Checking a complex graphic will again be more tedious. We need more fool proof solution. Commented May 24, 2016 at 8:56
  • @RanjithSiji: it is a workaround for the bucket fill tool. It is near impossible from a technical point of view to not get sampling and rounding errors the way the bucket fill tool works at present. More complex objects should be separate to have their own stroke and fill.
    – Takkat
    Commented May 24, 2016 at 13:44
3

Paraphrasing from this link. As of Inkscape 0.92.4, Inkscape fills by rendering a image of whats on screen, doing a pixel-based flood fill of the image, traces the resulting pixel image with a path, and outputs that path.

This means you will always get imperfect flood fills, even if you adjust the fill's inset/outset parameter. Yes, this is dumb. Yes, there is currently no way around this.

Here is another article discussing the need for vector-fill feature in Inkscape.

0

Simply zoom in when doing the fill.

(As hinted to in Christopher Pratt's answer)

-1

A way around the issue is to generate vector images for required colors, one for the borders, others for each infill and put them on separate layers. I used paint.net amazing picker to separate out colors as needed.

-2

Try adjusting your fill's "Threshold" to 100, if it isn't. I ran into the same issue. My threshold (default) was set to 15.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.