Visible to Intel only — GUID: GUID-BD0C1823-8F40-4258-BD06-85D42F6ABECB
Visible to Intel only — GUID: GUID-BD0C1823-8F40-4258-BD06-85D42F6ABECB
GETPIXEL, GETPIXEL_W
Graphics Functions: Return the color index of the pixel at a specified location. These routines are only available for Windows.
Module
USE IFQWIN
result = GETPIXEL (x, y)
result = GETPIXEL_W (wx, wy)
x, y |
(Input) INTEGER(2). Viewport coordinates for pixel position. |
wx, wy |
(Input) REAL(8). Window coordinates for pixel position. |
Results
The result type is INTEGER(2). The result is the pixel color index if successful; otherwise, -1 (if the pixel lies outside the clipping region, for example).
Color routines without the RGB suffix, such as GETPIXEL, use color indexes, not true color values, and limit you to colors in the palette, at most 256. To access all system colors, use SETPIXELRGB to specify an explicit Red-Green-Blue value and retrieve the value with GETPIXELRGB.
The GETPIXEL routine described here is a QuickWin routine. If you are trying to use the Microsoft* Platform SDK version of the GetPixel routine by including the IFWIN module, you need to specify the routine name as MSFWIN$GetPixel.