How was it done?

Post questions on how to use or achieve an effect in Inkscape.
Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 4:06 pm

How was this map made? http://commons.wikimedia.org/wiki/File:Iran_Iraq_Locator.svg.

After having downloaded the map, it turns out that the map is part of a larger map, namely the world map. Yet, I only see a part of the map (Iran, Iraq) on Wikipedia. How is this done?

It is as if the Iran-Iraq -region is centered as compared to the other parts of the map.

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 4:37 pm

yes, that was my first thought too, but when you clip the rest of the image disappears. Yet, when I download this image into inkscape, the entire world still can be seen. It is as though the picture has been centered.

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 4:39 pm

Oh sorry, I realized I was wrong and deleted my reply, but somehow you managed to see it in the 5 seconds before I deleted it, lol!

But hold on, I think I can give you an answer, but need to think about it.

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 4:42 pm

Ok, here's what I think they did (still just guessing because I can't see the image).
They have a world map.
They trace the borders of those countries.
They draw a rectangle whatever size they want the image to be.
They place the rectangle between the map and traced, closed path.
They select both the path and the rectangle.
They use Path menu > Difference.

Yes?

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 4:43 pm

No, nothing in particular in the status/info area as compared to the other regions. I didn't find something in the xml-tree either. Big mystery to me.

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 4:44 pm

Wait! The rest of the world can still be seen? I think I need to see the image. Let's see if I can download it, rather than open. brb

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 4:47 pm

Ooooohhh! For some reason, the site didn't display the image the first time I looked, but now I can see it.

It appears all they did was color in those 2 countries? Is that what you mean? Even though I can now see it, I still don't have the SVG that I can open in Inkscape.

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 4:53 pm

Ok, I have the file now open in Inkscape.
Yeah, all they did was trace the borders, then fill one with green and one with brown. Nothing fancy :D

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 4:57 pm

They did color those two countries. But on Wikipedia, what you can see are exactly those two countries AND NOT THE ENTIRE WORLD. That is weird. Not the entire image can be seen on Wikipedia. Just a small part of it.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: How was it done?

Postby ~suv » Wed Nov 03, 2010 5:12 pm

Amadeus12 wrote:(…) But on Wikipedia, what you can see are exactly those two countries AND NOT THE ENTIRE WORLD. That is weird. Not the entire image can be seen on Wikipedia. Just a small part of it.

Nothing "weird" here as far as I can tell, just an SVG attribute that is added to the top-level <svg> node (you have to set and edit it manually, Inkscape does not have a GUI for it and only partial support):

Code: Select all

   viewBox="1140 157 620 415"

You can find more information about the viewBox attribute in the SVG 1.1 specification.

Bug #166885 in Inkscape: “ViewBox attribute not supported” (Fix released)
Bug #170965 in Inkscape: “automatic ViewBox creation” (Feature request)
Bug #168261 in Inkscape: “Inkscape SVG unresizable in Firefox (needs viewBox?)” (open)

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 5:21 pm

Thank you for your answers, ~suv. This is still unclear to me, and I will have to look into it, but this could be the thing I was looking for.

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 6:27 pm

But on Wikipedia, what you can see are exactly those two countries AND NOT THE ENTIRE WORLD. That is weird. Not the entire image can be seen on Wikipedia. Just a small part of it.

Ok, just to be clear, the link you provided is for an image on WikiMedia.

Also, time for screenshots :lol:

Here's what I see on WikiMedia:

Image

And here's what I see in Inkscape:

Image

Now. You're wondering how they made the image seen in Inkscape, with the whole world, look like the image seen on WikiMedia, with most of the rest of the world outside the image border? Is that it? Before I answer, let me know if I have the question right, ok?

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 7:39 pm

Yes, that is the question.

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

Re: How was it done?

Postby brynn » Wed Nov 03, 2010 9:30 pm

A-HA!! :lol:

Ok, this is very simple. When you first open Inkscape, you see page borders, and by default, the page border and a shadow of the page border. Both of these you can disable, if you like, in Document Properties. But that's just a bit of trivia.

There may be one or both of 2 things happening in this situation. One is that whoever did this, set the page border in Inkscape, to the size they needed for the WikiMedia page, and moved the map around until the 2 countries are in the middle (or maybe they used Align and Distribute dialog, or Snap, or some tool or another to put the countries exactly in the middle?). Only the parts of the image that fall inside the page border, are visible on the webpage.

In this case, for reasons that I could only guess, the page border is underneath the map image. There's also a setting in Doc. Prop. to make the page border always on top. And if you click that, then you can see the page border, and realize which part of the map will be visible. In this case, the Inkscape page border is exactly the same size as the image we see on the WikiMedia page.

The other possibility, is one that I don't know as much about. There are ways to make a webpage, where you can set the size of the area where you want an image. If your image is larger than that set size, only the portions that fall within that size will be visible. But there are many, many ways to make a webpage, and I only know one of them. So I can't provide details, or analyze the source code, to learn how they set up this WikiMedia page.

Because the Inkscape page border is exactly the size of the image on the webpage, I think they builder of the webpage may have done both. Or they may have just relied on the Inkscape page border alone. I'm not sure if there's is any way to know for sure.....well, not for me anyway. Others more knowledgeable about webpage design and contructions might be able to analyze it, if you need to know that kind of detail?

Otherwise, the answer is: only the parts of an image that fall inside the page borders are visible in the finished uploaded image. :D

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 9:51 pm

Thank you for your answer, brynn. It is something I can work with. There is a way to test svg files before uploading them and that is by using the page test.svg. And that is what I am going to do. If you like, I keep you posted on the outcome. Thanks again.

Amadeus12
Posts: 66
Joined: Sat Sep 11, 2010 4:20 pm

Re: How was it done?

Postby Amadeus12 » Wed Nov 03, 2010 10:47 pm

Yes, I have done it. In a certain way it is very simple (you just have to know it). Draw a rectangular on the spot you can want to select. Go to Document Properties. Fit page to selection. Remove the rectangular and then you have set the border.

I have uploaded a test file: Great Britain: http://commons.wikimedia.org/wiki/File:Test.svg
I have downloaded the file from wikimedia and bingo, the full image was to be seen in Inkscape.
So, all in all it is very simple. Thank you again. Greetz. 8-)

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

Re: How was it done?

Postby brynn » Thu Nov 04, 2010 7:23 am

You're welcome :D


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 5 guests