问题
I have problem drawing text transparent from left and right like this example: Image1:
What i have done so far:
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);
Result: Image2:
How can i fix this?
来源:https://stackoverflow.com/questions/28124914/delphi-gdi-drawstring-transparent-from-left-and-right