summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/corelib/gdi/fpg_gdi.pas11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index c6fbe477..5d20873d 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -380,9 +380,16 @@ begin
end;
function WinColorTofpgColor(col: longword): TfpgColor;
+var
+ t: TRGBTriple;
begin
- //swapping bytes
- Result := fpgColorToWin(col);
+ { Windown Color is BBGGRR format }
+ t.Blue := (col and $FF0000) shr 16;
+ t.Green := (col and $00FF00) shr 8;
+ t.Red := (col and $0000FF);
+ t.Alpha := $FF;
+
+ Result := RGBTripleTofpgColor(t);
end;
function GetMyWidgetFromHandle(wh: TfpgWinHandle): TfpgWidget;