Author |
Topic  |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 01 2025 : 00:46:04
|
I am having issues, please advise where I have gone wrong - Thanks.
ImageEnView.Proc.SaveUndo(ieuLayer);
ImageEnView.LockUpdate;
for i:= 0 to ImageEnView.LayersCount-1 do begin
if ImageEnView.Layers[i].Selected then begin
ImageEnView.Layers[i].Rotate:= 90;
end;
end; // for
ImageEnView.LayersFixRotations(LYR_SELECTED_LAYERS);
ImageEnView.UnlockUpdate;
ImageEnView.Update();
ImageEnView.Deselect();
1) Rotate has no effect ?
2) DeSelect still leaves Layers with Selected Marquee ?
Andy |
|
xequte
    
38875 Posts |
Posted - Mar 01 2025 : 19:16:17
|
Hi Andy
1. What sort of layers are they?
2. What MouseInteractLayers are active? There was an issue where deselect does not disable the layer point editing, but that is resolved in a recent beta. You might also try settings LayersCurrent to 0.
Nigel Xequte Software www.imageen.com
|
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 02 2025 : 03:33:58
|
ielkPolyline (closed polygon)
MouseInteractLayers:= [mlMoveLayers]
Andy |
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 02 2025 : 13:58:25
|
ALSO ImageEnView.Layers[i].Rotate:= 90; HAS NO EFFECT ???
Andy |
 |
|
xequte
    
38875 Posts |
Posted - Mar 02 2025 : 21:11:54
|
Hi Andy Does this code work?
ImageEnView1.Layers[ ImageEnView1.LayersCurrent ].Rotate:= 45;
ImageEnView1.Update();
Are you able to reproduce that in any of demos?
Nigel Xequte Software www.imageen.com
|
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 03 2025 : 12:10:26
|
NO, same, still does not work. I sent you my code earlier, off memory it is the last toolbar button
Andy |
 |
|
xequte
    
38875 Posts |
Posted - Mar 05 2025 : 22:15:27
|
Hi Andy
I added this code to a button in your demo:
ImageEnView.Layers[ ImageEnView.LayersCurrent ].Rotate:= 45; ImageEnView.Update();
It worked fine for me:

Are you using an older version of ImageEn?
Nigel Xequte Software www.imageen.com
|
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 05 2025 : 23:37:50
|
Why has rotation changed polygon size ? The original bounding box has constrained the size of the polygon in the rotation.
I need true rotation eg. example above the original layer w=10/h=20, rotate 90 the layer needs to become w=20/h=10
Andy |
 |
|
andyhill
  
Australia
153 Posts |
Posted - Mar 05 2025 : 23:49:46
|
Also, 45 rotates contents within bounding box distorting the size but 90 fails in my version.
TEST: Create a portrait rectangle polygon say (100, 100), (300, 100), (300, 600), (100, 600) close; Now rotate to landscape 90 Degrees, my version does not work.
Andy |
 |
|
xequte
    
38875 Posts |
Posted - Mar 06 2025 : 16:22:21
|
Hi Andy
Rotating a polyline layer only rotates the points. It does not change the size of the layer. For this reason a rectangle rotated 90 degrees will look the same.
If the aspect ratio should be retained, then should update the width/height based on the amount of rotation (see IECalcRotatedBitmapSize() in hyieutils.pas.
Of course, that will work with simple shapes like rectangles, but fail with others, e.g. a diamond rotated 45 degrees need to get a smaller bounding box, not a larger one.
Nigel Xequte Software www.imageen.com
|
 |
|
|
Topic  |
|