ImageEn, unit imageenview |
|
TImageEnView.CalcSelectionLen
Declaration
function CalcSelectionLen(Units: TIEUnits = ieuPixels): double;
Description
Returns the length (perimeter) of current selection.
If the selection is composed of only two points, the line length is returned. If the selection is composed of three or more points, the perimeter is returned.
Note: This method will not work with mask selections
procedure TMDIChild.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
Label1.Caption := 'Area: ' + IntToStr( Round( ImageEnView1.CalcSelectionArea() ));
Label2.Caption := 'Perimeter: ' + IntToStr( Round( ImageEnView1.CalcSelectionLen() ));
Label3.Caption := 'Centroid: ' + IntToStr( ImageEnView1.CalcSelectionCentroid.X ) + ',' + IntToStr( ImageEnView1.CalcSelectionCentroid.Y );
end;
See Also
◼CalcSelectionArea
◼CalcSelectionCentroid