ImageEn, unit iexLayers

TIELayer.Assign

TIELayer.Assign


Declaration

procedure Assign(Source: TIELayer);


Description

Copy the content of a layer to the current one.


Examples

// Clone layer 0
iLayer := ImageEnView2.LayersAdd( ImageEnView1.Layers[ 0 ].Kind );
ImageEnView2.Layers[ iLayer ].Assign( ImageEnView1.Layers[ 0 ] );

// Assign layers from one ImageEnView to another (but not background image)
// Note: ImageEnView2.assign( ImageEnView1 ) will assign all content including layers
for I := 1 to ImageEnView1.LayersCount - 1 do
begin
  // Append layer of same time
  iLayer := ImageEnView2.LayersAdd( ImageEnView1.Layers[ i ].Kind );

  // Assign all properties
  ImageEnView2.Layers[ iLayer ].Assign( ImageEnView1.Layers[ i ] );
end;
ImageEnView2.Update();