suggestions for erlang drawing toolkit?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

suggestions for erlang drawing toolkit?

Garry Hodgson-2
for some visualization work i'm doing i need to be able to generate
images from basic line/ellipse/text kind of primitives.  we've been
using PIL (Python Imaging Library) for this, but it'd be nicer to do
this in just erlang.  ideally i'd like to be able to generate PNG and
SVG output.

does anyone have any suggestions?

thanks


--
Garry Hodgson
Lead Member of Technical Staff
AT&T Chief Security Office (CSO)

"This e-mail and any files transmitted with it are AT&T property, are
confidential, and are intended solely for the use of the individual or
entity to whom this e-mail is addressed. If you are not one of the named
recipient(s) or otherwise have reason to believe that you have received
this message in error, please notify the sender and delete this message
immediately from your computer. Any other use, retention, dissemination,
forwarding, printing, or copying of this e-mail is strictly prohibited."
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: suggestions for erlang drawing toolkit?

Björn-Egil Dahlberg-2
Hi Garry,

Have a look at egd in the percept application, that might suit your need.
Egd lacks a lot of features but if you only need rudimentary functions like ellipses, rectangles, thin lines and text (with one small font) it could be what you are looking for.

Regards,
Björn-Egil

2011/8/8 Garry Hodgson <[hidden email]>
for some visualization work i'm doing i need to be able to generate
images from basic line/ellipse/text kind of primitives.  we've been
using PIL (Python Imaging Library) for this, but it'd be nicer to do
this in just erlang.  ideally i'd like to be able to generate PNG and
SVG output.

does anyone have any suggestions?

thanks


--
Garry Hodgson
Lead Member of Technical Staff
AT&T Chief Security Office (CSO)

"This e-mail and any files transmitted with it are AT&T property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited."
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: suggestions for erlang drawing toolkit?

Richard Carlsson-3
In reply to this post by Garry Hodgson-2
On 08/08/2011 09:45 PM, Garry Hodgson wrote:
> for some visualization work i'm doing i need to be able to generate
> images from basic line/ellipse/text kind of primitives. we've been
> using PIL (Python Imaging Library) for this, but it'd be nicer to do
> this in just erlang. ideally i'd like to be able to generate PNG and
> SVG output.

If one of the formats you want is SVG, you presumably don't wan't to
generate a raster image as the master output. So why not generate SVG
directly? Using xmerl and the "simple" xml representation, the following
example:

   <rect width="300" height="100"
style="fill:rgb(0,0,255);stroke-width:1;
stroke:rgb(0,0,0)"/>

becomes:

  [{rect, [{width,"300"},{height,"100"},
  {style,"fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"}],
    [],}]

Then export this via xmerl to an XML file "foo.svg",
and if you want a bitmap, run os:cmd("convert foo.svg foo.png")
where 'convert' is the ImageMagick convert command. Just install the
imagemagick package if you don' have it already.

    /Richard
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: suggestions for erlang drawing toolkit?

Torben Hoffmann
In reply to this post by Garry Hodgson-2
Hi Garry,

I have created call graphs and similar for my own code using graphviz.

The dot language is very easy to work with and you can generate SVG using graphviz.

You will have to live with the way graphviz decides to lay out your drawing, but in most cases it is actually okay and you can insert some control commands to guide it if it is not suiting your needs.

Cheers,
Torben

On Mon, Aug 8, 2011 at 21:45, Garry Hodgson <[hidden email]> wrote:
for some visualization work i'm doing i need to be able to generate
images from basic line/ellipse/text kind of primitives.  we've been
using PIL (Python Imaging Library) for this, but it'd be nicer to do
this in just erlang.  ideally i'd like to be able to generate PNG and
SVG output.

does anyone have any suggestions?

thanks


--
Garry Hodgson
Lead Member of Technical Staff
AT&T Chief Security Office (CSO)

"This e-mail and any files transmitted with it are AT&T property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited."
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



--
http://www.linkedin.com/in/torbenhoffmann

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: suggestions for erlang drawing toolkit?

Robert Virding-2
If you want some example code for generating DOT files look towards the end of leex.erl (scanner generator), out_dfa_graph/3, where there is some code to generate a DOT file showing the internal DFA as a graph. It is only a limited example but gives you some indication how it is done.

Robert


Hi Garry,

I have created call graphs and similar for my own code using graphviz.

The dot language is very easy to work with and you can generate SVG using graphviz.

You will have to live with the way graphviz decides to lay out your drawing, but in most cases it is actually okay and you can insert some control commands to guide it if it is not suiting your needs.

Cheers,
Torben

On Mon, Aug 8, 2011 at 21:45, Garry Hodgson <[hidden email]> wrote:
for some visualization work i'm doing i need to be able to generate
images from basic line/ellipse/text kind of primitives.  we've been
using PIL (Python Imaging Library) for this, but it'd be nicer to do
this in just erlang.  ideally i'd like to be able to generate PNG and
SVG output.

does anyone have any suggestions?

thanks


--
Garry Hodgson
Lead Member of Technical Staff
AT&T Chief Security Office (CSO)

"This e-mail and any files transmitted with it are AT&T property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited."
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



--
http://www.linkedin.com/in/torbenhoffmann

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions