ImageEn, unit iexLayers

TIELayer.WidthD

TIELayer.WidthD


Declaration

property WidthD: Double;


Description

Specifies the layer size (i.e. display width when zoom is 100%).
This is a Double version of Width.


Example

// Make all selected layers 1/3 size
ImageEnView1.LockUpdate;
for i := 0 to ImageEnView1.LayersCount - 1 do
  if ImageEnView1.Layers[ I ].Selected then
  begin
    ImageEnView1.Layers[ I ].WidthD  := ImageEnView1.Layers[ I ].Width / 3;
    ImageEnView1.Layers[ I ].HeightD := ImageEnView1.Layers[ I ].Height / 3;
  end;
ImageEnView1.LayersFixSizes( LYR_SELECTED_LAYERS );
ImageEnView1.UnlockUpdate;

// Set width to 600 while maintaining AR
ar := ImageEnView1.CurrentLayer.WidthD / ImageEnView1.CurrentLayer.HeightD;
ImageEnView1.CurrentLayer.WidthD  := 600;
ImageEnView1.CurrentLayer.HeightD := 600 / ar;
ImageEnView1.Update();

// Set height to 600 while maintaining AR
ar := ImageEnView1.CurrentLayer.WidthD / ImageEnView1.CurrentLayer.HeightD;
ImageEnView1.CurrentLayer.WidthD  := 600 * ar;
ImageEnView1.CurrentLayer.HeightD := 600;
ImageEnView1.Update();


See Also

PosXD
PosYD
HeightD