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

WritePixelArrayAlpha

Alpha-blends all or part of a rectangular block of raw pixel values into a RastPort.

Declaration

Source position: cybergraphics.pas line 234

function WritePixelArrayAlpha(

  src: Pointer;

  srcx: Word;

  srcy: Word;

  srcmod: Word;

  rp: PRastPort;

  destx: Word;

  desty: Word;

  width: Word;

  height: Word;

  globalalpha: LongWord

):LongWord;

Arguments

src

  

Pointer to the pixel values.

srcx

  

Left corner of portion of source rectangle to use (in pixels).

srcy

  

Top corner of portion of source rectangle to use (in pixels).

srcmod

  

The number of bytes in each row of the source rectangle.

rp

  

The RastPort to write to.

destx

  

Left corner of portion of destination RastPort to write to (in pixels).

desty

  

Top corner of portion of destination RastPort to write to (in pixels).

width

  

Width of the affected area (in pixels).

height

  

Height of the affected area (in pixels).

globalalpha

  

an alpha value applied globally to every pixel taken from the source rectangle (the full 32-bit range of values is used: 0 to $FFFFFFFF).

Function result

the number of pixels written to.

Description

Alpha-blends all or part of a rectangular block of raw pixel values into a RastPort. The source data must be in 32-bit ARGB format: 1 byte per component, in the order alpha, red, green, blue.

Because of the X11 driver you have to set the drawmode to JAM1 with SetDrMd().

Errors

The globalalpha parameter is currently ignored.


Documentation generated on: 2021-07-30