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 display different images with the same scale and position in TImageEnView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Flashcqxg

100 Posts

Posted - Jan 03 2025 :  21:11:28  Show Profile  Reply
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?

xequte

38705 Posts

Posted - Jan 04 2025 :  01:31:00  Show Profile  Reply
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
Go to Top of Page

Flashcqxg

100 Posts

Posted - Jan 04 2025 :  05:48:59  Show Profile  Reply
Thank you. I want to know how to freely move images by dragging them with the mouse in TImageEnView?
Go to Top of Page

xequte

38705 Posts

Posted - Jan 04 2025 :  20:30:00  Show Profile  Reply
Hi

Ensure miScroll is specified for MouseInteractGeneral:

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

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

Flashcqxg

100 Posts

Posted - Jan 04 2025 :  20:37:53  Show Profile  Reply
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?
Go to Top of Page

Flashcqxg

100 Posts

Posted - Jan 04 2025 :  20:43:07  Show Profile  Reply
What I mean is, I want to press the left mouse button and drag the image to any position
Go to Top of Page

xequte

38705 Posts

Posted - Jan 05 2025 :  15:09:00  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: