Author |
Topic |
|
yogiyang
India
725 Posts |
Posted - Sep 22 2017 : 00:43:00
|
Hello,
In a multi layer situation I have a need to resize the background (Layer 0) to a new size and resize multiple user selected layers proportionally to a size entered by user without spoiling the arrangement between selected layers.
For example there are three layers - Layer 0, 1 & 2.
Now the user will reduce the size of Layer 0 by entering its size in provided interface. Once the size of Layer 0 set the user will select the Layers 1 & 2 and enter a new size in the provided interface. These Layers 1 & 2 should be first resized to the entered width and height as a group (one single virtual object) and automatically aligned to the center of Layer 0 maintaining the arrangement between Layers 1 & 2.
I have tried to use the functions: - LayersRepositionAll - LayersAlign - LayersSizeAll (this only works with percentage so probably I am not able to use it properly as the users are entering absolute width and height values)
TIA
Yogi Yang |
|
klausdoege
Germany
389 Posts |
Posted - Sep 22 2017 : 12:49:47
|
Hi Yogi, maybe you can use this: // Enlarge all layers vertically and horizontally by 10 pixels ImageEnView.LayersRepositionAll( 10, 10, False, True );
Klaus www.klausdoege.de |
|
|
xequte
38196 Posts |
Posted - Sep 22 2017 : 17:39:39
|
Hi Yogi
For complex movement like this, you should just iterate through the layers setting PosX, PosY, Width and Height.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
yogiyang
India
725 Posts |
Posted - Sep 23 2017 : 02:29:01
|
Klaus & Nigel,
Thanks for your hints.
Actually I was hoping that there was such a function as if a user interactively Resizes multiple selected layers they all get resized properly and also relocated as expected.
TIA
Yogi Yang |
|
|
xequte
38196 Posts |
|
|
Topic |
|