Prev Previous Post   Next Post Next
Old 01-07-2022, 12:43 PM   #1
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 7,279
Default gfx.blit requires four parameters...?

The Lua API docs say of gfx.blit(source,scale,rotation) that "If three parameters are specified, copies the entirety of the source bitmap to gfx.x, gfx.y using current opacity and copy mode..." and more. Note the if. To me, this means that not all parameters are required. So I try: gfx.blit(src_img) and to my surprise I get an error saying Function 'blit' requires 4 parameters, 1 passed.

If I do gfx.blit(src_img, 1) I get a message saying almost the same thing: Function 'blit' requires 4 parameters, 2 passed

Only if I pass all three parameters gfx.blit(src_img, 1, 0) do I not get any error message.

So I guess the API docs and the error message should be updated. Right?
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
 

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 10:12 AM.


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