ImageEn, unit imageenview

TImageEnView.IsPointInsideSelection

TImageEnView.IsPointInsideSelection


Declaration


function IsPointInsideSelection(x, y: Integer): Boolean;


Description


IsPointInsideSelection returns true if the point specified with x, y is inside the current selection.
If SelectionBase is iesbClientArea (default) all coordinates depend on the zoom and image view (scrolling).


Example


procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  if ImageEnView1.IsPointInsideSelection(X, Y) then
    lblSelection.Caption := format('%d %d is selected', [X, Y])
  else
    lblSelection.Caption := format('%d %d is NOT selected', [X, Y]);
end;