1

创建线性渐变画笔

LinearGradientBrush linGrBrush(
        Point(0, 10),
        Point(200, 10),
        Color(255, 255, 0, 0),   
        Color(255, 0, 0, 255)
);

如何使用此渐变绘制文本?

4

1 回答 1

1
LinearGradientBrush *linGrBrush=new LinearGradientBrush(
        Point(0, 10),
        Point(200, 10),
        Color(255, 255, 0, 0),   
        Color(255, 0, 0, 255));

    Graphics *graphics=new Graphics(hdc);
     PointF drawPoint = PointF(150.0F,150.0F);
     SolidBrush* myBrush = new SolidBrush(Color::Black);
    graphics->DrawString(L"Test text",strlen("Test text"),fn,drawPoint,linGrBrush);
于 2013-11-04T22:48:04.197 回答