GraphStream Users

Archives de la liste Aide

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

Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT>
  • To: graphstream-users AT, Ged Robinson <robinson.ged AT>
  • Subject: Re: Layouts & Renderers, Gu to Px & vice-versa
  • Date: Wed, 20 May 2015 14:13:36 +0000

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