make paint brush replace a specific color

Asked by Alexander van Loon

I want this map – http://en.wikipedia.org/wiki/File:Location_greek_ancient.png – but it’s size was too small and it wasn’t in the SVG format. So I took a world map in SVG format – http://en.wikipedia.org/wiki/File:Worldmap_wdb_combined.svg – and cropped it to the surroundings of the Mediterranean Sea with Inkscape.

Now, what I want to do is paint a color on the soil were the Greeks lived. Obviously this means I only want to paint on the light brown color, I want the brush to deliberately miss the blue color of the sea and shore lines. How do I make it so that the brush will only paint on the light brown color?

I’m using Inkscape 0.47 on Ubuntu 9.10. Many thanks for any help in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
Best su_v (suv-lp) said :
#1

> make paint brush replace a specific color
There's no 'brush' tool in Inkscape, this term is often used in connection with editing raster images not vector graphics.

> and cropped it to the surroundings of the Mediterranean Sea with Inkscape.
How did you do that? You can't 'crop' vector objects in current Inkscape versions, only 'clip' (which means the original paths are still in the drawing, but only the part surrounded by the clipping path is visible).

> I want the brush to deliberately miss the blue color of the sea and shore lines. How do I make it so that the brush will only paint on the light brown color?
Not possible in Inkscape (at least I am not aware of any implemented solution): color fills are an attribute of a path that defines a region which can be rendered with a fill color. You could experiment with the bucket fill tool in Inkscape 0.47, once you have created the inner border (opposite the sea border), to fill contiguous regions between the in-land borders and the shore lines.

<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths.html>
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes.html>
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Bucket.html>

Alternatively you could use the stack order of objects (z-order of objects, groups and layers) to put the filled path defining the outline of the sea on top of your newly drawn regions along the shores, concentrating on drawing the in-land borders of those regions precisely. Then you could use path operations to subtract copies of the sea path from the 'greek-regions' paths to get geometrically well defined closed paths for your area of interest which than can be assigned any fill color you need.

<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Z-Order.html>
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Layers.html>
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Combining.html>

Revision history for this message
Alexander van Loon (avanloon) said :
#2

Pardon my terminology which doesn’t conform to the nature of vector graphics. I’m much more familiar with the GIMP than I am with Inkscape.

Concerning the cropping, I followed this – http://inkscape-forum.andreas-s.net/topic/112456#762064 – advice here, which I found through Google. As you wrote, I figured out that there’s still information stored outside the canvas even if it’s not visible. So now the downsized map which is limited to the surroundings of the Mediterranean Sea is barely any smaller in file size than the original world map.

Thank you very much for answer, but even after a trying for a few hours I have to conclude this aspect of Inkscape is out of my league. I decided to ask the Wikipedia editor if he could provide me with an SVG version of the map which he uploaded, hopefully he can help me.

Revision history for this message
Alexander van Loon (avanloon) said :
#3

Thanks ~suv, that solved my question.