Smrf.NodeXL.Visualization.Wpf.EdgeDrawer.GetLabelTextColor C# (CSharp) Method

GetLabelTextColor() protected method

protected GetLabelTextColor ( IEdge oEdge, System.Boolean bDrawAsSelected, Color oEdgeColor, VisibilityKeyValue eVisibility ) : Color
oEdge IEdge
bDrawAsSelected System.Boolean
oEdgeColor Color
eVisibility VisibilityKeyValue
return Color
    GetLabelTextColor
    (
        IEdge oEdge,
        Boolean bDrawAsSelected,
        Color oEdgeColor,
        VisibilityKeyValue eVisibility
    )
    {
        Debug.Assert(oEdge != null);
        AssertValid();

        Color oLabelTextColor;

        if (bDrawAsSelected)
        {
            // The edge color was calculated using the selected state.

            oLabelTextColor = oEdgeColor;
        }
        else
        {
            oLabelTextColor = GetColor(oEdge, eVisibility,
                ReservedMetadataKeys.PerEdgeLabelTextColor, m_oLabelTextColor,
                false);

            oLabelTextColor = WpfGraphicsUtil.SetWpfColorAlpha(oLabelTextColor,
                oEdgeColor.A);
        }

        return (oLabelTextColor);
    }