diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-09-24 16:20:49 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-09-24 16:20:49 +0100 |
commit | 53add88c2d6a7d6ffe45be35894f64df7f407d23 (patch) | |
tree | 9c59bd0a2d54e867edfe7e7721c48791683f8cee /src/corelib/x11 | |
parent | e4592856f24e69bfb7631f9bf6d022058a16d383 (diff) | |
download | fpGUI-53add88c2d6a7d6ffe45be35894f64df7f407d23.tar.xz |
x11: fixes fpgColorToX().
We did the color conversion to RGB, and then in the last block of code
we strangely discarded that conversion. Without the color conversion
(some colors can be "alias colors" like clButtonFace) we might process
rubbish data.
Now it should be fixed. Thanks to user UAPLY for spotting this.
Diffstat (limited to 'src/corelib/x11')
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index c7a1b865..bc9c9dbd 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -501,7 +501,6 @@ var c: TfpgColor; begin c := fpgColorToRGB(col); - if xapplication.DisplayDepth >= 24 then Result := c and $FFFFFF { No Alpha channel information } else if xapplication.DisplayDepth = 16 then @@ -510,7 +509,6 @@ begin Result := ConvertTo555Pixel(c) else begin - c := col; xc.blue := (c and $000000FF) shl 8; xc.green := (c and $0000FF00); xc.red := (c and $00FF0000) shr 8; |