Hi Jose
You can use ImageEnVect.GetObjRect. For objects such as lines, the Rect.Top/Left may exceed Rect.Bottom/Right to indicate the direction of line drawing.
Example
var
r: TRect;
hobj: Integer;
sXDir, sYDir: string;
begin
if ImageEnVect1.SelObjectsCount > 0 then
begin
hobj := ImageEnVect1.SelObjects[ 0 ];
if ImageEnVect1.ObjKind[ hObj ] <> iekLINE then
Caption := 'Not a line'
else
begin
ImageEnVect1.GetObjRect( hobj, r );
if r.Top > r.Bottom then
sYDir := 'Bottom-'
else
sYDir := 'Top-';
if r.Left > r.Right then
sXDir := 'Right'
else
sXDir := 'Left';
Caption := 'Line starts at ' + sYDir + sXDir;
end;
end;
end;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com