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

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 2095

function ReadPixel(

  Rp: PRastPort;

  x: LongInt;

  y: LongInt

):LongInt;

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