There are several different ways:
You can use SelObjects, GetObjFromID, GetObjFromIndex and GetObjFromName.
// Sets pen color to clRed for all selected objects.
for i:=0 to ImageEnVect1.SelObjectsCount-1 do
ImageEnVect1.ObjPenColor[ ImageEnVect1.SelObjects[i] ] := clGreen;
// changes to red pen color for each object
for i := 0 to ImageEnVect1.ObjectsCount - 1 do
begin
hobj := ImageEnVect1.GetObjFromIndex( i );
ImageEnVect1.ObjPenColor[ hobj ] := clRed;
end;
// set pen color to clRed for the first object that has ObjName[]='Jack'
var
hobj:integer;
begin
...
hobj:=ImageEnVect1.GetObjFromName('Jack');
ImageEnVect1.ObjPenColor[hobj]:=clRed;
..
end;
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom Commercial ImageEn Development