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
 How to make the layer (text) not zoom in or out with the image and always be top
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Flashcqxg

96 Posts

Posted - Aug 14 2023 :  21:49:34  Show Profile  Reply
I would like to place a layer of text type on the imageenview, which requires:
1. This layer is always at the top level.
2. Regardless of whether the image is loaded or not, the size of this layer and the size of the text are not affected by zooming in or out.
thanks.

xequte

38613 Posts

Posted - Aug 16 2023 :  19:02:12  Show Profile  Reply
Hi

1. Monitor the ImageChange event and ensure the layer has the top-most index:

http://www.imageen.com/help/TIELayer.LayerIndex.html

2. You can use ScaleLocking to prevent any effect of zooming:

http://www.imageen.com/help/TIELayer.ScaleLocking.html

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

Flashcqxg

96 Posts

Posted - Aug 16 2023 :  19:43:04  Show Profile  Reply
thanks.
I want to Set the text to always be in this place, Regardless of whether the image is loaded or not.

Go to Top of Page

foxdingding

77 Posts

Posted - Aug 16 2023 :  20:56:58  Show Profile  Reply
I suggest you use TLabel or TPanel
Go to Top of Page

Flashcqxg

96 Posts

Posted - Aug 16 2023 :  21:00:04  Show Profile  Reply
thank you.
But cannot set TLabel or TPanel to transparent.
Go to Top of Page

xequte

38613 Posts

Posted - Aug 16 2023 :  21:01:09  Show Profile  Reply
Or you can use the TImageEnView draw events to always put text in a specific position:

http://www.imageen.com/help/TImageEnView.OnDrawBackBuffer.html

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

Flashcqxg

96 Posts

Posted - Aug 17 2023 :  00:09:28  Show Profile  Reply
thanks.
Go to Top of Page

foxdingding

77 Posts

Posted - Aug 17 2023 :  20:22:36  Show Profile  Reply
In Win10:

SetLayeredWindowAttributes (Panel.Handle,
RGB($FF, $FF, $FF),
bAlpha, 1 or 2);
Go to Top of Page

Flashcqxg

96 Posts

Posted - Aug 17 2023 :  20:32:30  Show Profile  Reply
foxdingding,thank you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: