No Black Showing!

BlitzPlus Forums/BlitzPlus Programming/No Black Showing!

Jono(Posted 2003) [#1]
Hello, All

I've just been loading my graphics into memory and displaying them, it works fine but i decided to change the Cls colour to whitish, but now it's not showing any black in my images.

AppTitle "BreakIn!"

Local ScreenHeight = 165
Local ScreenWidth = 165
Graphics ScreenWidth,ScreenHeight

Local Pad = LoadImage("Pad.bmp")
Local PadX = 0
Local PadY = 128

SetBuffer BackBuffer()

ClsColor 250,250,250

While Not KeyDown(1)

Cls
DrawImage Pad,PadX,PadY
Flip

If KeyDown(203) Then PadX = PadX - 1: Delay 15
If KeyDown(205) Then PadX = PadX + 1: Delay 15

Wend
End


Jono(Posted 2003) [#2]
.


semar(Posted 2003) [#3]
The black colour is the transparent color by default. That means, it will never be displayed.

If you need to display it, you need to change the image's default transparent colour with the command MaskImage.

Just set it to a color that you don't use in your image, for example pink.

Alternatively, you can draw the image with DrawBlock command. This command will ignore any transparent color, which means, all the colour will be considered solid colour, and there will be no transparent colours.

Sergio.


skidracer(Posted 2003) [#4]
.

"Out of the Blue, and into the Black" - Neil Young


Wiebo(Posted 2003) [#5]
"And once you're gone... You can't come back"


semar(Posted 2003) [#6]
LOL !

@Wiebo,
shouldn't be instead: "You can't come black" ?

Sergio.


Perturbatio(Posted 2003) [#7]
I would be very concerned if he did come bl... em... ok... children on the board.


Wiebo(Posted 2003) [#8]
semar:
I'm sure it's 'back'... makes more sense as well =]

'rock and roll is here to stay'