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

GETPIXELS

Graphics Subroutine: Returns the color indexes of multiple pixels. This routine is only available for Windows.

Module

USE IFQWIN

CALL GETPIXELS (n,x,y,color)

n

(Input) INTEGER(4). Number of pixels to get. Sets the number of elements in the other arguments.

x, y

(Input) INTEGER(2). Parallel arrays containing viewport coordinates of pixels to get.

color

(Output) INTEGER(2). Array to be filled with the color indexes of the pixels at x and y.

GETPIXELS fills in the array color with color indexes of the pixels specified by the two input arrays x and y. These arrays are parallel: the first element in each of the three arrays refers to a single pixel, the second element refers to the next pixel, and so on.

If the pixel is outside the clipping region, the value placed in the color array is undefined. Calls to GETPIXELS with n less than 1 are ignored. GETPIXELS is a much faster way to acquire multiple pixel color indexes than individual calls to GETPIXEL.

The range of possible pixel color index values is determined by the current video mode and palette, at most 256 colors. To access all system colors you need to specify an explicit Red-Green-Blue (RGB) value with an RGB color function such as SETPIXELSRGB and retrieve the value with GETPIXELSRGB, rather than a palette index with a non-RGB color function.