RebundleIncidentEdgesIfAppropriate
(
IEnumerable<IVertex> oVertices
)
{
Debug.Assert(oVertices != null);
AssertValid();
if (!this.ShouldBundleEdges)
{
return;
}
System.Drawing.Rectangle oLayoutRectangleMinusMargin;
if ( !TryGetLayoutRectangleMinusMargin(
out oLayoutRectangleMinusMargin) )
{
return;
}
// Don't rebundle the same edge twice, because rebundling takes a long
// time.
Dictionary<Int32, IEdge> oUniqueEdges = new Dictionary<Int32, IEdge>();
foreach (IVertex oVertex in oVertices)
{
foreach (IEdge oIncidentEdge in oVertex.IncidentEdges)
{
oUniqueEdges[oIncidentEdge.ID] = oIncidentEdge;
}
}
CreateEdgeBundler().BundleEdges(this.Graph, oUniqueEdges.Values,
oLayoutRectangleMinusMargin);
}