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

ReadPixelArray8

read the pen number value of a rectangular array of pixels starting at a specified x,y location and continuing through to another x,y location within a certain RastPort.

Declaration

Source position: agraphics.pas line 2367

function ReadPixelArray8(

  rp: pRastPort;

  xstart: LongWord;

  ystart: LongWord;

  xstop: LongWord;

  ystop: LongWord;

  array_: PByte;

  temprp: pRastPort

):LongInt;

Arguments

rp

  

A pointer to a RastPort

xstart

  

X starting point

ystart

  

Y starting point

xstop

  

X stop point

ystop

  

Y stop point

array_

  

A Pointer to an array of Bytes from which to fetch the pixel data allocate at least ((((width + 15) shr 4) shl 4) * (ystop - ystart + 1)) bytes.

temprp

  

A temporary rastport (copy of rp with Layer set = nil, temporary memory allocated for temprp^.BitMap with Rows set == 1, temprp^.BytesPerRow = (((width + 15) shr 4) shl 1), and temporary memory allocated for temprp^.BitMap^.Planes[])

Function result

The number of pixels read.

Description

For each pixel in a rectangular region, 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.

xstop must be >= xstart; ystop must be >= ystart

This function doesn't make sense on true-/hicolor rastports.

See also

ReadPixel

  

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

ReadPixelLine8

  

read the pen number value of a horizontal line of pixels starting at a specified x,y location and continuing right for count pixels.

WritePixelArray8

  

Write the pen number value of a rectangular array of pixels starting at a specified x,y location and continuing through to another x,y location within a certain RastPort.

WritePixelLine8

  

Write the pen number value of a horizontal line of pixels starting at a specified x,y location and continuing right for count pixels.


Documentation generated on: 2021-07-30