summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-10-20 13:03:54 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2014-10-20 13:03:54 +0100
commit6a3d645d0edc18051ec8ac3ad8e6fdb9dc51aa54 (patch)
tree0f9b8b77e9c6fd774d47ba952b16573adb19be82 /src
parent11856a7d81d087d30867cf6795a7ee044556edee (diff)
downloadfpGUI-6a3d645d0edc18051ec8ac3ad8e6fdb9dc51aa54.tar.xz
gdi: Implements TfpgGDIApplication.GetScreenPixelColor()
The color picker in the ColorWheel demo now works on all supported platforms.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 8b7b9939..b24b04be 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -1418,8 +1418,11 @@ begin
end;
function TfpgGDIApplication.GetScreenPixelColor(APos: TPoint): TfpgColor;
+var
+ c: longword;
begin
- raise EfpGUIException.Create('Not implemented yet');
+ c := Windows.GetPixel(FDisplay, APos.X, APos.Y);
+ Result := WinColorTofpgColor(c);
end;
function TfpgGDIApplication.Screen_dpi_x: integer;