Putting an image into a drawn area

Post questions on how to use or achieve an effect in Inkscape.
MisterMister77
Posts: 3
Joined: Mon Jul 22, 2013 2:01 am

Putting an image into a drawn area

Postby MisterMister77 » Mon Jul 22, 2013 2:31 am

Hello there I'm doing a college project. I downloaded Inkscape two days ago and need help.

As you can see I've drawn something using freehand lines :tool_pen: .
Image

Then created a blue box :tool_rectangle: and layered it under the lines (though I may not now use it).
Image

However I want to take an image (the red and blue chequered image) and place it in the area where the Yellow star is situated. (the yellow star is just there to show you).
Image
How the hell do I do that??
It is such a strange shape that I presume there is a tool to do that??

Also I have filled some of the areas in using Fill :tool_paintbucket: . Unfortunately the Fill does not exactly go up to the black lines. It doesn't fill completely.
Image
How do I get it to fill in completely?


Any instructions would be very much appreciated. Thank you. :D

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Putting an image into a drawn area

Postby Lazur » Mon Jul 22, 2013 10:16 pm

Hi!

To fill in spaces in vector images, don't rely on bucket filling.
That is a raster based method, which won't solve your problem.

To create filled shapes, create closed paths with that pen tool,
and go to the fill and stroke panel (Shift+Ctrl+F) to add right values.

Making a fill with that checkerboard pattern, there are more ways:
you can use the shape you want it to have that fill as a clipping mask, when placed above the "fill object".
Similar way, is adding a white fill first to the shape to be filled, and using it as a regular mask on that fill object.

Another way, is creating a pattern from that object, that can be used as a fill on any closed paths.

MisterMister77
Posts: 3
Joined: Mon Jul 22, 2013 2:01 am

Re: Putting an image into a drawn area

Postby MisterMister77 » Tue Jul 23, 2013 5:46 am

Hello, thank you very much for your reply.

Unfortunately I'm having trouble completely understanding it all.
Lazur URH wrote:To create filled shapes, create closed paths with that pen tool,
and go to the fill and stroke panel (Shift+Ctrl+F) to add right values.


Okay I have tested that but with basic shapes (square/triangles) and now understand.

But the problem is the image I have drawn is (as you can see in the screenshot) - extremely complicated. And to be honest I don't think all the spaces are completely "closed"!

Okay I have checked now but the Nodes are not all connected to make a single area path. So really it is impossible for me to use the :tool_selector: to pick out just one area. In fact it seems to consider it as one whole "thing" because it only allows me to 'Move' the whole complete "page".

Lazur URH wrote:Making a fill with that checkerboard pattern, there are more ways:
you can use the shape you want it to have that fill as a clipping mask, when placed above the "fill object".
Similar way, is adding a white fill first to the shape to be filled, and using it as a regular mask on that fill object.

Another way, is creating a pattern from that object, that can be used as a fill on any closed paths.


Sorry most of this I don't understand. It is not a checkerboard pattern I am trying to fill, it is an actual image. I was using checkers as an example.

The problem is that I intend you use many images to fill in some of the areas (but one per area) as it is a map. If they are simply placed "behind" then it might mean that I'll need lots and lots of different layers. That is why I thought it would be better to somehow "trim" the correct shape from the image.

But yes could you possible explain a little more??

Thanks.

MisterMister77
Posts: 3
Joined: Mon Jul 22, 2013 2:01 am

Re: Putting an image into a drawn area

Postby MisterMister77 » Thu Jul 25, 2013 12:46 am

I've tried messing around for a while and this is all I could do. It would seem the way I've drawn it, the "nodes" are all over the place because it's freehand.

Image

I've had to click on certain sections of the black lines, then go to "Path" and click on "Combine" (CTRL+K) to combine all the lines of an area into one.

Then I did the usual thing for cropping: "Object", then "Clip" ----> "Set".

Image

But even then it is messed up!! For some reason it's bleeding white in the middle! And it has got rid of the black border lines.

This is all becoming incredibly frustrating!!

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Putting an image into a drawn area

Postby Lazur » Thu Jul 25, 2013 5:38 am

By combining separate path the result will be a compound path, not a closed one.
So.
You either edit all your paths to be closed ones -time consuming thing, AND
there would be strokes drawn with double path sections, which would seemingly make them look uneven.
OR
you could create some closed paths underneath those outlines for the fills only, which are closed paths but doesn't follow accurately the black strokes.

Assuming you don't want to redraw your image completely, here is how to do the second option:
Select all the paths with the black strokes,
combine them together,
duplicate it.
Then, on the duplicant,
set a thinner outline through the fill and stroke panel (Shift+Ctrl+F),
then convert outline to path,
then uncombine path by pressing Shift+Ctrl+K.
After that, all parts would turn to black filled closed paths with no outlines, so
lower the opacity to like 50%,
Shift+click on the path that covers all the other paths -it is under them actually, so click on it somewhere on the edge where a lighter fill is displayed-,
and group the remaining selected paths together by pressing Ctrl+G.
Then, select the previous path that was left out of the group and delete it,
and select the group and move it under the black strokes by pressing End.

This way you created all closed paths that can be filled correctly with a colour/used as a clipping mask and so on.
The clipping was messed up on your screenshot
because the clipping mask wasn't a closed path, thus the fill didn't follow the contours as you would thought.


Return to “Help with using Inkscape”