Best way to ONLY fill inside object?

Post questions on how to use or achieve an effect in Inkscape.
CR250_182
Posts: 42
Joined: Sat Jan 12, 2013 10:45 am

Best way to ONLY fill inside object?

Postby CR250_182 » Fri Jan 18, 2013 4:02 am

Hey guys, so I need a little help here, and I'm not sure how to explain it, basically I want to know how to only fill in the design I have but not over the edges. So let's say I want to make vertical lines over this
splatter png.png
splatter png.png (188.28 KiB) Viewed 2947 times
but instead of having to draw each individual line I find a pattern I can use and just place it over the graphic area but not in the background part that's blue, so basically just fill in the graphic but nothing around it.
Sorry that I'm not very good at explaining it but I hope someone realizes what I'm trying to do!

Thanks in advance,
-Jake

CR250_182
Posts: 42
Joined: Sat Jan 12, 2013 10:45 am

Re: Best way to ONLY fill inside object?

Postby CR250_182 » Fri Jan 18, 2013 9:46 am

Kind of like the "Tweak objects by sculpting or painting" tool, how you can just add stuff to the selected section and it won't affect anything around it.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Best way to ONLY fill inside object?

Postby ragstian » Fri Jan 18, 2013 10:52 am

Hi.

One method of adding vertical lines that "stay" inside the objects:
Copy the object holding the outline.
Make as many copies of this object as you got vertical lines.
Select the Stripe and the outline object and do; path - difference
Repeat for all stripes. -( One outline object will be "consumed" each time )

Image
Click image for larger version.

Good Luck
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

CR250_182
Posts: 42
Joined: Sat Jan 12, 2013 10:45 am

Re: Best way to ONLY fill inside object?

Postby CR250_182 » Fri Jan 18, 2013 11:27 am

ragstian wrote:Hi.

One method of adding vertical lines that "stay" inside the objects:
Copy the object holding the outline.
Make as many copies of this object as you got vertical lines.
Select the Stripe and the outline object and do; path - difference
Repeat for all stripes. -( One outline object will be "consumed" each time )

Image
Click image for larger version.

Good Luck
RGDS
Ragnar


Exactly what I'm looking for, I'll give it a try!

One more question though, will this work with other items, such as a logo inside a box or something?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Best way to ONLY fill inside object?

Postby druban » Fri Jan 18, 2013 12:26 pm

Another way, especially for lots of objects:
1. Select all (ctrl A)
2. Ungroup (Ctrl U) if the bar says you have groups. repeat until no more groups show.
3. Convert to paths (Shift ctrl C?) If the bar says you have any special objects especially text. Repeat 1. and 2. until you only have paths in the selection.
4. Union (Ctrl Plus)
5. Fill with pattern. Alternatively you could use the resulting path as a clipping path if your 'pattern' is not already defined as a pattern or is a drawing...

Alternatively:
1. select all and group (Ctrl A, Ctrl G).
2. fill with 100% opaque white either from the palette or the F/S dialog.
3. Draw a rectangle big enough to cover everything, fill with the pattern you want and send it to the back.
4. Select all again and do Object>mask>set OR object>clip>set. depending on which works better. If you are using clip the 'fill with white' step can be skipped, but bitmap elements can't be present. Mask will work on a mixture of bitmap and vector elements but bitmaps will have to be whitened (use the lightness contrast filter) and opaqued.
This method avoids the Union step which may be a problem if there are some filtered or bitmap objects.
Your mind is what you think it is.

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

Re: Best way to ONLY fill inside object?

Postby brynn » Sat Jan 19, 2013 10:09 pm

I'm not clear whether you want to put lines over the current graphics, or replace the current graphics with lines. And either way, I'm not sure how you meant to do that with the Tweak tool. Going strictly by the title, the only way to fill objects IS inside only. And I don't mean to sound belittling, I'm just trying to understand what you want to do, since you said it's hard to explain.

My first thought would be to use Clipping. Except that this looks like something you will be cutting, like for decals, or cut out of vinyl? If that's the case, then clipping might not be the best. Since I've never used a cutter/plotter, I'm not sure exactly how it works. Ragnar's technique would probably work best, except that he doesn't use a pattern, and instead has drawn all the lines. And doing a Difference operation for each line seems a bit labor intensive. druban's first suggestion seems to be replacing whatever you have in the fill area of each shape. His 2nd one involving masking may be exactly what you want. I've not done much masking, and don't have a good grasp of how to use it. But as I said, it may be exactly what you want.

But I thought I'd offer another approach, since we may not have all the details yet. Going by the the concept of adding the lines over top of the current colors, I would first create a custom pattern. It's very easy. Using a grid with snapping engaged, draw a small series of lines, evenly spaced -- covering approx a square inch, or 50 x 50 px. It doesn't have to be the full size of an object or a page, and a small sample will work just fine. (Technically, you could probably use just 2 lines for the pattern!) Select them all, then do Object menu > Objects to Pattern.

Next, you'll need an outline path for each shape on that page (or for each object you want to put the line pattern over). And if you are indeed cutting/plotting, you'll need that path anyway, to cut on. Maybe you already have it, it's hard to say from the screenshot. And since I don't know exactly how your image is made, I can't give detailed instructions. But in whatever manner makes sense to you, select all the cutting paths, just the outlines of each shape, and Duplicate. Then while they are still selected, Fill and Stroke > Fill tab > Pattern button. Since the pattern is transparent between the lines, all the original fills will show through.

Well, one way or another, assuming at least one of us understands what you want, this should be very do-able! Let us know if you get stuck :D

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

Re: Best way to ONLY fill inside object?

Postby brynn » Sat Feb 09, 2013 11:22 am

CR250_182, your newest questions have been used to start a new topic, since they appear to be quite different from those in this topic. Please look for a topic titled "cut something in half". I apologize if I didn't understand the question. At the moment, I'm not sure if you will be able to change the topic title yourself, or if I will need to do it for you. But if it needs to be changed, and you can't do it, let me know what it is, and I'll change it. :D


Return to “Help with using Inkscape”