GraphStream Users

Archives de la liste Aide


Re: Setting node positions from C++ -- how to pass two values?


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: graphstream-users AT litislab.fr, Szabolcs Horvat <szhorvat AT nd.edu>
  • Subject: Re: Setting node positions from C++ -- how to pass two values?
  • Date: Mon, 24 Jun 2013 16:41:41 +0200

Hi Szabolcs,

You can pass two float values for an attribute using a vector<float> and giving this vector as the attribute value.

Regards.

Guilhelm


2013/6/24 Szabolcs Horvat <szhorvat AT nd.edu>
Hello,

How can I set node positions ("xy" attribute) using NetStream (C++ API)?

According to the docs [1], I have to "pass two float values".  As far as I can tell, the C++ API allows only for passing a single value.  Is it possible to still set "xy" or "xyz" from C++?  If yes, how does the .addNodeAttribute() member function expect me to package the two (three) values together?

Szabolcs

[1] http://graphstream-project.org/doc/FAQ/Attributes/Is-there-a-list-of-attributes-with-a-predefined-meaning-for-the-graph-viewer_1.0/



--
Guilhelm Savin
PhD Student of Computer Science



Archives gérées par MHonArc 2.6.16.

Top of page