[Seaside] How do I render an SVG string?

Hannes Hirzel hannes.hirzel at gmail.com
Tue Mar 29 10:44:57 UTC 2011


Hello

A quick question:
How do I output some SVG code?

(http://www.w3.org/Graphics/SVG/)

mySVGstring := '<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">

<path d="M250 150 L150 350 L350 350 Z"
style="fill:yellow;stroke:red;stroke-width:24"/>

</svg>'.

   html ........ mySVGstring.

What do I need to put on the place of ....... ?

Regards and thank you in advance
Hannes



Note: The class WASvgFunctionalTest

has the example

renderContentOn: html
	html object
		type: 'image/svg+xml' seasideMimeType;
		width: 600;
		height: 800;
		standby: 'loading tiger';
		url: 'http://croczilla.com/bits_and_pieces/svg/samples/tiger/tiger.svg';
		with: 'Your browser doesn''t support SVG'


More information about the seaside mailing list