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 08:23 Go to next message
marco giudici is currently offline marco giudici
Messages: 92
Registered: February 2013
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 08:44 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 530
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 08:47 Go to previous messageGo to next message
marco giudici is currently offline marco giudici
Messages: 92
Registered: February 2013
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 16:47 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 126
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 09:11 Go to previous messageGo to next message
saad h is currently offline saad h
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 03:28 Go to previous message
marco giudici is currently offline marco giudici
Messages: 92
Registered: February 2013
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: Thu Apr 24 01:57:15 EDT 2014

Powered by FUDForum. Page generated in 0.01752 seconds