GraphStream Users

Archives de la liste Aide


stylesheet


Chronologique Discussions 
  • From: jperr <julienperr AT yahoo.fr>
  • To: graphstream-users AT litislab.fr
  • Subject: stylesheet
  • Date: Wed, 31 Jul 2013 22:48:15 +0200 (CEST)

Hi,

I have not the same display for the same stylesheet set on a FileSinkImage or
set on a Graph. I use System.setProperty("gs.ui.renderer",
"org.graphstream.ui.j2dviewer.J2DGraphRenderer");

Here my stylesheet :
graph {
fill-mode:gradient-diagonal1;
fill-color:rgb(108,121,151), rgb(231, 233, 237);
}
node {
fill-mode:dyn-plain;
fill-color:dark blue, darkred;
text-mode:hidden;
shape:circle;
}
node.neg {
shape:box;
}
node.freq {
shape:diamond;
}
node.fin {
shape:cross;
}
edge {
fill-mode:plain;
fill-color:blue, red;
text-mode:hidden;
arrow-shape:arrow;
}


1st Exemple (working fine) :
m_Graph = new SingleGraph("test");
m_Graph.addAttribute("ui.quality");
m_Graph.addAttribute("ui.antialias");
m_Graph.addAttribute("ui.stylesheet","url('file:///Users/jp/Desktop/stylesheet')");
m_Graph.setStrict(false);
[...Fill the graph...]
m_Graph.Display();

2nd Exemple (not working fine with all stylesheet features) :
OutputPolicy outputPolicy = OutputPolicy.BY_STEP;
String prefix = "prefix_";
OutputType type = OutputType.PNG;
Resolution resolution = Resolutions.HD720;
FileSinkImages fsi = new FileSinkImages(prefix, type, resolution, outputPolicy
);
fsi.setQuality(Quality.HIGH);
fsi.setStyleSheet("url('file:///Users/jp/Desktop/stylesheet')");
fsi.setLayoutPolicy(LayoutPolicy.COMPUTED_FULLY_AT_NEW_IMAGE);
[...Fill and some updates of the graph...]


Actual (with same fill/updates graph functions) :
In the first exemple i have the diag-gradient, i have the dynamic colors and i
have the different shapes of nodes (but i don't have arrows on edges...).

In the second exemple i don't have any gradient but only the first color of
the
gradient settings for the background, i have dynamic colors ok, i have only
circle shapes for nodes, and still not any arrows for edges.

What to do to have my FileSinkImage working fine with my stylesheet ?

Thanks for your help.



Archives gérées par MHonArc 2.6.16.

Top of page