GetLabelPadding
(
Double dLabelFontSize
)
{
Debug.Assert(dLabelFontSize >= 0);
AssertValid();
// Make the padding larger for smaller fonts than for larger fonts.
// These linear-interpolation points were selected to satisfy some
// padding specifications in a NodeXL design document.
const Double FontSizeA = 14.0;
const Double FontSizeB = 39.4;
const Double LabelPaddingA = 3.0;
const Double LabelPaddingB = 5.0;
Double dLabelPadding =
LabelPaddingA + (dLabelFontSize - FontSizeA) *
(LabelPaddingB - LabelPaddingA) / (FontSizeB - FontSizeA);
dLabelPadding = Math.Max(0, dLabelPadding);
return (dLabelPadding * m_dGraphScale);
}