Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Draw a shape on a SVG Field
Draw a shape on a SVG Field [message #1016720] Thu, 07 March 2013 13:23 Go to next message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Hi,
I would need to draw a shape onto my form and I thought to use the SVG field.
I have available the information of the coordinates of some points of the shape that I have to draw.

Could provide some examples which can be of help to me?
Re: Draw a shape on a SVG Field [message #1016724 is a reply to message #1016720] Thu, 07 March 2013 13:44 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 797
Registered: October 2011
Senior Member
From what I know SVG is not exactly a canvas where you can draw on. It display some vector drawings defined as XML.

A long time ago, I had written some code that produce some XML (into a String) and pass it to the SVG Field.

    String xmlString = BarGraphGenerator.generate(values); //Something to generate the xml
    InputStream in = BarGraphGenerator.convertToInputStream(xmlString);
    getGraphField().setSvgDocument(SVGUtility.readSVGDocument(in));


I assume this code still work (I do not have checked).
Re: Draw a shape on a SVG Field [message #1016725 is a reply to message #1016724] Thu, 07 March 2013 13:47 Go to previous messageGo to next message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Hi,
but what kind of structure must have this XML? which information must be contained in this XML?
Re: Draw a shape on a SVG Field [message #1016850 is a reply to message #1016725] Thu, 07 March 2013 21:47 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 128
Registered: March 2010
Senior Member
Hi

The following tutorials should help you getting started:

http://wiki.eclipse.org/Scout/Tutorial/3.8/SVG_Field
http://www.w3schools.com/svg/default.asp.
Re: Draw a shape on a SVG Field [message #1019721 is a reply to message #1016720] Sat, 16 March 2013 13:11 Go to previous messageGo to next message
saad h is currently offline saad hFriend
Messages: 1
Registered: March 2013
Junior Member
Hi,

Although you are given the correct links to learn SVG but you can also use Pac-n-zoom.com to make free SVG Animation's within a few minutes. Its upto you to choose the long or shorter way. Rolling Eyes
Re: Draw a shape on a SVG Field [message #1020921 is a reply to message #1019721] Tue, 19 March 2013 07:28 Go to previous message
marco giudici is currently offline marco giudiciFriend
Messages: 152
Registered: February 2013
Location: Italy
Senior Member
Thanks Saad for your suggestion and link
Previous Topic:How to store SWT window size and view distribution
Next Topic:Having a "frozen" column in a table
Goto Forum:
  


Current Time: Sat Nov 29 06:27:53 GMT 2014

Powered by FUDForum. Page generated in 0.03705 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software