コード例 #1
0
        public override ITextStrategy Clone()
        {
            TextGlowStrategy p = new TextGlowStrategy();
            if (m_bClrText)
                p.Init(m_clrText, m_clrOutline, m_nThickness);
            else
                p.Init(m_brushText, m_clrOutline, m_nThickness);

            return (ITextStrategy)(p);
        }
コード例 #2
0
        /// <summary>
        /// Generate Text Glow strategy
        /// </summary>
        /// <param name="brushText">is the brush of the text</param>
        /// <param name="clrOutline">is the color of the glow outline</param>
        /// <param name="nThickness">is the thickness of the outline in pixels</param>
        /// <returns>valid ITextStrategy pointer if successful</returns>
        public static ITextStrategy TextGlow(
            System.Drawing.Brush brushText,
            System.Drawing.Color clrOutline,
            int nThickness)
        {
            TextGlowStrategy strat = new TextGlowStrategy();

            strat.Init(brushText, clrOutline, nThickness);

            return(strat);
        }
コード例 #3
0
        public override ITextStrategy Clone()
        {
            TextGlowStrategy p = new TextGlowStrategy();

            if (m_bClrText)
            {
                p.Init(m_clrText, m_clrOutline, m_nThickness);
            }
            else
            {
                p.Init(m_brushText, m_clrOutline, m_nThickness);
            }

            return((ITextStrategy)(p));
        }
コード例 #4
0
ファイル: Canvas.cs プロジェクト: shaovoon/outline-text
        /// <summary>
        /// Generate Text Glow strategy
        /// </summary>
        /// <param name="brushText">is the brush of the text</param>
        /// <param name="clrOutline">is the color of the glow outline</param>
        /// <param name="nThickness">is the thickness of the outline in pixels</param>
        /// <returns>valid ITextStrategy pointer if successful</returns>
        public static ITextStrategy TextGlow(
            System.Drawing.Brush brushText,
            System.Drawing.Color clrOutline,
            int nThickness)
        {
            TextGlowStrategy strat = new TextGlowStrategy();
            strat.Init(brushText, clrOutline, nThickness);

            return strat;
        }
コード例 #5
0
ファイル: OutlineText.cs プロジェクト: shaovoon/outline-text
        public void TextGlow(
            System.Drawing.Brush brushText,
            System.Drawing.Color clrOutline,
            int nThickness)
        {
            TextGlowStrategy pStrat = new TextGlowStrategy();
            pStrat.Init(brushText, clrOutline, nThickness);

            m_pTextStrategy = pStrat;
        }