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 click and drag to move image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

serverinfo

Brazil
9 Posts

Posted - May 27 2019 :  16:21:38  Show Profile  Reply
I have a app that at some point, show an image at full screen. The image is smaller than the full screen. I need to provide to the user the ability to touch and drag this image to any point of the screen (a simple click and drag).

The reason for this is that the aplication is a Smart Mirror app and the background is a mirror that reflects the user and the image is the clothing that the user is trying in the fitting room. so he needs to pinch and zoom as well as drag the image to position is so his reflection is aligned with the image. the zoom and pan i got to work ok, but the image drag i dont know how to do.

Any idea ?

Thank You.

xequte

38222 Posts

Posted - May 28 2019 :  00:42:52  Show Profile  Reply
Hi

Sorry, in what way does this require differ from the panning gesture?


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

serverinfo

Brazil
9 Posts

Posted - May 28 2019 :  07:43:12  Show Profile  Reply
I do not know if the panning gesture move the image when is not zoomed, tryed here (do not have touch screen to test) and did nothing with the mouse (i need it to work with touchscreen as well as with the mouse)

What i need is not just scrolling the zoomed image, i need to move the image to a differente position inside the view (any position the user whats to release it ). So i think what i need is not just panning or scrolling, is Moving the image to a different position.

What i need is the same feature as a selected a layer that you click and move around, but i need to do it with a simple png loaded inside the view. I thought about loading the image as a layer and use the layer move interaction but did not found any way to hide the selection rectangle (i just need the user to click and drag the image without any selection rectangle appearing on the screen)
Go to Top of Page

w2m

USA
1990 Posts

Posted - May 28 2019 :  09:25:21  Show Profile  Reply
This can be achieved by using layers. Each layer can be positioned where needed. You can eliminate drawing the layers border by setting the layers visiblebox property to false. ImageEnView.Layers[iLayer].VisibleBox := False; I tested this here and it seems to achieve what you are looking for. You can use the mouse or touch to move the layer to the correct position.

property VisibleBox: boolean;

Description
Display a selection box around the layer and grips to enable sizing (if Locked is false). If disabled (False), there is no visual indication that a layer is selected.


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: