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 / set image colorkey probs on dbpro trial

Author
Message
Steve Fash
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location: Doncaster, UK
Posted: 6th Jan 2003 18:46
Ok, I'm trialling the dbpro trial currently, and I've just tried a really simple bit of code to see what it's like (as I'm a BB user normally)..The problem I seem to be having is that the black background of a logo (rgb 0,0,0) I'm drawing over the top of another image isn't displayed as transparent, which leaves a huge black rectangle around the logo when it's displayed over the top of the other image. I know that black is usually the default transparent colour in most languages, and I've even tried to set it manually using SET IMAGE COLORKEY 0,0,0 befor loading in the image and the black is still not transparent...anyone know why ??

Code follows..
sync on
sync rate 100
set display mode 800,600,16
set window off
hide mouse
set image colorkey 0,0,0:load image "gfx\fdlogo1_2003.png",1,0
load image "gfx\space.jpg",2,0
while not mouseclick()=1
set current bitmap 0
paste image 2,50,20
paste image 1,260+cos(180+sp1)*180,70
ink 255,0
circle 400+cos(360+sp2)*45,300+sin(360+sp2)*45,90
ink 655,0
circle 444-cos(360+sp2)*45,344-sin(360+sp2)*45,45
sp1=sp1+3
sp2=sp2+6
sync
cls
endwhile
exit
Steve Fash
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location: Doncaster, UK
Posted: 6th Jan 2003 19:08
Doh! Changed the logo to a sprite and voila ! Black is transparent again.....how queer

Login to post a reply

Server time is: 2024-11-23 20:12:42
Your offset time is: 2024-11-23 20:12:42