Home > Language Reference > Classes > Display
GetPixel Function
Queries the color of a given pixel.
Syntax
Public Function GetPixel(ByVal x As Integer, ByVal y As Integer) As Long
| Parameter | Description |
| x | X-coordinate of the pixel. |
| y | Y-coordinate of the pixel. |
Remarks
The GetPixel function returns the color of the pixel located at the (x,y) coordinates. Calling this function automatically flushes any pending graphic operation, so that the pixel color can be determined in a synchronous way.
If the specified pixel lies outside the display, the special value -1 is returned. Otherwise, the returned value is a Long whose first byte contains the intensity of blue, the second the intensity of green and the third the intensity of red. For more information, refer to the Color Handling chapter.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |