•  Back 
  •  VDI Raster 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Filev_get_pixel()                                                           VDI

Syntax

VOID v_get_pixel( handle, x, y, pindex, vindex )
WORD handle, x, y;
WORD *pindex, *vindex;

Function      v_get_pixel() returns the color value for a specified
              coordinate on the screen.

Opcode        105

Availability  Supported by all screen drivers.

Parameters    handle specifies a valid workstation handle. x any y specify
              the coordinate to return color information for. In
              a palette-based mode the WORD pointed to by pindex will
              contain the hardware register index of the color and the
              WORD pointer to by vindex will contain the VDI index of the
              color. In 16-bit true-color modes, pindex will be 0 and
              vindex will return the 16-bit RGB pixel value in the format
              {RRRR RGGG GGGB BBBB}. In 32-bit color modes, the lower byte
              of vindex will contain the 8 bits of red data, the upper
              byte of pindex will contain the 8 bits of green data, and
              the lower byte of pindex will contain the 8 bits of blue
              data. The upper byte of vindex is reserved for non-color
              data.

Binding       contrl[0] = 105;
              contrl[1] = 1;
              contrl[3] = 0;
              contrl[6] = handle;

              ptsin[0] = x;
              ptsin[1] = y;

              vdi();

              *pindex = intout[0];
              *vindex = intout[1];

Group         VDI Raster