[messages] [Module Design] Using SVG files for counter images

geoffreyphipps gphipps at gphipps.com
Mon Apr 20 01:15:32 CEST 2015


Hi,
  I have managed to crash vassal by using an SVG file for a unit image.
I can stop it crashing by switching to PNG. The SVG file is one that i
generated, and it renders correctly in a number of other graphic
systems. Are there particular restrictions for vassal? For example, does
it need the  header?  I'll try rippng that out.

SVG file:


Code:
<svg x="0pt" enable-background="new 0pt 0pt 36pt 36pt" y="0pt"
width="36pt" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0pt 0pt
36pt 36pt " height="36pt" xmlns="http://www.w3.org/2000/svg"
xml:space="preserve" version="1.1">
    <!-- L Half Battalion, 1 Bn -->
  <rect x="0pt" y="0pt" fill="#e0ad3d" width="36pt" style="stroke-width:
0.5pt" height="36pt" stroke="#000000"/>
  <rect x="0.566929pt" y="0.566929pt" fill="#32ff32"
width="34.866141999999996pt" style="stroke-width: 0.5pt"
height="8.503935pt" stroke="#32ff32"/>
  <rect x="10.062994pt" y="13.606296pt" fill="#000000"
width="15.874011999999999pt" style="stroke-width: 0.5pt"
height="8.503935pt" stroke="#ffffff"/>
  <line y2="22.110231pt" fill="#ffffff" style=" stroke: #ffffff;
stroke-width: 0.5pt" x1="10.062994pt" x2="25.937005999999997pt"
y1="13.606296pt"/>
  <line y2="13.606295999999999pt" fill="#ffffff" style=" stroke:
#ffffff; stroke-width: 0.5pt" x1="10.062994pt" x2="25.937005999999997pt"
y1="22.110231pt"/>
  <line y2="10.771651pt" fill="#000000" style=" stroke: #000000;
stroke-width: 0.5pt" x1="17.1496065pt" x2="17.1496065pt"
y1="13.039367pt"/>
  <line y2="10.771651pt" fill="#000000" style=" stroke: #000000;
stroke-width: 0.5pt" x1="18.8503935pt" x2="18.8503935pt"
y1="13.039367pt"/>
  <line y2="11.905509pt" fill="#000000" style=" stroke: #000000;
stroke-width: 0.5pt" x1="17.149606499999997pt" x2="18.8503935pt"
y1="11.905509pt"/>
  <text x="18pt" font-size="9" y="7.79527375pt" text-anchor="middle"
fill="#ffffff" font-family="Calibri" font-style="bold">L  1 Bn</text>
  <g transform="rotate(270, 8.929136pt, 10.204721999999999pt)">
    <g transform="translate(-7.937005999999999pt, -9.9212575pt)">
      <text x="8.929136pt" font-size="5" y="20.1259795pt"
text-anchor="middle" fill="#000000" font-family="Calibri"
font-style="bold">1A</text>
    </g>
  </g>
  <text x="27.070863999999997pt" font-size="6" y="20.1259795pt"
text-anchor="start" fill="#000000" font-family="Calibri"
font-style="bold">L</text>
  <text x="8.0787425pt" font-size="11" y="34.01574pt"
text-anchor="middle" fill="#000000" font-family="Calibri"
font-style="bold">4</text>
  <text x="16.866142pt" font-size="9" y="34.01574pt"
text-anchor="middle" fill="#000000" font-family="Calibri"
font-style="bold">4</text>
  <text x="27.070864pt" font-size="11" y="34.01574pt"
text-anchor="middle" fill="#000000" font-family="Calibri"
font-style="bold">20</text>

</svg>




_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=48593#p48593


More information about the messages mailing list