summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-09-21 17:23:23 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-09-21 17:23:23 +0100
commit5fde9dfac338c439f9adbf6bc92f2610d9954264 (patch)
tree559ecba50d60e37546319f21521462fc17fd5070 /src/corelib/gdi
parent3c445397b71a42bfeb5c13847a13d408ac6bcc0b (diff)
downloadfpGUI-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/gdi')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas2
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;