ImageEn, unit imageenview

TImageEnView.CalcSelectionArea

TImageEnView.CalcSelectionArea


Declaration

function CalcSelectionArea(Units: TIEUnits = ieuPixels): double;


Description

Returns the area of current selection.

Note:
Result will be inaccurate for intersected areas
Works with all selection types, including selection masks


Example

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

CalcSelectionCentroid
CalcSelectionLen