TextWordWrap example for Delphi
This example wraps text inside the rectangle that is specified for the text object.
var
LeadRasterFxd1: LEADRasterFXD;
sRet: Smallint;
begin
LeadRasterFxd1:= CreateComObject (CLASS_LEADRasterFXD) as LEADRasterFXD;
//Text location
LeadRasterFxd1.TextTop:= 10;
LeadRasterFxd1.TextLeft:= 10;
LeadRasterFxd1.TextWidth:= 150;
LeadRasterFxd1.TextHeight:= 150;
//Text alignment and angle
LeadRasterFxd1.TextAlign:= FXD_TEXTALIGN_LEFT_VCENTER;
LeadRasterFxd1.TextAngle:= 0;
//Enable word wrap
LeadRasterFxd1.TextWordWrap:= True;
LeadRasterFxd1.DrawPersistence:= True;
LeadRasterFxd1.DrawText ( LEADRasterView1.Raster, 0, 'LEADTOOLS 14.5 Supports WordWrap when drawing text.', 0);
LEADRasterView1.ForceRepaint (sRet);
end;