GAPI provides algorithms to draw graphs with polygonal edges. If you want to construct a polyline drawing of a graph with GAPI, simply do the following:

Observe that if you have strict aesthetics requirements, you can replace
   draw_undi_graph dug(pug, POLYLINE);
   draw_undi_graph dug(pug, POLYLINE_COMPACTED);
in order to reduce the total edge-length of the drawing.

Note: the current version of GDT allows to apply option POLYLINE only to graphs that are biconnected. A graph is biconnected if the removal of one node is not sufficient to cut it into two (or more) disconnected pieces.

Examples of polyline representations drawn with GAPI are shown in the following figure:



Last update : July 31, 2002
Website design by INTEGRA Sistemi,