The following code will create a 2x3 set of numbered ellipses:
for I := 1 to 6 do
begin
// Add a text object
ImageEnView1.LayersAdd( 'A' + IntToStr( I ), 14, clBlack, 'Arial', [fsBold]);
txtLayer := TIETextLayer( ImageEnView1.CurrentLayer );
if I mod 2 = 0 then
txtLayer.PosX := 500 // even number
else
txtLayer.PosX := 100; // Odd number;
txtLayer.PosY := ( I + 1 ) div 2 * 300 + 100;
txtLayer.Width := 200;
txtLayer.Height := 200;
txtLayer.BorderColor := clRed;
txtLayer.BorderWidth := 5;
txtLayer.FillColor := clYellow;
txtLayer.BorderShape := iesEllipse;
txtLayer.Alignment := iejCenter;
txtLayer.Layout := ielCenter;
end;
ImageEnView1.Update();
However drawing the text outside the circle (Name* labels in your image) is much harder. You would need to create individual text layers and position them independently.
As a starting point to calculate the PosX and PosY for each label, use the OffsetPoint method in hyieutils.
Nigel
Xequte Software
www.imageen.com