Unit 'agraphics' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

ReadPixel

read the pen number value of the pixel at a specified x,y location within a certain RastPort.

Declaration

Source position: agraphics.pas line 2033

function ReadPixel(

  Rp: PRastPort;

  X: LongInt;

  Y: LongInt

):LongWord;

Arguments

Rp

  

A pointer to a RastPort structure

X

  

X Coordinate to read

Y

  

Y Coordinate to read

Function result

The pen number of the pixel at (x,y) is returned. -1 is returned if the pixel cannot be read for some reason.

Description

Combine the bits from each of the bit-planes used to describe a particular RastPort into the pen number selector which that bit combination normally forms for the system hardware selection of pixel color.

See also

WritePixel

  

Change the pen num of one specific pixel in a specified RastPort.


Documentation generated on: 2021-07-30