DrawStraightEdge
(
IEdge oEdge,
GraphDrawingContext oGraphDrawingContext,
DrawingContext oDrawingContext,
Point oEdgeEndpoint1,
Point oEdgeEndpoint2,
Boolean bDrawAsSelected,
Boolean bDrawArrow,
Pen oPen,
Color oColor,
Double dWidth,
VisibilityKeyValue eVisibility,
String sLabel
)
{
Debug.Assert(oEdge != null);
Debug.Assert(oGraphDrawingContext != null);
Debug.Assert(oDrawingContext != null);
Debug.Assert(oPen != null);
AssertValid();
if (bDrawArrow)
{
// Draw the arrow and set the second endpoint to the center of the
// flat end of the arrow.
Double dArrowAngle = WpfGraphicsUtil.GetAngleBetweenPointsRadians(
oEdgeEndpoint1, oEdgeEndpoint2);
oEdgeEndpoint2 = DrawArrow(oDrawingContext, oEdgeEndpoint2,
dArrowAngle, oColor, dWidth);
}
oDrawingContext.DrawLine(oPen, oEdgeEndpoint1, oEdgeEndpoint2);
if ( !String.IsNullOrEmpty(sLabel) )
{
DrawLabel(oEdge, oDrawingContext, oGraphDrawingContext,
bDrawAsSelected, oColor, eVisibility, oEdgeEndpoint1,
oEdgeEndpoint2, null, new Point(), sLabel);
}
}