color lib
Andrea Fontana via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 11 06:31:33 PDT 2016
On Tuesday, 11 October 2016 at 12:14:37 UTC, Manu wrote:
> Oh dear... thanks for digging that up.
> I didn't know the web had a standard for alpha. Certainly
> 0xAARRGGBB
> has been used in windows code for as long as I've been
> programming...
> but now there's a competing #RRGGBBAA version...
> How to resolve this? I guess, go with the web? I should probably
> change it to the CSS4 way.
My idea is still to use a template:
colorFromString!"rgba" or colorFromString!"argb" (please notice
that AFAIK, the second most used way is actually "abgr" rather
than "argb" - because of byte-order)
And I think it's a good idea to set template argument to some
default.
MS is not sure about this, anyway.
Read carefully this:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms534427(v=vs.85).aspx
VS:
https://msdn.microsoft.com/en-us/library/ee505694(v=winembedded.60).aspx
VS:
https://msdn.microsoft.com/it-it/library/windows/desktop/dd183449(v=vs.85).aspx
OpenGL use rgba (and abgr?) directX argb:
https://www.opengl.org/wiki/Image_Format
https://www.opengl.org/wiki/Direct3D_Compatibility
Andrea
More information about the Digitalmars-d
mailing list