ImageEn, unit iexLayerMView

TImageEnLayerMView.IndexToLayer

TImageEnLayerMView.IndexToLayer


Declaration

function IndexToLayer(idx: Integer) : integer;


Description

Returns the index of the layer in the associated TImageEnView for an item in this control.
Invalid indexes return -1.

See also: LayerToIndex


Example

procedure Tfmain.IELayerMView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
  idx, lyr: Integer;
begin
  idx := IELayerMView1.ImageAtPos( X, Y );
  lyr := IELayerMView1.IndexToLayer( idx );
  Caption := Format( 'Layer %d is under the cursor', [ lyr ]);
end;