如何在bmp图片上叠加文字(40分)

  • 主题发起人 主题发起人 tianzhegs
  • 开始时间 开始时间
T

tianzhegs

Unregistered / Unconfirmed
GUEST, unregistred user!
刚才望给分了,不好意思
 
procedure TForm1.Button2Click(Sender: TObject);
var
b:TBitmap;
begin
b:=TBitmap.Create;
b.width:=100;
b.height:=100;
b.Canvas.brush.Color:=clRed;
b.Canvas.pen.Color:=clRed;
b.Canvas.Rectangle(rect(0,0,100,100));
B.Canvas.Font.COLOR:=$00fFFF;
B.Canvas.Font.Size:=24;
b.Canvas.TextOut(10,10,'AAA');
b.Canvas.brush.style:=bsClear;

B.Canvas.Font.COLOR:=$FF0000;
B.Canvas.Font.Size:=24;
b.Canvas.TextOut(15,10,'AAA');

canvas.Draw (0,0,b);
b.free;
end;
 
Image1.Picture.Bitmap.Canvas.TextOut(10,10,'AAAA');
 
把label放在image上,设label透明
 
我想在edit中写字,然后在图片上叠加,并保存
 
你先放图片,再把EDIT放在图片上,就OK!
 
Image1.Picture.Bitmap.Canvas.TextOut(10,10,Edit1.Text);
Image1.Picture.SaveToFile('C:/aaa.bmp');
 
b.Canvas.TextOut(10,10,'AAA');
////改成 edit1.text
 
接受答案了.
 
后退
顶部