delphi Image处理
2021-04-30 12:29
标签:ext map final gcc round from poi width 图片 procedure ImageDrawText(ATextEdo: IGGCCADTextEDO); delphi Image处理 标签:ext map final gcc round from poi width 图片 原文地址:http://www.cnblogs.com/zhangzhifeng/p/7805463.html
var
oImageBitmap: TBitmap;
x1,x2,y1,y2: double;
begin
// 加载图片
oImageBitmap := TBitmap.Create;
try
oImageBitmap.LoadFromFile(FImageDeviceFile);
x1 := FImageDeviceBox.StartPt.X;
y1 := FImageDeviceBox.StartPt.Y;
x2 := ATextEdo.MarkPoint.X;
y2 := ATextEdo.MarkPoint.Y;
oImageBitmap.Width := oImageBitmap.Width + Round(ATextEdo.Width/FScale_X);
oImageBitmap.Height := oImageBitmap.Height + Round(ATextEdo.Height/FScale_Y);
oImageBitmap.Canvas.TextOut(Round(ATextEdo.Width/FScale_X), Round(ATextEdo.Height/FScale_Y), ATextEdo.Text);
oImageBitmap.SaveToFile(FImageDeviceFile);
finally
oImageBitmap.Free;
end;
end;
下一篇:java文件下载