WladiD / AnyiQuack

Animation framework for Delphi
64 stars 19 forks source link

FMX #6

Closed jkour closed 5 years ago

jkour commented 5 years ago

Hi, that's great library. Would it work in Firemonkey? Or can it be converted? Thanks

WladiD commented 5 years ago

Hi John,

thanks for your kudos.

AnyiQuack works already with FMX, see the included example SlidingButtonFMX.

Best regards from Germany!

jkour commented 5 years ago

Hi, I missed that demo as it is not part of the examples project group :-) You use Winapi units so they do not compile for other platforms sadly

WladiD commented 5 years ago

Hi,

you are right, currently it works only under Windows. Because this is my main target platform. But I'm looking forward in this aspect.

jkour commented 5 years ago

Hi, thanks for the reply. Would you check a pull request for FMX?

WladiD commented 5 years ago

Yes, I would like to do that.

WladiD commented 5 years ago

Hi John,

thank you very much for this big improvement of AnyiQuack.

jkour commented 5 years ago

@WladiD My pleasure :-)

I was testing the FMX code on mac and Android and it works really smoothly. That is great work.

Quick Question: You choose Synchronize over Queue. Wouldn't Queue be more appropriate given that it is not blocking the app? I would expect this for the case of multiple animations running in parallel

WladiD commented 5 years ago

The Synchronize is blocking the TTimerThread, so it is not firing next time events to the main thread until the current one is processed.

For example: If your main thread is busy for 150ms, with the Queue solution you get 10 entries in the main thread to execute (15ms resolution) which are then executed when the main thread is getting idle. With the Synchronize solution it waits 150ms and is then called once (for the span of the 150ms example).

I've got perfect experience in the past with SendMessageTimeout instead of SendMessage. This is compareable with Synchronize/Queue.

jkour commented 5 years ago

Yes; I see the difference.

Thanks