[Contents] [Index] [Help] [Retrace] [browse <] [Browse >]


NAME
    ReadPixel -- read the pen number value of the pixel at a
                 specified x,y location within a certain rastport.

SYNOPSIS
    penno = ReadPixel( rp,    x,    y )
      d0               a1  d0:16 d1:16

    LONG ReadPixel( struct rastport *, short, short );

FUNCTION
    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.

INPUTS
    rp -  pointer to a rastport structure
    (x,y) a point in the rastport

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

BUGS

SEE ALSO
    writepixel()    graphics/rastport.h