I am trying to change the node color using the following code but getting Segmentation fault.
I am using the latest OGDF snapshot.
Graph G;
GraphAttributes GA(G, GraphAttributes::nodeGraphics |
GraphAttributes::edgeGraphics );
node left = G.newNode();
GA.strokeColor (left) = Color("red");
The attribute
GraphAttributes::nodeGraphicsonly enables coordinates and shapes of the node but not its color. For the stroke and fill styling, you need to enableGraphAttributes::nodeStylein the constructor:For a mapping of attributes you can use and the enum values you need to enable in the constructor (or later), see the documentation of the enumeration.