Svg Image Scale using UIBinder

110 views
Skip to first unread message

Gabriel Pulido de Torres

unread,
Apr 10, 2014, 2:51:35 PM4/10/14
to lib-g...@googlegroups.com
Hello,
I would like to draw an svg image that is on an external resource, and set its width and height using UIBinder.
I have followed the link:

So In my Ui.xml i have the following:

<g:HTMLPanel >
                <svg:SVGImage ui:field="myImage" resource="{resources.logo}"/>
 </g:HTMLPanel>

And I have created the resource bundle accordingly.
Also I have added to the .java
 @UiField
 SVGImage myImage;


This works, and the image is shown, but it is huge and I want to resize it.

If I add any style to the previous <svg> the app stops running and a nullexception is raised.

I don't know what more to try, probably is a silly question,
Anyone can give me a hint?

Thank you in advance
Regards
Gabriel
Reply all
Reply to author
Forward
0 new messages