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

简介: <table cellspacing="0" cellpadding="0" id="blogContentTable" style="margin:0px; padding:0px; border-collapse:collapse; border-spacing:0px; color:rgb(68,68,68); font-family:punctuation,微软雅黑,Tohoma;
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;


目录
相关文章
vb百例完成小结
vb百例完成小结
73 0
刘金玉的零基础VB教程072期:贪吃蛇游戏开发第八节 总结 补充从尾部开始变长
刘金玉的零基础VB教程072期:贪吃蛇游戏开发第八节 总结 补充从尾部开始变长