Editing SVG workarounds

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
This page lists the SVG workarounds you may need to use to get your [[map]] working in Warzone.
 
 
 
==ViewBox Fix==
 
==ViewBox Fix==
  
Warzone currently has a hard time understanding SVG files that have setting for an SVG's width and height from its view box.  This can cause maps to appear incorrectly sized when uploaded to Warzone, or to not appear at all if they are so much larger than the screen that all of the territories are off-screen.
+
WarLight currently has a hard time understanding SVG files that have setting for an SVG's width and height from its view box.  This can cause maps to appear incorrectly sized when uploaded to WarLight, or to not appear at all if they are so much larger than the screen that all of the territories are off-screen.
  
 
To check if this is causing an issue or to fix it, follow these steps:
 
To check if this is causing an issue or to fix it, follow these steps:
Line 15: Line 13:
 
## height = 400
 
## height = 400
 
## viewBox = 0 0 900 400
 
## viewBox = 0 0 900 400
# If the viewBox isn't rooted at 0,0 or if its width and height don't match the others, simply change the viewBox by selecting it, typing in the correct numbers, and clicking set.  After doing this, your map will likely shift all of its territories to different locations.  Now you should  select all of the territories and move/resize them to fit them back within the box.  After doing this, the map should work correctly in Warzone.
+
# If the viewBox isn't rooted at 0,0 or if its width and height don't match the others, simply change the viewBox by selecting it, typing in the correct numbers, and clicking set.  After doing this, your map will likely shift all of its territories to different locations.  Now you should  select all of the territories and move/resize them to fit them back within the box.  After doing this, the map should work correctly in WarLight.
 +
 
 +
 
 +
==Transform Fix==
 +
 
 +
Unfortunately there are a few kinds of transformations that SVG supports that WarLight does not.  These can cause objects to appear at a different location within WarLight than they should.
 +
 
 +
Fortunately, these are easy to fix.  In Inkscape, open the XML Editor (on the top toolbar, it's the 4th button from the right).
  
==Text==
+
Select the offending object.  The XML Editor will show you the attributes on it.  If you see an attribute named ''transform'' with a value that starts with ''matrix'', delete it.  This will cause the object to move in Inkscape - now just drag it back to its correct position and your map should work normally.
  
Warzone doesn't support the plain text you can type in in most SVG editors. They won't show. So you'll need to transfer them to paths. That can be done this way:
+
This bug will be fixed in the next WarLight release, 1.08.
# Open the SVG file in Inkscape.
+
# Select the text you want to transfer.
+
# Open the menu "Paths", and from there the option at the top: "Object to Path" Click it.
+
Now re-upload the map to Warzone and you're done!
+
  
[[Category:Map Making|Workarounds]]
+
[[Category:Map Making]]

Please note that all contributions to Warzone Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Warzone Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox