ImageEn, unit imageenview

TImageEnView.LayersRepositionAll

TImageEnView.LayersRepositionAll


Declaration


procedure LayersRepositionAll(MoveX, MoveY: Integer; SelectedOnly: Boolean = False; Sizing: Boolean = False);


Description


Updates PosX and PosY of all layers (or just selected if SelectedOnly = True) to move them to a new position. If Sizing is true then Layer is resized (top-left position does not move).

These consts are also for MoveX:
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


These consts are also MoveY:
Const Description
IELayer_Pos_Top Adjust PosY so layer is aligned to the top of the background layer
IELayer_Pos_VCenter Adjust PosY so layer is aligned to the vertical center of the background layer
IELayer_Pos_Bottom Adjust PosY so layer is aligned to the bottom of the background layer


Note: Use LayersSizeAll to resize layers by percentage


Examples


// Move all layers 50 pixels up and left
ImageEnView1.LayersRepositionAll( -50, -50 );

// Move selected layers 100 pixels down
ImageEnView1.LayersRepositionAll( 0, 100, true );

// Enlarge all layers vertically and horizontally by 10 pixels
ImageEnView.LayersRepositionAll( 10, 10, False, True );

// Center all layers in the middle of the image
ImageEnView1.LayersRepositionAll( IELayer_Pos_HCenter, IELayer_Pos_VCenter );


See Also


- LayersRotateAll
- LayersSizeAll
- LayersAlign