diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-09-21 17:23:23 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-09-21 17:23:23 +0100 |
commit | 5fde9dfac338c439f9adbf6bc92f2610d9954264 (patch) | |
tree | 559ecba50d60e37546319f21521462fc17fd5070 /src/corelib | |
parent | 3c445397b71a42bfeb5c13847a13d408ac6bcc0b (diff) | |
download | fpGUI-5fde9dfac338c439f9adbf6bc92f2610d9954264.tar.xz |
gdi: Corrected the implemenation of Canvas.GetPixel()
We referenced the write device context. FGC is the temporary buffer used
for double buffering. FWinGC is the actual DC of the window.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index 5d20873d..e72dc6bc 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -2194,9 +2194,9 @@ function TfpgGDICanvas.GetPixel(X, Y: integer): TfpgColor; var c: longword; begin - c := Windows.GetPixel(Fgc, X, Y); if c = CLR_INVALID then Writeln('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color'); + c := Windows.GetPixel(FWinGC, X, Y); Result := WinColorTofpgColor(c); end; |