ImageEn, unit iexLayers

TIELayer.PosX

TIELayer.PosX


Declaration

property PosX: Integer;


Description

Specifies the horizontal position of the layer relative to the background image (layer 0).
PosXD provides a double version of PosX if you need more accuracy.

These consts are also supported:
Const Description
IELayer_Pos_Left Adjust PosX so layer is aligned to the left of the background layer
IELayer_Pos_HCenter Adjust PosX so layer is aligned to the horizontal center of the background layer
IELayer_Pos_Right Adjust PosX so layer is aligned to the right of the background layer


Example

// Apply a "Paid" stamp to image
with ImageEnView1 do
begin
  LayersAdd( 'PAID', 42, clRed, 'Arial Black', [fsBold] );
  CurrentLayer.Rotate := 30;
  TIETextLayer( CurrentLayer ).SizeToText();
  CurrentLayer.PosX := IELayer_Pos_HCenter;
  CurrentLayer.PosY := IELayer_Pos_VCenter;
  LayersMergeAll();
end;


See Also

- PosY
- Width
- Height
- LayerRect
- ClientAreaBox
- LayersRepositionAll