Howto:Extend the Canvas SVG module: Difference between revisions

Jump to navigation Jump to search
Line 67: Line 67:
Let's assume, we'd like to support raster images, e.g. SVG markup such as the following (for the sake of simplicity, this is simply saved under $FG_ROOT/Nasal/img.svg for testing purposes):
Let's assume, we'd like to support raster images, e.g. SVG markup such as the following (for the sake of simplicity, this is simply saved under $FG_ROOT/Nasal/img.svg for testing purposes):
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<svg xmlns="http://www.w3.org/2000/svg"
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    xmlns:xlink="http://www.w3.org/1999/xlink">
   <image x="20" y="20" width="80" height="80" xlink:href="Textures/Splash1.png" />
   <image x="160" y="0" width="160" height="160"
  <image x="120" y="20" width="80" height="80" xlink:href="Textures/Splash2.png" />
    xlink:href="https://forum.flightgear.org/styles/flightgear/theme/images/logoF.png" />
  <image x="220" y="20" width="80" height="80" xlink:href="Textures/Splash3.png" />
  <image x="20" y="120" width="80" height="80" xlink:href="Textures/Splash4.png" />
  <image x="120" y="120" width="80" height="80" xlink:href="Textures/Splash5.png" />
</svg>
</svg>
</syntaxhighlight>
</syntaxhighlight>

Navigation menu