delphi xe 之路(18)在图片上写字

procedure TForm1.Button1Click(Sender: TObject);

var
LRect: TRectF;
begin

LRect.Create(0, 0, 500, 200);
myimage.Bitmap.Canvas.Font.Family:='宋体';
myimage.Bitmap.Canvas.Font.Size:=25;
myimage.Bitmap.Canvas.Fill.Color:=claBlack;
myimage.Bitmap.Canvas.FillText(LRect, 'Delphi XE2 by 小新排骨', True, 255, [],TTextAlign.taLeading,TTextAlign.taCenter);
myimage.Bitmap.BitmapChanged;

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
//读取图片
myimage.Bitmap.LoadFromFile('C:\skype.bmp');
end;


上一篇:delphi xe 之路(19)clientdataset的详细介绍01


下一篇:解决Excel数据导入sqlite中的中文乱码问题