Hello,
I'm currently working partly with the 2D library and partly with the vector library. The vector library expects colors with an alpha channel; the 2D library can make use of them, but not always. Without opening a discussion about the alpha channel and such: Would it cause problems if the build in colors, like #Red/#Blue/#White..., would already contain the alphachannel (set to opaque, so red would be #Red|$FF000000 and so on)? I mean, could this cause havoc on other libraries (like the console, which doesn't use alpha at all)?
Would adding alpha to standard colors cause problems?
Would adding alpha to standard colors cause problems?
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: Would adding alpha to standard colors cause problems?
if a function wants a 24 bit color it will ignore the alpha channel so no harm in adding the alpha
though there might still be a layout different between Linux and Windows BGRA vs RGBA
So you could define cross platform constants as
it shouldn't effect have any negative effects then
though there might still be a layout different between Linux and Windows BGRA vs RGBA
So you could define cross platform constants as
Code: Select all
#RedAlpha = #Red | (255<<24)
Debug Hex(#Red)
Debug Hex(#redA)
it shouldn't effect have any negative effects then
Re: Would adding alpha to standard colors cause problems?
Ah ok. So asking to change build in constants into alpha channel containing ones could make sense? I regularly stumble against the problem of forgetting the alpha channel when using the vector library.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Re: Would adding alpha to standard colors cause problems?
Yes it wouldn't hurt though I can't remember if the color constants are defined in Linux.