alternative to colour bucket

Post questions on how to use or achieve an effect in Inkscape.
Maedin
Posts: 7
Joined: Tue Jun 01, 2010 5:45 am
Location: United Kingdom
Contact:

alternative to colour bucket

Postby Maedin » Tue Jun 01, 2010 5:47 am

Hi, I've created an .svg with several straight and curved lines, and it's important that they stay intact. I'm at the final stage and now need to "fill in" areas with colour, and have just discovered the problem with the colour bucket leaving white space around items. Setting the grow isn't working very well for me because it's obscuring my lines, which I need to have quite sharp (the line widths are thin).

I read that the colour bucket doesn't like .svg very much; but what's the alternative to it? Surely Inkscape has a good way to fill in space and flow around text?

Any help or advice appreciated!

Thanks,
Maedin

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

Re: alternative to colour bucket

Postby brynn » Tue Jun 01, 2010 6:36 am

Welcome to our forums!
The Paint Bucket might work with the grow setting after all. Try using the Selection tool and changing the z-order. Make sure the paths are on top of the bucket fill areas. If it still doesn't work, please try the Fill and Stroke dialog. If your image is very complex, especially with paths that overlap, it might not be a straight-forward process. But just let us know if you have any further problems :D

Maedin
Posts: 7
Joined: Tue Jun 01, 2010 5:45 am
Location: United Kingdom
Contact:

Re: alternative to colour bucket

Postby Maedin » Tue Jun 01, 2010 6:39 am

Slow Dog wrote:What I think you've done is draw a shape using Bezier lines, then used the bucket tool :tool_paintbucket: to fill the area surrounded by those lines, yes? That's a normal approach when using a raster graphic tool (Gimp, Photoshop, or similar).

With Inkscape, you'd be better drawing your shape as a single object - a single bezier line with several nodes, the last line joining to the start point - then setting the drawn object's fill colour.

Or if your really desperate to keep what you've done, follow these steps to get a filled area of exactly the right shape:
Select all the lines with :tool_selector:
Duplicate them (Ctrl+D)
Convert them to paths (Ctrl+Alt+C)
Create a union from the paths (Ctrl+Shift+ + )
Break Apart the new shape (Ctrl+Shift+k)
One of the two shapes created will be the exact fill. Delete the other.
The problem isn't that this is difficult, but that you've got more work if you change you drawing.


I found this as a reply to someone else's question. I think it's fair to say that yes, I'm desperate to keep what I've done.

I've just tried this suggested method and when I "break apart" the new shape (whatever that is? I couldn't find the meaning in the inkscape manual), the whole thing goes black on top of my drawing and I keep selecting things underneath the black box. I kind of got it to work, after much fiddling, but it wasn't simple (like Slow Dog made it sound!). Help?

Maedin
Posts: 7
Joined: Tue Jun 01, 2010 5:45 am
Location: United Kingdom
Contact:

Re: alternative to colour bucket

Postby Maedin » Tue Jun 01, 2010 7:18 am

brynn wrote:Welcome to our forums!
The Paint Bucket might work with the grow setting after all. Try using the Selection tool and changing the z-order. Make sure the paths are on top of the bucket fill areas. If it still doesn't work, please try the Fill and Stroke dialog. If your image is very complex, especially with paths that overlap, it might not be a straight-forward process. But just let us know if you have any further problems :D


This works, though it's fiddly because some of my lines are curved, so I keep having to mess with the nodes. But it does work...painfully slow going, ;-)

Thanks very much for the help and the welcome! I appreciate it :)
Maedin

Slow Dog
Posts: 180
Joined: Wed Sep 24, 2008 7:51 pm

Re: alternative to colour bucket

Postby Slow Dog » Tue Jun 01, 2010 7:51 pm

I was replying to something where I thought there was fairly simple space to fill. The important thing really is to draw it the right way in the first place. Quoting myself, that's
drawing your shape as a single object - a single bezier line with several nodes, the last line joining to the start point - then setting the drawn object's fill colour.

I realise that's not a natural way of drawing, where you draw a bunch of overlapping lines and fill in enclosed areas.



So, combine and break apart. I'll explain what's happening so you'll hopefully understand what your doing.

Let's say you had a straight line, and overlapping curve, and ended up with a sort of "P" shape.

So, when you select the lines that enclose that area, Duplicate them (Ctrl+D), Convert them to paths (Ctrl+Alt+C), and Create a union from the paths (Ctrl+Shift+ + ) to combine them, what you've done is convert your lines to that single "P" shape.

You can imagine that the "P" has two sets of nodes, one (a solid "P") that describes the shape of outside, the other (a small solid "D") the inside.

So, when you "Break Apart", Inkscape gives you those two as separate shapes; the one that was the outside, and the one that was the inside. And they'll be black, and on top of original work, which is what threw you off. If you change the fill colour of what was the "inside" to white, you'll have something that looks like the original "P"; if you change it to green, you'll have a green "D" shape that exactly fills (that section of) your original drawing.

You'll need to move this green shape to the bottom, so it's behind (but filling) your original, and delete the black "Outside" shape that's covering everything up, and you'll have what you wanted.

Maedin
Posts: 7
Joined: Tue Jun 01, 2010 5:45 am
Location: United Kingdom
Contact:

Re: alternative to colour bucket

Postby Maedin » Wed Jun 02, 2010 1:16 am

Thanks very much for the explanation. It will probably come in handy at some point, but I have many lines, so using brynn's method of layering works better for me in this situation.

For my next graphic I will try drawing the "unnatural" way, but I am so unartistic that will be quite a challenge!

I will probably request feedback on this illustration (destined for Wikipedia) when I'm "finished", though it's so poor and simple I shall probably only be laughed at, :)

Thanks for your help,
Maedin

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

Re: alternative to colour bucket

Postby brynn » Wed Jun 02, 2010 3:09 am

This works, though it's fiddly because some of my lines are curved, so I keep having to mess with the nodes.

Yes, I understand what you mean. It wasn't clear how complex your drawing might be, or I would have offered this in my 1st reply.

You can use Snap to make it a lot easier. In version 0.47, snapping was "overhauled" and greatly improved, so the settings would be different for previous versions.
Enable snapping, Snap nodes or handles, and Snap to paths. Make sure all the other buttons are disengaged.

If you're not getting a nice strong snap (the node sort of jumps over to the path when your cursor moves close to the path)(or you're getting too strong of a snap, and it's trying to snap to everything else), you can change that particular aspect of snapping in Document Properties > Snap > Snap to objects. You'll have to sort of experiment with the right "strength" of snap, because the zoom somehow affects it (I don't understand why, so can't exlain it...but it does, in my experience). In some cases, 'Always snap' might work just fine; but in other cases, like in a relatively complex image, you'll want to reduce the snap distance with 'Snap only when close than'. Just as a starting place, if you're having a hard time getting it set right, in my own experience, I use a some level of zoom, usually 500% minumum and depending on my image, and a snap distance of 20. (I'm not sure if the units are pixels, or something based on screen resolution...or maybe even something based on the zoom. Anyway, the units don't seem to to correspond to pixels, to me.)

However, please keep in mind that you still might need to tweak the node handles. And when you do, remember that snapping is enabled, and the handle will likely try to snap to the same path. Often, that's perfect. But when it's not, you can use Shift to temporarily disable snapping while you move the handle.

All in all, the Paint Bucket tool :tool_paintbucket: is just plain clumsy, when used in vector graphics. But considering that the :tool_paintbucket: can even be implemented into a vector graphics program, is amazing. But at the end of the day, imo, Fill and Stroke is the ultimate coloring tool for vector graphics.

Maedin
Posts: 7
Joined: Tue Jun 01, 2010 5:45 am
Location: United Kingdom
Contact:

Re: alternative to colour bucket

Postby Maedin » Wed Jun 02, 2010 11:53 pm

Thanks both for such great replies, I didn't realise that I could snap to paths and such. So far, I have only been using that sort of thing for angles when rotating! But then this is my first illustration, so I'll let myself off this once, :)

I have a couple of other questions/problems, now that I have uploaded the graphic to Wikipedia. Would you answer them here or should I create a new post? I don't want to spam the board with small, separate problems, you see!

Thanks,
Maedin


Return to “Help with using Inkscape”