On Tuesday, 15 December 2020 at 05:10:27 UTC, Виталий Фадеев
wrote:
On Tuesday, 15 December 2020 at 05:04:46 UTC, Виталий Фадеев
wrote:
On Monday, 14 December 2020 at 16:19:18 UTC, Adam D. Ruppe
wrote:
On Monday, 14 December 2020 at 16:11:16 UTC, Jacob Carlborg
wrote:
Or you can call it `rgba`.
On Tuesday, 15 December 2020 at 05:04:46 UTC, Виталий Фадеев
wrote:
On Monday, 14 December 2020 at 16:19:18 UTC, Adam D. Ruppe
wrote:
On Monday, 14 December 2020 at 16:11:16 UTC, Jacob Carlborg
wrote:
Or you can call it `rgba`. It seems to be what Wikipedia
prefers [1].
The ordering here tend
On Monday, 14 December 2020 at 16:19:18 UTC, Adam D. Ruppe wrote:
On Monday, 14 December 2020 at 16:11:16 UTC, Jacob Carlborg
wrote:
Or you can call it `rgba`. It seems to be what Wikipedia
prefers [1].
The ordering here tends to reflect the bytes. So argb puts the
alpha byte first in the arr
On Monday, 14 December 2020 at 16:11:16 UTC, Jacob Carlborg wrote:
Or you can call it `rgba`. It seems to be what Wikipedia
prefers [1].
The ordering here tends to reflect the bytes. So argb puts the
alpha byte first in the array whereas rgba puts red first.
But there's other ways here inclu
On Monday, 14 December 2020 at 05:51:28 UTC, Виталий Фадеев wrote:
It's parsing the `.a` in `.argb` as part of the number:
auto color = 0x00AABBCC.a rgb; // what the compiler sees
You can fix it with parentheses:
auto color = (0x00AABBCC).argb;
Thanks!
It is not perfect, but also beauty!
On Monday, 14 December 2020 at 05:37:21 UTC, Paul Backus wrote:
On Monday, 14 December 2020 at 05:27:40 UTC, Виталий Фадеев
wrote:
".rgb" Compiled fine.
".argb" Compilation error.
Source:
https://run.dlang.io/is/ULQ4kh
It's parsing the `.a` in `.argb` as part of the number:
auto color
On Monday, 14 December 2020 at 05:27:40 UTC, Виталий Фадеев wrote:
".rgb" Compiled fine.
".argb" Compilation error.
Source:
https://run.dlang.io/is/ULQ4kh
It's parsing the `.a` in `.argb` as part of the number:
auto color = 0x00AABBCC.a rgb; // what the compiler sees
You can fix it wit
On Monday, 14 December 2020 at 05:24:39 UTC, Виталий Фадеев wrote:
... msg ...
But...:
Color rgb( uint color )
{
return
Color( cast( uint ) (
( ( color & 0x00FF ) << 16 ) |
( ( color & 0xFF00 ) ) |
( ( color
We have:
static import winapi=core.sys.windows.windows;
struct Color
{
union
{
winapi.COLORREF native;
struct
{
ubyte r;
ubyte g;
ubyte b;
}
}
ubyte a = 0