Color of a screen pixel: Difference between revisions

no edit summary
(Added PicoLisp)
No edit summary
Line 111:
return new Robot().getPixelColor(x, y);
}</lang>
 
=={{header|Liberty BASIC}}==
<lang lb>'This examples requires the Windows API
Struct point, x As long, y As long
 
hDC = GetDC(0)
result = GetCursorPos()
Print GetPixel(hDC, point.x.struct, point.y.struct)
Call ReleaseDC 0, hDC
End
 
 
Sub ReleaseDC hWnd, hDC
CallDLL #user32,"ReleaseDC", hWnd As uLong, hDC As uLong, ret As Long
End Sub
 
Function GetDC(hWnd)
CallDLL #user32, "GetDC", hWnd As uLong, GetDC As uLong
End Function
 
Function GetCursorPos()
CallDLL #user32, "GetCursorPos", point As struct, GetCursorPos As uLong
End Function
 
Function GetPixel(hDC, x, y)
CallDLL #gdi32, "GetPixel", hDC As uLong, x As long, y As long, GetPixel As long
End Function</lang>
 
=={{header|PicoLisp}}==