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
 How to display different images with the same scale and position in TImageEnView

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
Flashcqxg Posted - Jan 03 2025 : 21:11:28
I use TImageEnView to browse different images. When I zoom out and move the current image position, I want to keep the current zoom ratio and position when loading and browsing the next image. How can I achieve this?
9   L A T E S T    R E P L I E S    (Newest First)
Flashcqxg Posted - Jan 07 2025 : 19:33:50
Thanks.Now it works well.
xequte Posted - Jan 07 2025 : 16:30:32
Sorry, I'm not seeing that.

What version of ImageEn are you using? What other TImageEnView properties are set?

It is also better if you set:
ImageEnView1.Center := False;

To test, I created a new project with a TImageEnView and added this code:

ImageEnView1.IO.LoadFromFile( 'D:\im.jpg' );
ImageEnView1.MouseInteractGeneral := [miScroll];
ImageEnView1.MouseInteractLayers := [mlMoveLayers];
ImageEnView1.Layers[0].Locked := False;
ImageEnView1.Layers[0].Selectable := True;
ImageEnView1.Update();


I was able to drag and move the image as expected.


Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jan 07 2025 : 04:03:22
hi,
it can not be moved.

ImgeEnView.MouseInteractGeneral := [miScroll];
ImgeEnView.MouseInteractLayers := [mlMoveLayers];
ImgeEnView.Layers[0].Locked := False;
ImgeEnView.Layers[0].Selectable := True;
ImgeEnView.Update;





xequte Posted - Jan 05 2025 : 15:09:00
For that you would need to treat the background image as an image layer. Set MouseInteractLayers to mlMoveLayers:

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

You will also need to disable the locking of Layer 0 (the background).

ImageEnView1.Layers[0].Locked := False;
ImageEnView1.Layers[0].Selectable := True;


Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jan 04 2025 : 20:43:07
What I mean is, I want to press the left mouse button and drag the image to any position
Flashcqxg Posted - Jan 04 2025 : 20:37:53
When the screen width and height are both greater than the height and width of the image, can it move freely up, down, left, and right?
xequte Posted - Jan 04 2025 : 20:30:00
Hi

Ensure miScroll is specified for MouseInteractGeneral:

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

Nigel
Xequte Software
www.imageen.com
Flashcqxg Posted - Jan 04 2025 : 05:48:59
Thank you. I want to know how to freely move images by dragging them with the mouse in TImageEnView?
xequte Posted - Jan 04 2025 : 01:31:00
Hi

The zoom value should be maintained when loading a new image (as long as you don't have AutoShrink/AutoStretch turned on).

The position is reset upon loading so you would need to store and set the ViewX/Y:

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

Nigel
Xequte Software
www.imageen.com