AnnTextAlign example for Delphi
Procedure TForm1.ExampleAnnTextAlign ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
nAlign: L_INT32;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);
if (nObjectType <> ANNOBJECT_TEXT) Then
begin
ShowMessage( 'This object is not a Text Object');
end;
nAlign:= LEADAnn1.AnnTextAlign[hObject];
if (nAlign = TEXTALIGN_CENTER ) Then
begin
nAlign:= TEXTALIGN_LEFT;
end
else
begin
nAlign:= TEXTALIGN_CENTER;
end;
LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnTextAlign[hObject]:= nAlign;
end;