Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How to show Bitmaps.

Author
Message
RudolphC
18
Years of Service
User Offline
Joined: 25th May 2006
Location:
Posted: 20th Aug 2006 19:12
Everytime I choose to load a bitmap using LOAD BITMAP, it does not show.
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 20th Aug 2006 20:09
thtas because it loads it to MEMORY, not to the screen, To show it you would need these lines

set current bitmap bitmap number
GET IMAGE image number,Top,left,Right,Bottom
Paste image image number,x,y

So if you:
loaded your bitmap into slot 1
Want the image to b in slot 1
And want the image pasted at co-ords 10,10

use this code

set current bitmap 1
get image 1,0,0,bitmap width(),bitmap height()
paste image 1,10,10


hope i helped

must note.. this is true for DBC, duno bout DBP
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 20th Aug 2006 20:12
Or you could use :


Load Image "MyImage.bmp",1

Sprite 1,10,10,1

Applyby has Flies in his Eyes.
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 20th Aug 2006 21:03
aye, you could do that, i find the sprite image hard to use in batch command (for/next)

I had it where there was X image files, and i wanted each one on the screen so i used sumit like

For A = 1 to X
Sprite A,posx,posy,A
change posx : change posy
next A

But it only showed the last image in the first place.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 20th Aug 2006 21:08
That code would display ALL of your sprites, but all of them on top of each other, so you would only see the last one.


Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 20th Aug 2006 21:38
each loop i change posx n posy, so it SHOULD end up sumwhere else, but it dont.

Login to post a reply

Server time is: 2024-09-25 07:30:52
Your offset time is: 2024-09-25 07:30:52