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
 Moving image over the screen problem
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Borut

15 Posts

Posted - Jan 12 2022 :  17:10:22  Show Profile  Reply
Hello,

I would like to move an image over the screen.
If I use Top property of the image and increase the value, I get unsmooth moving of the image (following the changing top value by 1).
If I try with SetViewXYSmooth, I like the smoothness, but the scrolling happens too quickly, (there seems to be no way of controlling the speed of scrolling).
Is there any way I could get relatively slow and smooth moving of the image over the screen?

xequte

38608 Posts

Posted - Jan 12 2022 :  20:58:01  Show Profile  Reply
You can control the speed of SetViewXYSmooth:

https://www.imageen.com/help/TImageEnView.SmoothScrollValue.html

Another possibility is using Pan-Zoom effects. Please see this demo:

Demos\Display\PanZoomEffects\PanZoomEffects.dpr

Exe demo: https://www.imageen.com/files/demos/run/Display/PanZoomEffects/PanZoomEffects.zip



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

Borut

15 Posts

Posted - Jan 13 2022 :  01:09:48  Show Profile  Reply
Thank you. I will try both suggestions and let you know.

Borut
Go to Top of Page

Borut

15 Posts

Posted - Jan 25 2022 :  07:18:20  Show Profile  Reply
Hello,
I tried your suggestions and the zooming worked well.
I used different functions:
1)ImageEnView1->SetZoomSmooth

2)ImageEnView1->PrepareTransition();
ImageEnView1->RunTransition(iettPanZoom,
Rect(),
Rect(),
True);

3)Transitions with prebuild PanZoom effects

Then I tried changing some properties of the image during the "transitions". I used Timer to trigger the change and got some success (troubles with blinking) with method 1) and 2), while working with prebuild PanZoom did not allow me to make a change in an image with a Timer.

I also tried zooming a particular layer in ImageEnView (with all three methods), but unfortunately got nothing. Zooming affects all layers ( I would like to zoom a single one ). And it also seems, that zooming changes only the display of the layer, so when assigning that layer to another ImageEnView (ImageEnView2) element, it copies the untransformed image, although I can actually watch the zoom transformation in ImageEnView1.

Am I missing something in my efforts to zoom a single layer of the image?

Borut
Go to Top of Page

xequte

38608 Posts

Posted - Jan 25 2022 :  16:09:05  Show Profile  Reply
Hi Borut

It sounds like you are looking for some type of animation type solution. This is something that has been discussed a number of times on the forum, but is not specifically supported.

If you are only looking to animate a single layer, then you would do that just by updating its PosX, PosY, Width, Height properties and then update the TImageEnView.

Unfortunately I don't think it would animate "cleanly". Ensure you enable LayersCaching to improve the performance.

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

Borut

15 Posts

Posted - Jan 30 2022 :  16:04:53  Show Profile  Reply
Hi Nigel,
thank you so much for your help. I will try with PosX and PosY.
I would like to come to "animation", but still, with worked out (not too perfect) version of it. For artistic purposes, the "curved" line is somehow more efficient than straight ( full animation programs).
Anyhow,I would be very glad if, somewhere in the future, Imageen would make support for zooming a single layer.
Thanks again.
Borut
Go to Top of Page

xequte

38608 Posts

Posted - Jan 30 2022 :  18:20:30  Show Profile  Reply
Hi

Animation is something that we will consider for a future version.

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