Page 1 of 1
[Implemented] Function RGBA() and Alpha()
Posted: Wed Jul 16, 2008 7:35 am
by thyphoon
Hello,
I see lot off topic about alpha, but no ask why don't add this function
to works with 32bit image
Color = RGBA(Red, Green, Blue, Alpha)
Result= Alpha(Color)
support for 32bit image with Color= Point(x, y) and Plot(x, y,color)
Best regards and excuse me for my bad english
Thy
Posted: Wed Jul 16, 2008 12:22 pm
by DoubleDutch
The alpha could be tagged onto the end of the existing function - 0 being default?
eg
Posted: Wed Jul 16, 2008 4:12 pm
by Polo
DoubleDutch wrote:The alpha could be tagged onto the end of the existing function - 0 being default?
eg
Well, 255 as default sound better

Posted: Wed Jul 16, 2008 4:43 pm
by DoubleDutch
I thought that 0 was "not transparent"?
Posted: Wed Jul 16, 2008 4:47 pm
by Foz
Just as 0,0,0 means no colour, 255,255,255 means all colours
Think of it like a percentage, except it ranges upto 255 rather than 100.
Posted: Wed Jul 16, 2008 4:53 pm
by DoubleDutch
ahh, I thought that zero was a special case for compatibility?
Posted: Wed Jul 16, 2008 5:19 pm
by Polo
0 means it's transparent, and 255 means it's opaque

Posted: Wed Jul 16, 2008 5:37 pm
by DoubleDutch
ic, so for existing PureBasic compatibility it should default to 0, but ideally it should be 255 (RGB($ff,$ff,$ff) currently generates $00ffffff, not $ffffffff).