ImageEn, unit iexLayers

TIELayer.Height

TIELayer.Height


Declaration

property Height: Integer;


Description

Specifies the layer size (i.e. display height when zoom is 100%).
HeightD provides a double version of Height if you need more accuracy.


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 ].Width  := ImageEnView1.Layers[ I ].Width div 3;
    ImageEnView1.Layers[ I ].Height := ImageEnView1.Layers[ I ].Height div 3;
  end;
ImageEnView1.LayersFixSizes( LYR_SELECTED_LAYERS );
ImageEnView1.UnlockUpdate;

// Set width to 600 while maintaining AR
ar := ImageEnView1.CurrentLayer.Width / ImageEnView1.CurrentLayer.Height;
ImageEnView1.CurrentLayer.Width  := 600;
ImageEnView1.CurrentLayer.Height := Round( 600 / ar );
ImageEnView1.Update();

// Set height to 600 while maintaining AR
ar := ImageEnView1.CurrentLayer.Width / ImageEnView1.CurrentLayer.Height;
ImageEnView1.CurrentLayer.Width  := Round( 600 * ar );
ImageEnView1.CurrentLayer.Height := 600;
ImageEnView1.Update();


See Also

- PosX
- PosY
- Width
- LayerRect
- ClientAreaBox
- LayersSizeAll
- SizeToText