Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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.

NOTE:

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.