ImageEn, unit imageenview

TImageEnView.Layers

TImageEnView.Layers


Declaration

property Layers[idx: Integer]: TIELayer;


Description

The Layers property provides access to properties related to a specified layer.



Debugging Visualizer

You can view the layers of a TImageEnView while debugging by hovering over the object and clicking the Inspect button:



Example

// Set the opacity of the first layer to 0.5 (50%)
ImageEnView.Layers[0].Opacity := 0.5;
ImageEnView.Update();

// Set the transparency of the first layer to 50
ImageEnView.Layers[0].Transparency := 50;
ImageEnView.Update();

// Hide layer 1
ImageEnView.Layers[1].Visible := False;
ImageEnView.Update();

// Create a magnify layer
idx := ImageEnView.LayersAdd();
with ImageEnView.Layers[idx] do
begin
  Magnify.Enabled := true;
  Magnify.Rate := 2;  // x2 magnification
  Width := 50;
  Height := 50;
end;