ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Rotate and DeSelect Issue ?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
andyhill 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
9   L A T E S T    R E P L I E S    (Newest First)
xequte 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
andyhill 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
andyhill 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
xequte 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 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 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 Posted - Mar 02 2025 : 13:58:25
ALSO ImageEnView.Layers[i].Rotate:= 90; HAS NO EFFECT ???

Andy
andyhill Posted - Mar 02 2025 : 03:33:58
ielkPolyline (closed polygon)

MouseInteractLayers:= [mlMoveLayers]

Andy
xequte 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