GraphStream Users

Archives de la liste Aide

Re: Layouts & Renderers, Gu to Px & vice-versa

Chronologique Discussions 
  • From: Ged Robinson <robinson.ged AT>
  • To: guilhelm savin <guilhelm.savin AT>
  • Cc: graphstream-users AT
  • Subject: Re: Layouts & Renderers, Gu to Px & vice-versa
  • Date: Thu, 21 May 2015 07:39:44 +0300

Got it!

Works beautifully.

Thanks very much for your quick help.



On Wed, May 20, 2015 at 5:13 PM, guilhelm savin <guilhelm.savin AT> wrote:

Le mer. 20 mai 2015 à 15:14, Ged Robinson <robinson.ged AT> a écrit :

Great library.  I love it.

I've come a long way since starting to use Graphstream and it's really doing useful things for me.

I am extending SpringBox layout.
My subclass of SpringBox overrides particleMoved method and 'remembers' a trail for specific nodes, identified by their id.
It also implements LayerRenderer in and I then can setForeLayoutRenderer on the view, with the custom layout object.
The idea is to leave a trail of n points behind a given node as it moves around the graph.

I'm having difficulty with something I thought would be very simple.
How can I reliably convert the graph units from particleMoved (I'm assuming they are graph units in there, right?) to pixels coordinates in my render method?
The view has a camera controller associated with it and can be zoomed & panned by the user at any time.
I thought this would be easy, but I'm not finding it so.

Any help would be greatly appreciated.  



Archives gérées par MHonArc 2.6.16.

Top of page