ImageEn, unit iexLayers

TIELayer.LayerRect

TIELayer.LayerRect


Declaration

property LayerRect: TRect;


Description

Returns PosX, PosY, Width and Height as a TRect.


Examples

// Display the area bound by the current layer as an image in a TImageEnMView (assumes it has already been filled with layer views)
procedure TMainForm.ImageEnView1LayerMoveSize(Sender: TObject; layer: Integer;
    event: TIELayerEvent; var PosX, PosY, Width, Height: Double);
var
  r: TRect;
begin
  if ImageEnView1.LayersCurrent > 0 then
  begin
    r := ImageEnView1.CurrentLayer.LayerRect;
    ImageEnMView1.SetImageRect( ImageEnView1.LayersCurrent - 1, ImageEnView1.IEBitmap, r.Left, r.Top, r.Right, r.Bottom);
  end;
end;

// Show Layer 1 completely filling the view
ImageEnView1.VisibleBitmapRect := ImageEnView1.Layers[1].LayerRect;


See Also

PosX
PosY
Width
Height
ClientAreaBox