Unit 'cybergraphics' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

ReadPixelArray

Read the color values of a rectangular array

Declaration

Source position: cybergraphics.pas line 168

function ReadPixelArray(

  DestRect: Pointer;

  DestX: LongInt;

  DestY: LongInt;

  DestMod: LongWord;

  Rp: PRastPort;

  SrcX: LongInt;

  SrcY: LongInt;

  Width: LongWord;

  Height: LongWord;

  DstFormat: LongWord

):LongWord;

Arguments

DestRect

  

Pointer to an array of pixels where to write the pixel data to. The pixel format is specified in DestFormat

DestX

  

X starting point in the destination rectangle

DestY

  

Y starting point in the destination rectangle

DestMod

  

The number of bytes per row in the destination rectangle.

SrcX

  

X starting point in the RastPort

SrcY

  

Y starting point in the RastPort

Function result

number of pixels read

Description

Read the color values 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

For each pixel in a rectangular region, write the color value to a linear array of color values from the bitmap used to describe a particular rastport.

Attention

This function should only be used on screens depths > 8 bits.

Errors

The count value returned is totally wrong.

See also

WritePixelArray

  

write the color value of a rectangular array

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.


Documentation generated on: 2021-07-30