我有问题从左侧和右侧绘制文本透明,如下例所示: image1的:
到目前为止我做了什么:
var
linGrBrush: TGPLinearGradientBrush;
Text : String;
x, y : Single;
Begin
Graphics.Clear(0);
linGrBrush := TGPLinearGradientBrush.Create(MakePoint(0, 0),
MakePoint(300, 0), MakeColor(0, 0, 0, 0), MakeColor(255, 255, 0, 0));
linGrBrush.SetBlendTriangularShape(0.8);
Text := 'Transparent Text From Left And Right';
x:= 0;
y:= 0;
Graphics.DrawString(Text, Length(Text), Font, MakePoint(x, Y), linGrBrush);
结果: 图像2:
我该如何解决这个问题?