- From: "Jacob M. H. Smith" <jacob.m.h.smith AT gmail.com>
- To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>
- Subject: Stylesheet Only Works Partially After Clear
- Date: Wed, 25 Sep 2013 19:26:59 +0200
Hello.
First of all, I want to say that I've been playing around with GraphStream
for a bit now and I very much like it. Keep up the great work. I'm also very
grateful for the help I have received on this mailing list.
As for my question, I have noticed that calling the clear() method on a graph
renders certain parts of the stylesheet I assign to it afterwards ineffective.
Here's an example. The background color of the graph is only set correctly if
I comment out the line that clears the graph. Strangely, the color of the
nodes does not seem to be affected. What am I missing here?
/* ======================================================== */
Graph graph = new SingleGraph("graph");
graph.display();
graph.clear(); // comment out to make the background red
graph.addAttribute("ui.quality");
graph.addAttribute("ui.antialias");
graph.addAttribute("ui.stylesheet",
"graph { fill-color: red; } node { fill-color: green; }");
Generator gen = new BarabasiAlbertGenerator();
gen.addSink(graph);
gen.begin();
for (int i = 0; i < 100; i++) {
gen.nextEvents();
}
gen.end();
/* ======================================================== */
Thank you.
Best regards,
Jacob
- Stylesheet Only Works Partially After Clear, Jacob M. H. Smith, 25/09/2013
Archives gérées par MHonArc 2.6.16.