GLBasic User Manual

Main sections

SETTRANSPARENCY

SETTRANSPARENCY color%



Sets the transparent color for the LOADFONT, GRABSPRITE and LOADSPRITE commands.

Before you call this function, LOADFONT's default transparency is RGB(0,0,0) and GRABSPRITE/LOADSPRITE uses RGB(255,0,128).


Example:
 
SETTRANSPARENCY RGB(0,255,0) // Green pixels are to be transparent
LOADSPRITE "Sprite.bmp", 0
PRINT "Hello World", 100, 100
DRAWSPRITE 0, 100, 100
SHOWSCREEN
MOUSEWAIT

See also...