0

Following up from an earlier question, I am tracing a street map for a town using a bitmap from OpenStreetMap. I am using bezier curves for the roads. Different roads have different colors and sizes, shown in the figure by the green and yellow lines. I have also created a bounding box for the map, shown in graphic as a rectangle with a black stroke and a gray fill.

There is also a river crossed by a road bridge at the top of the map - only part of the river is shown. The shoreline is drawn in blue. I want to shade the river between the shorelines in light blue. I have realised that I can use the bucket tool to fill that area, but that feels like the wrong approach. Given that the area of water is bounded by the shorelines and the bounding box, I had expected to be able to use that to create an object.

Map with river

Thinking that the fact that the boundary box is a shape might be the issue, I also tried adding paths to use to combine with the shorelines into one closed path, like this (new lines in red):

Map with bits

This didn't work as I could not fill the resulting shape:

enter image description here

Any suggestions as to how I could create an object from the bounding box and blue shorelines?

0

1 Answer 1

1

You need to make a closed path to make an object properly fillable. This is basic concept in all vector image editing software, not just Inkscape. I'm assuming you don't really know what that means, so I'll try to explain.

In the example below, the shape on the left is made of independent lines. They are not one object, but actually four separate objects. When you try to apply a fill, it will add the fill to each object separately.

In the example on the right, this is one shape made with the Bézier tool. It's just one closed continuous path, which is fillable.

enter image description here

The easiest way to do this is to draw a closed path, using the Bézier tool, and create the object in one go. When you close the path, you should see the last (and first) node highlight red. Like this:

enter image description here

It is possible to join separate lines in Inkscape, but it's a messy process. Basically you have to select two end nodes and use the Join button. More trouble than it's worth.

If you need the image to follow the eges of the grey rectangle you could use enable Snapping, Snapping to Nodes, and Snap to Paths.

enter image description here

Example

enter image description here

2
  • Thank you for this. I am familiar with closed paths, and in modelling software like MoI it is easy to create them from existing entities. I assumed it would be similarly simple in Inkscape, and that I must be missing something, but apparently not! I will redraw from scratch. Apr 2 at 9:01
  • 1
    @SlowLearner Well, you can join multiple paths to make one closed path in inkscape too, using the Join button as I already mentioned, but it's not as easy as just using the Bézier tool to make a single compound path.
    – Billy Kerr
    Apr 2 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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