ImageEn 新增图层叠加一个图片

var

  iLayer: Integer;

  vLayer1, vLayer2: TIELayer;

  i: Integer;

begin

  { 添加一个新的层 }

  if OpenPictureDialog2.Execute then

  begin

    if ImageEnView1.LayersCount > 1 then

    begin

      i := 1;

      ImageEnView1.LayersSelectEx(i);

    end

    else

      iLayer := ImageEnView1.LayersAdd;

    vLayer1 := ImageEnView1.layers[0];

    ImageEnView1.IO.LoadFromFilePNG(OpenPictureDialog2.FileName);

    vLayer2 := ImageEnView1.layers[1];

    vLayer2.fPosX := vLayer1.fPosX + (vLayer1.Width - vLayer2.Width) div 2;

    vLayer2.fPosY := vLayer1.fPosY + (vLayer1.Height - vLayer2.Height) div 2;

    ImageEnView1.Update;

  end;


联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678