Skip to content

Commit

Permalink
Add getpixel (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphmorton authored and Mistuke committed Mar 13, 2017
1 parent 4e76f05 commit b80b6bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Graphics/Win32/GDI/HDC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ efficient (fromIntegral is optimized away,) and conveys the idea we
simply want the same representational value.
-}

----------------------
-- Implement GetPixel
----------------------

getPixel :: HDC -> Int -> Int -> IO COLORREF
getPixel dc x y = c_GetPixel dc x y
foreign import WINDOWS_CCONV unsafe "windows.h GetPixel"
c_GetPixel :: HDC -> Int -> Int -> IO COLORREF

----------------------

setArcDirection :: HDC -> ArcDirection -> IO ArcDirection
setArcDirection dc dir =
failIfZero "SetArcDirection" $ c_SetArcDirection dc dir
Expand Down

0 comments on commit b80b6bd

Please sign in to comment.