Y:=30;
R:=TRect.Create(10,30,190,180);
for I:=1 to AddCount do
begin
S:=Uppercase(SL[I]);
if S<>'' then
begin
DrawText(S,R);
Y:=Y+MeasureText(S,R,0).cy;
R.Top:=Y;
end;
end;
Actually you can just use TextOut with a rect parameter. It will automatically handle the wrapping:
// Draw text inside a rectangle of (100,100,200,200) auto-wrapping as necessary
ImageEnView1.Proc.TextOut( Rect(100, 100, 200, 200) , 'TImageEnProc provides image processing and analysis functionality to a TImageEnView, TIEBitmap, TImage or TBitmap component.' );