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
 Animating a shape
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

matxsoftware

4 Posts

Posted - Nov 16 2021 :  06:26:20  Show Profile  Reply
Hi,
I have to draw a shape moving round over an image like a car moving over a track drawing. The shape to be drawn will be many (20-30). I was thinking of loading the background image and then drawing the line to be followed then to be converted into a list of points (how?) to be used as coordinates to draw the shape.
What is the best solution?
Is there a function that allows me to do this movement in a certain time?
Do I draw a shape each layer?
Do I change the coordinates of the shapes on the same image?
I have developed such a thing in the past but I wanted to improve it with these components.
Thanks for the tips!

xequte

38615 Posts

Posted - Nov 17 2021 :  01:15:43  Show Profile  Reply
Hi

Performance is going to be the main issue here. If you are likely to be repainting multiple times a second, it will be hard to have it look good.

I would try using layers for shapes:

https://www.imageen.com/help/TIELayer.html

Update all the positions of your layers, and then call ImageEnView1.Update() to refresh the view.

Ensure you cache your layers:

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

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