#include <LEDA/graphics/graphwin.h>
using namespace leda;
int main()
{
GraphWin gw;
//individual node attributes
node u=gw.new_node(point(100,100));
gw.set_shape(u,circle_node);
node v=gw.new_node(point(200,200));
gw.set_shape(v,rhombus_node);
//individual edge attributes
edge e=gw.new_edge(u,v);
gw.set_width(e,2);
gw.set_color(e,brown);
//default node attributes
bool apply=false;
gw.set_node_shape(rectangle_node,apply);
gw.set_node_color(pink,apply);
//default edge attributes
gw.set_edge_width(5,apply);
gw.set_edge_color(green,apply);
gw.set_edge_direction(redirected_edge,apply);
//global parameters
gw.set_bg_color(yellow);
gw.display();
gw.edit();
gw.get_window().screenshot("gw_param_ops");
return 0;
}
|