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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Text Layer Rotation
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

935 Posts

Posted - Dec 05 2022 :  13:30:00  Show Profile  Reply
I create a Text Layer with this code:

ImageEnView1.LayersAdd(DateTimeToStr(Now), Self.Font.Size, Self.Font.Color, Self.Font.Name);
TIETextLayer(ImageEnView1.CurrentLayer).SizeToText();




However, when I try to ROTATE the Text Layer with the Rotation Grip, I get this:



So how can I rotate the LAYER instead of the text content with the Rotation Grip?

xequte

38715 Posts

Posted - Dec 05 2022 :  14:10:05  Show Profile  Reply
Hi Peter

For all non-image layers, only the content is rotated.

If you set:
TIETextLayer(ImageEnView1.CurrentLayer).AutoSize := True;


Then you will get a better result when rotating.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

935 Posts

Posted - Dec 05 2022 :  14:43:59  Show Profile  Reply
Hi Nigel

Thanks for the valuable hint.

Alternatively, how can I hide the Rotation Grip only for this Layer - without having to generally exclude loShowRotationGrip from LayerOptions?
Go to Top of Page

xequte

38715 Posts

Posted - Dec 05 2022 :  21:47:20  Show Profile  Reply
Hi Peter

I'm afraid there is not an option for that. You might be able to toggle loShowRotationGrip on layer change.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

935 Posts

Posted - Dec 06 2022 :  13:03:22  Show Profile  Reply
Hi Nigel,

Wouldn't it be helpful implementing the properties ShowLayerRotationGrip: Boolean and ShowLayerResizeHandles: Boolean as inherent TIELayer Read/Write class properties?
Go to Top of Page

xequte

38715 Posts

Posted - Dec 06 2022 :  14:50:02  Show Profile  Reply
Hi Peter

Each layer's grips will be hidden if TIELayer.Locked is enabled for that layer. At this time there is not a way to disable per layer rotation. We will consider that for a future version.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

935 Posts

Posted - Dec 06 2022 :  15:27:44  Show Profile  Reply
Hi Nigel

If TIELayer.Locked is enabled for that layer the Layer cannot be moved or show its border, as the Documentation says. But what if the user needs to move the layer while not being able to resize or rotate the Layer?
Go to Top of Page

xequte

38715 Posts

Posted - Dec 07 2022 :  14:09:58  Show Profile  Reply
Hi

On layer selection you should toggle the MouseInteractionLayers values of miMoveLayers, miResizeLayers and/or miRotateLayers

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: