Hello,
I want to add <rect class="btn" ... /> in SVG file after each <image ... />
This change is needed to image was clickable.
Any solutions , please.
Robert
It is possible modify export to SVG format ?
This topic has been viewed 7609 times and has 4 replies
Re: It is possible modify export to SVG format ?
If you want to change SVG export, you should change the implementation of exportToSVG method in the PlanComponent class. In your case, maybe you could simply modify the end of paintFurniture method, to draw your rectangle when the paintMode is equal to PaintMode.EXPORT (you'll see there are already some similar tests for PAINT mode).
Emmanuel Puybaret, Sweet Home 3D creator
Re: It is possible modify export to SVG format ?
I think I described it wrong. [:(]
See my example
(transparent rectangle added manually) When click on image appears message box
This rectangle is transparent and clickable.
I don't want draw separate rectangle.
See my example
(transparent rectangle added manually) When click on image appears message box
Code: Select all
<svg
...
...
>
...
<g ... >
<g ... >
<g ... >
<image x="0" y="0" width="256" height="256"... />
<rect class="btn" x="0" y="0" width="256" height="256" stroke="#fff" fill="#fff" fill-opacity="0" stroke-opacity="0" onclick="action" />
</g> <!-- transform -->
</g> <!-- transform -->
</g> <!-- default stroke -->
</svg> <!-- bounding box -->
I don't want draw separate rectangle.
Re: It is possible modify export to SVG format ?
Look at exportToSVG code, you'll see that SVGGraphics2D class coming from FreeHep library is used to generate SVG code. No idea what you can override there.
Emmanuel Puybaret, Sweet Home 3D creator
Re: It is possible modify export to SVG format ?
Problem solved. [:)]
Added "freehep-graphicsio-svg-2.2.1-sources" to SH3D source and modifiy class "SVGGraphics2D"
Thanks for the tip.
Robert
Added "freehep-graphicsio-svg-2.2.1-sources" to SH3D source and modifiy class "SVGGraphics2D"
Thanks for the tip.
Robert
Who is online
Users browsing this forum: No registered users and 2 guests