GraphStream Users

Archives de la liste Aide

camera.transformPxToGu(...) not working

Chronologique Discussions 
  • From: Mihai Andries <mihai.andries AT>
  • To: graphstream-users AT
  • Subject: camera.transformPxToGu(...) not working
  • Date: Wed, 15 Jan 2014 18:26:48 +0100 (CET)

Hi everyone,

I am trying to color a polygon located between several nodes of a graph.
The nodes of the graph have fixed coordinates.
I have only the real-world coordinates of the polygon that must be colored.
As the graph is displayed in a different spatial reference system, I have to apply a transformation to the coordinates of the vertices of this polygon.

I am doing it by calling:
Point3 point3 =
camera.getMetrics().viewport[0] + xpoints[0],
        camera.getMetrics().viewport[1] + ypoints[0]

Strangely, this results in an exception (the line with .transformPxToGu(...)), even though the displayedView.getCamera() is not null:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at org.graphstream.ui.swingViewer.util.DefaultCamera.transformPxToGu(

Am I doing something wrong?
Thank you in advance.

Best regards,

Doctorant, Équipe MAIA
Inria Nancy - Grand Est, bâtiment C
615 rue du Jardin Botanique
54600 Villers-lès-Nancy, France
Tél. : +33 (0)3 54 95 85 96

  • camera.transformPxToGu(...) not working, Mihai Andries, 15/01/2014

Archives gérées par MHonArc 2.6.16.

Top of page