Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using "magic pink" as an invisible color.
#1
Ok, so after discovering that I can use this so-called magical color as an invisible color, I got excited. I make a test picture with MS Paint and paint it mostly 255, 0, 255(magic pink). I hurriedly save it to the directory of my most recent project and load up the program. Unfortunately, the magical pink color isn't invisible but just pink. I should have known better than to expect FB to do the work for me.

Is there a way to make this color live up to its reputation? Is there some keywork or value I have to set? Am I just retarded?
nd remember kids, only you can provoke forest fires!
Reply
#2
well the magic pink will only act as a transparent color when you use it with put with the trans flag set.

i would give more detail but i really haven't used the built in gfx lib i'm more of a sdl person
Reply
#3
Ah, I see. How would I go about setting this flag, anyone?
nd remember kids, only you can provoke forest fires!
Reply
#4
If you use 16/24/32 bit screen modes, then instead of Black, the TRANS mode of PUT will use magic-pink, &hFF00FF or, RGB(255, 0, 255).
·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-
avinash.vora - http://www.avinashv.net
Reply
#5
This shoud work(untested code):
Code:
'set 640x480x16bit
screen 18, 16, 2

'load some sprite
dim sprite(1000) as ushort 'make sure this is big enugh width*height+4
bload "sprite.bmp", varptr(sprite(0))

put (x,y), sprite(0), trans

lillo has just fixed a bug with the transparnt color in 32bit, but Im not sure if that was in PUT
Reply
#6
The bug was in BLOAD when loading BMPs while in 32bit mode... The bright pink color test would fail there in 0.12. This doesn't happen when you BLOAD a truecolor BMP while in 16bit mode.
Bug is fixed in CVS.
ngelo Mottola - EC++
Reply
#7
Thanks, I got it to work and it's wonderful. I had to change it to 16 bit, but that's ok. 32 bit was unnecessarily high, anyway.
nd remember kids, only you can provoke forest fires!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)