protected int GetTopLevelTopPaddingPx(Graphics oGraphics)
        {
            this.AssertValid();
            Debug.Assert(oGraphics != null);
            int result;

            switch (this.m_eTextLocation)
            {
            case TextLocation.CenterCenter:
            {
                result = this.m_iPaddingPx;
                break;
            }

            case TextLocation.Top:
            {
                result = TopTextDrawer.GetTextHeight(oGraphics, this.m_sFontFamily, this.m_fFontMinSizePt, this.GetTopMinimumTextHeight());
                break;
            }

            default:
            {
                Debug.Assert(false);
                result = -1;
                break;
            }
            }
            return(result);
        }
        protected ITextDrawer CreateTextDrawer()
        {
            this.AssertValid();
            ITextDrawer result;

            switch (this.m_eTextLocation)
            {
            case TextLocation.CenterCenter:
            {
                result = new CenterCenterTextDrawer(this.m_iNodeLevelsWithText, this.m_iMinNodeLevelWithText, this.m_iMaxNodeLevelWithText, this.m_sFontFamily, this.m_fFontMinSizePt, this.m_fFontMaxSizePt, this.m_fFontIncrementPt, this.m_oFontSolidColor, this.m_iFontMinAlpha, this.m_iFontMaxAlpha, this.m_iFontAlphaIncrementPerLevel, this.m_oSelectedFontColor);
                break;
            }

            case TextLocation.Top:
            {
                result = new TopTextDrawer(this.m_iNodeLevelsWithText, this.m_iMinNodeLevelWithText, this.m_iMaxNodeLevelWithText, this.m_sFontFamily, this.m_fFontMinSizePt, this.GetTopMinimumTextHeight(), this.m_oFontSolidColor, this.m_oSelectedFontColor, this.m_oSelectedBackColor);
                break;
            }

            default:
            {
                Debug.Assert(false);
                result = null;
                break;
            }
            }
            return(result);
        }