Old 10-09-2021, 06:26 AM   #1
lollo
Human being with feelings
 
Join Date: Jun 2017
Posts: 54
Default gfx.blit alternative

I was trying to use gfx.blit API to create a scrollable text but the result are a bit “jerky”.
Code:
gfx.blit(source, scale, rotation[, srcx, srcy, srcw, srch, destx, desty, destw, desth, rotxoffs, rotyoffs] )

--destx = new position
This is happening because at each loop (by reaper.defer()) is given a new position value to the parameter "destx" but even if the logic is correct once print on screen the result isn't optimal.

it would be great if there was a command that simply giving a new final position and time in milliseconds automatically performs the movement action.

Time ago I saw something of similar in video processor but I can no longer find that script. (and was in EEL).

Any suggestion?
lollo is offline   Reply With Quote
Old 10-09-2021, 09:52 PM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

If you say about destx, I guess you mean horizontal scroll. defer() is not "stable" in time dimension, so you can only measure time of loop and then calculate movement per loop.
mpl is offline   Reply With Quote
Old 10-11-2021, 01:04 AM   #3
lollo
Human being with feelings
 
Join Date: Jun 2017
Posts: 54
Default

Quote:
Originally Posted by mpl View Post
If you say about destx, I guess you mean horizontal scroll. defer() is not "stable" in time dimension, so you can only measure time of loop and then calculate movement per loop.
Thx mpl. Correct, it was horizontal.
Your consideration is really interesting because it depends from how is complicated the script. Only once executed until the end it runs the trigger of defer.

So, something bound to the time it would be necessary.

Analyzing your reply, I think that there aren't differences between loop, because for example if I set each loop to a variable that decrease of 2 point, I must consider the time consuming for the defear, because it will be this last one that will set the time passages, independently from the values that I set to the variable.

I hope it is clear.
lollo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.