AG_GraphEdge * AG_GraphEdgeNew (AG_Graph *graph, AG_GraphVertex *v1, AG_GraphVertex *v2, void *userPtr)
AG_GraphEdge * AG_DirectedGraphEdgeNew (AG_Graph *graph, AG_GraphVertex *v1, AG_GraphVertex *v2, void *userPtr)
AG_GraphEdge * AG_GraphEdgeFind (AG_Graph *graph, void *userPtr)
void AG_GraphEdgeLabel (AG_GraphEdge *edge, const char *format, ...)
void AG_GraphEdgeLabelS (AG_GraphEdge *edge, const char *text)
void AG_GraphEdgeColorLabel (AG_GraphEdge *edge, Uint8 r, Uint8 g, Uint8 b)
void AG_GraphEdgeColor (AG_GraphEdge *edge, Uint8 r, Uint8 g, Uint8 b)
void AG_GraphEdgePopupMenu (AG_GraphEdge *edge, AG_PopupMenu *menu)
|
The
AG_GraphEdgeNew() function creates a new edge connecting vertices
v1 and
v2. If the two vertices are already connected by an edge, the function fails
and returns NULL.
userPtr is an optional user pointer to associated with the edge.
AG_DirectedGraphEdgeNew() identical to AG_GraphEdgeNew, but the edge is marked as being directed.
Directed graph edges are assumed to point "to"
v2. Directed graph edges are displayed with an arrowhead pointing towards
v2 (only on systems with floating point support).
AG_GraphEdgeFind() returns the vertex matching the specified user pointer, or NULL if no
match exists.
The
AG_GraphEdgeLabel() sets the text label to display along the given edge.
AG_GraphEdgeColorLabel() sets the color of the text label.
AG_GraphEdgeColor() sets the color of the line representing the edge.
AG_GraphEdgePopupMenu() arranges for the given popup menu to be displayed when the user right clicks
on the edge.
|