The color definitions in the D2D1Helper section are wrong.
For example:
DarkSlateGray = $2F4F4F; // >> #2F4F4F works Ok in C++, but not in Delphi
should be
DarkSlateGray = $004F4F2F; // the correct Delphi TColor equivalent to DarkSlateGray
You can check this by enter the TColorvalue to a TForm.color.
I think the colorfields r and b are mixed up in Delphi.
A correct translation from TColor to D3DCOLORVALUE:
function D2D1TColorF(dcolor: TColor; {opacity} a: Single = 1.0): TD2D1ColorF; begin Result.r := ((dcolor AND $00FF0000) shr 16) / 255; Result.g := ((dcolor AND $0000FF00) shr 8) / 255; Result.b := ((dcolor AND $000000FF)) / 255; Result.a := a; end;
Color definition is from GDI+ header. Correct value for DarkSlateGray = $FF2F4F4F;
D2D Colors are always ARGB.
ARGB values are updated in the new release.
The color definitions in the D2D1Helper section are wrong. For example:
DarkSlateGray = $2F4F4F; // >> #2F4F4F works Ok in C++, but not in Delphi
should beDarkSlateGray = $004F4F2F; // the correct Delphi TColor equivalent to DarkSlateGray
You can check this by enter the TColorvalue to a TForm.color. I think the colorfields r and b are mixed up in Delphi. A correct translation from TColor to D3DCOLORVALUE:function D2D1TColorF(dcolor: TColor; {opacity} a: Single = 1.0): TD2D1ColorF; begin Result.r := ((dcolor AND $00FF0000) shr 16) / 255; Result.g := ((dcolor AND $0000FF00) shr 8) / 255; Result.b := ((dcolor AND $000000FF)) / 255; Result.a := a; end;