C++ 文本效果GDI+;

C++ 文本效果GDI+;,c++,gdi+,gdi,C++,Gdi+,Gdi,我在看书 我希望使用gdi或gdi+实现相同的雾文本效果。我并不关心这篇文章的滚动和其他特性,只关心在文本字符串末尾应用雾效果的能力 // Draws fog effect with help of gradient brush with alpha colors. using (Brush br = new LinearGradientBrush(new Point(0, 0), new Point(0, this.Height), Color.FromArgb

我在看书

我希望使用gdi或gdi+实现相同的雾文本效果。我并不关心这篇文章的滚动和其他特性,只关心在文本字符串末尾应用雾效果的能力

// Draws fog effect with help of gradient brush with alpha colors.
using (Brush br = new LinearGradientBrush(new Point(0, 0), new Point(0, this.Height),
                Color.FromArgb(255, this.BackColor), Color.FromArgb(0, this.BackColor)))
    {
        e.Graphics.FillRectangle(br, this.ClientRectangle);
    }

你到底在追求什么?你已经给出的例子是gdi+

如果要对文本行应用雾效果(渐变)。首先测量文本的边界矩形,然后创建适合此矩形的笔刷并将其应用于文本上方,或者仅使用笔刷绘制文本。如果这是你想要的,那么说吧,我会找出一些代码