X
xishi
Unregistered / Unconfirmed
GUEST, unregistred user!
如何实现在Bitmap(已经load进了背景图)上输入文字,而且文字的背景是透明的,
最后能保存位图?比如:
bitmap1:=TBitmap.Create ;
try
Bitmap1.LoadFromFile('f:/test.bmp');
Canvas.Brush.Bitmap := Bitmap1;
Canvas.FillRect(ClientRect);
finally
Form1.Canvas.Brush.Bitmap := nil;
bitmap1.Canvas.textout(100,100,'爱情');//如何把这几个字的背景设为透明?
bitmap1.SaveToFile('f:/test1.bmp'); //现在的底色是白色,把背景遮住,不好看
Bitmap1.Free;
end;
最后能保存位图?比如:
bitmap1:=TBitmap.Create ;
try
Bitmap1.LoadFromFile('f:/test.bmp');
Canvas.Brush.Bitmap := Bitmap1;
Canvas.FillRect(ClientRect);
finally
Form1.Canvas.Brush.Bitmap := nil;
bitmap1.Canvas.textout(100,100,'爱情');//如何把这几个字的背景设为透明?
bitmap1.SaveToFile('f:/test1.bmp'); //现在的底色是白色,把背景遮住,不好看
Bitmap1.Free;
end;