An easy question, how to add a transparent background in a textdraw?
#1

An easy question, how I can add a transparent background in a textdraw?

Thanks!
Reply
#2

Colors are expressed as RGBA (Red, Green, Blue, Alpha) in hexadecimal numbers in pawn.
So 0xFF008A00, which is some shade of purple, is:
Код:
Red:   0xFF = 255  = 100%
Green: 0x00 = 0    = 0%
Blue:  0x8A = 138  = ~54%
Alpha: 0x00 = 0    = 0%
The alpha channel is for transparency. If you set it to a higher value,
for example 0x80 (decimal: 128 ) it will have a transparency of about
50%.
So hexadecimal expression for a "half" transparent purple would be
something like this:
0xFF008A80
Reply
#3

Quote:
Originally Posted by Blowfish
Посмотреть сообщение
Colors are expressed as RGBA (Red, Green, Blue, Alpha) in hexadecimal numbers in pawn.
So 0xFF008A00, which is some shade of purple, is:
Red: 0xFF = 255 = 100%
Green: 0x00 = 0 = 0%
Blue: 0x8A = 138 = ~54%
Alpha: 0x00 = 0 = 0%

The alpha channel is for transparency. If you set it to a higher value,
for example 0x80 (decimal: 128 ) it will have a transparency of about
50%.
So hexadecimal expression for a "half" transparent purple would be
something like this:
0xFF008A80
Thanks men.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)