Smrf.NodeXL.Visualization.Wpf.CollapsedGroupDrawingManager.DrawPlusSign C# (CSharp) Method

DrawPlusSign() protected method

protected DrawPlusSign ( VertexShape eVertexShape, Color oVertexColor, GraphDrawingContext oGraphDrawingContext, System.Windows.Media.DrawingContext oDrawingContext, Double dGraphScale, VertexLabelDrawer oVertexLabelDrawer, FormattedTextManager oFormattedTextManager, VertexDrawingHistory oVertexDrawingHistory ) : void
eVertexShape VertexShape
oVertexColor Color
oGraphDrawingContext GraphDrawingContext
oDrawingContext System.Windows.Media.DrawingContext
dGraphScale Double
oVertexLabelDrawer VertexLabelDrawer
oFormattedTextManager FormattedTextManager
oVertexDrawingHistory VertexDrawingHistory
return void
    DrawPlusSign
    (
        VertexShape eVertexShape,
        Color oVertexColor,
        GraphDrawingContext oGraphDrawingContext,
        DrawingContext oDrawingContext,
        Double dGraphScale,
        VertexLabelDrawer oVertexLabelDrawer,
        FormattedTextManager oFormattedTextManager,
        VertexDrawingHistory oVertexDrawingHistory
    )
    {
        Debug.Assert(oGraphDrawingContext != null);
        Debug.Assert(oDrawingContext != null);
        Debug.Assert(dGraphScale >= GraphDrawer.MinimumGraphScale);
        Debug.Assert(dGraphScale <= GraphDrawer.MaximumGraphScale);
        Debug.Assert(oVertexLabelDrawer != null);
        Debug.Assert(oFormattedTextManager != null);
        Debug.Assert(oVertexDrawingHistory != null);
        AssertValid();

        Color oFillColor;

        switch (eVertexShape)
        {
            case VertexShape.Circle:
            case VertexShape.Square:
            case VertexShape.Diamond:
            case VertexShape.Triangle:

                // The fill color is the color of the background.  Adjust the
                // fill color for the opacity of the vertex.

                oFillColor = WpfGraphicsUtil.SetWpfColorAlpha(
                    oGraphDrawingContext.BackColor, oVertexColor.A);

                break;

            default:

                oFillColor = oVertexColor;
                break;
        }

        Color oContrastingColor =
            WpfGraphicsUtil.GetContrastingColor(oFillColor);

        // The font size used below was chosen so that it is large enough to be
        // easily readable, but small enough to fit within the smallest
        // collapsed group vertex created by this class.

        oVertexLabelDrawer.DrawLabel(oDrawingContext, oGraphDrawingContext,
            oVertexDrawingHistory, VertexLabelPosition.MiddleCenter,

            oFormattedTextManager.CreateFormattedText("+", oContrastingColor,
                15.0, dGraphScale),

            oContrastingColor, false);
    }