[messages] [Module Design] SVG size

PunTheHun vassal at flyhi.de
Tue Feb 7 11:11:11 CET 2017

I am a bit confused (or let's say I lack information) about the way SVGs
are handled in VASSAL (3.2.17, MacOS 10.11). The Designer Manual (still
on 3.1, it seems) does not explain these things in detail, that's why I
ask here. Please point me to a source of information if it has been
answered before.

I create my SVGs from Illustrator and can load them into VASSAL as map
or piece images without problems. When I select an SVG image, let's say
for a map, the size settings disappear – logical, it seems, as an SVG
is vector except for embedded images and should scale to any size. But
OTOH VASSAL has to render the SVG to _some_ size – which? Looking at
screenshots and the coordinates shown during Region creation I think it
uses the size given in 
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
__width="782.177px" height="1587.4px"__ viewBox="0 0 782.177 1587.4"
enable-background="new 0 0 782.177 1587.4" xml:space="preserve">  ?
Indeed the map _does_ scale brilliantly to any size until the heap runs
out of space.

So, when I mix PNG and SVG, I guess I should use the height/width as
shown in the SVG source as a reference? In other words, for all things
concerned with size, scale etc. I should treat the SVG as an image of
the px size given in the <svg version> tag?

Thanks in advance,

PS: Yes, I know I should have avoided fractional px sizes from the
PPS: I'd be ready to help with writing new docs.

Read this topic online here:

More information about the messages mailing list