Allows inclusion of an SVG file in a FitNesse page. For the file to be
reachable over HTTP in FitNesse, it needs to be store under (a directory in)
FitNesseRoot/files.
For the symbol to be deployed, put the RestFixture.jar in the FitNesse start
command (eg:
java -classpath path_to/RestFixture.jar -jar fitnesse.jar
) and add to the plugins.properties file the following property:
SymbolTypes=smartrics.rest.fitnesse.fixture.SvgImage. See
this for more
details.
To use the symbol, is sufficient to specify in a line in the test page the
following:
!svg /files/path/to/image.svg rendering_mode
The
rendering_mode is one of the following:
modes
| inline |
the image is included as is, hence using the <svg> tag |
| embed |
the image is rendered using the <embed> tag |
| object |
the image is rendered using the <object> tag |
| img |
the image is rendered using the <img> tag |
| iframe |
the image is rendered using the <iframe> tag |
| anchor |
the image is rendered using the <a> tag |
Each mode (except
inline) will point to the file in the fitnesse
server.
Basically this means that when embed is used, the conent of the SVG file is
read at that point in time and substituted as the page is rendering. With the
others, an HTML tag is rendered that has a src that points to the remote
file, hence the image is rendered when the browser decides to.
Also note that
rendering SVG files embedded in HTML pages is one of the
least supported features across all browsers. So the end result of embedding
an SVG is highly dependant on the browser and unluckely to be portable.