Home
Products
Community
Manuals
Contact
Login or Signup

how do i use drawimage?

BlitzMax Forums/BlitzMax Beginners Area/how do i use drawimage?

drnmr(Posted 5 years ago) #1
this is a section of my coding for the pic

image=LoadImage("smile man.bmp" ,True)
DrawImage image

it worked for my old Blitz BASIC program but obviously it doesnt now


JazzieB(Posted 5 years ago) #2
Check the help files within BlitzMax. The parameters for LoadImage are different to previous versions of Blitz and you've completely missed off the x and y co-ordinates for DrawImage.

image:TImage=LoadImage(file,flags=-1)

DrawImage image:TImage,x,y,frame


drnmr(Posted 5 years ago) #3
when i tried this it still for some reason didnt work
it said identifier image not found


Dreamora(Posted 5 years ago) #4
graphics called before loading?


drnmr(Posted 5 years ago) #5
wut???


Erroneouss(Posted 5 years ago) #6
Did you call the 'graphics' command?


Bot Builder(Posted 5 years ago) #7
The error probably means that you have "strict" at the top of your code meaning that you have to declare variables global or local.

Local image:TImage=LoadImage(file,flags=-1)

DrawImage image:TImage,x,y,frame



CGV(Posted 5 years ago) #8
Do you have to keep identifying image as image:TImage throughout your code or was that just done here to avoid newbie confusion?

And yes I could just download the demo and test it myself but I'm waiting for when I know I'll have 30 days with plenty of free time.


Perturbatio(Posted 5 years ago) #9
Do you have to keep identifying image as image:TImage throughout your code or was that just done here to avoid newbie confusion?

you don't need to specify the type once it has been declared.


CGV(Posted 5 years ago) #10
Whoops!, forgot all about this post. A belated thanks Perturbatio.


Perturbatio(Posted 5 years ago) #11
a belated np :)