Smrf.NodeXL.Visualization.Wpf.GroupDrawer.DrawCombinedIntergroupEdge C# (CSharp) Method

DrawCombinedIntergroupEdge() protected method

protected DrawCombinedIntergroupEdge ( System.Windows.Media.DrawingContext oDrawingContext, GraphDrawingContext oGraphDrawingContext, IntergroupEdgeInfo oCombinedIntergroupEdge, GroupLayoutDrawingInfo oGroupLayoutDrawingInfo ) : void
oDrawingContext System.Windows.Media.DrawingContext
oGraphDrawingContext GraphDrawingContext
oCombinedIntergroupEdge Smrf.NodeXL.Core.IntergroupEdgeInfo
oGroupLayoutDrawingInfo Smrf.NodeXL.Layouts.GroupLayoutDrawingInfo
return void
    DrawCombinedIntergroupEdge
    (
        DrawingContext oDrawingContext,
        GraphDrawingContext oGraphDrawingContext,
        IntergroupEdgeInfo oCombinedIntergroupEdge,
        GroupLayoutDrawingInfo oGroupLayoutDrawingInfo
    )
    {
        Debug.Assert(oDrawingContext != null);
        Debug.Assert(oGraphDrawingContext != null);
        Debug.Assert(oCombinedIntergroupEdge != null);
        Debug.Assert(oGroupLayoutDrawingInfo != null);
        AssertValid();

        Rect oGroupRectangle1, oGroupRectangle2;

        if (
            !TryGetGroupRectangle(

                oGroupLayoutDrawingInfo.GroupsToDraw[
                    oCombinedIntergroupEdge.Group1Index],

                out oGroupRectangle1)
            ||
            !TryGetGroupRectangle(

                oGroupLayoutDrawingInfo.GroupsToDraw[
                    oCombinedIntergroupEdge.Group2Index],

                out oGroupRectangle2)
            )
        {
            return;
        }

        Point oGroupRectangle1Center =
            WpfGraphicsUtil.GetRectCenter(oGroupRectangle1);

        Point oGroupRectangle2Center =
            WpfGraphicsUtil.GetRectCenter(oGroupRectangle2);

        Point oBezierControlPoint = GetBezierControlPoint(oGraphDrawingContext,
            oGroupRectangle1Center, oGroupRectangle2Center,
            CombinedIntergroupEdgeBezierDisplacementFactor
            );

        PathGeometry oBezierCurve =
            WpfPathGeometryUtil.GetQuadraticBezierCurve(oGroupRectangle1Center,
                oGroupRectangle2Center, oBezierControlPoint);

        Color oColor = GetContrastingColor(
            oGraphDrawingContext, CombinedIntergroupEdgeAlpha, true);

        Pen oPen = CreateFrozenPen(CreateFrozenSolidColorBrush(oColor),

            GetCombinedIntergroupEdgePenWidth(oCombinedIntergroupEdge) *
                this.GraphScale,

            DashStyles.Solid, PenLineCap.Round);

        oDrawingContext.DrawGeometry(null, oPen, oBezierCurve);
    }