diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-03-19 22:09:57 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-03-19 22:09:57 +0200 |
commit | 6660ef5558039abecc0a009b105465c51900583b (patch) | |
tree | 857d4ed2458fb3ac2c120b863b3056fdfc9f6c7a /src/corelib | |
parent | 862dbe8384e46bce6f7146da49a41ad3d292031e (diff) | |
download | fpGUI-6660ef5558039abecc0a009b105465c51900583b.tar.xz |
Bit shifting of Alpha channel was wrong in color conversion routines
Both RGBTripleTofpgColor() and FPColorTofpgColor() incorrectly
bit shifted the Alpha channel value.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_base.pas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index 34b14d45..a6f4947f 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -979,12 +979,12 @@ end; function RGBTripleTofpgColor(const AColor: TRGBTriple): TfpgColor; begin - Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 32); + Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 24); end; function FPColorTofpgColor(const AColor: TFPColor): TfpgColor; deprecated; begin - Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 32); + Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 24); end; function fpgGetRed(const AColor: TfpgColor): byte; |