ImageEn, unit iexLayerMView |
|
TImageEnLayerMView.OnIncludeLayer
Declaration
property OnIncludeLayer: TIEIncludeLayerEvent;
Description
Occurs whenever the control needs to build the list of layers.
You can set
Include to False, to exclude a layer from view.
Note:
OnIncludeLayer is called frequently. Avoid using code that will slow processing (e.g. file or image operations)
// Exclude masks from view
procedure TMyForm.IELayerMView1IncludeLayer(Sender: TObject; LayerIndex: integer; Layer: TIELayer; var Include: Boolean);
begin
if Layer.IsMask = False then
Include := False;
end;
// Exclude images that have an alpha channel
procedure TMyForm.IELayerMView1IncludeLayer(Sender: TObject; LayerIndex: integer; Layer: TIELayer; var Include: Boolean);
begin
if ( Layer.Kind = ielkImage ) and TIEImageLayer( Layer ).Bitmap.HasAlphaChannel then
Include := False;
end;
// Show only shapes
procedure TMyForm.IELayerMView1IncludeLayer(Sender: TObject; LayerIndex: integer; Layer: TIELayer; var Include: Boolean);
begin
Include := Layer.Kind = ielkShape;
end;