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

WriteRGBPixel

Writes a pixel to a specified location

Declaration

Source position: cybergraphics.pas line 242

function WriteRGBPixel(

  a1arg: pRastPort;

  x: Word;

  y: Word;

  argb: LongWord

):LongInt;

Arguments

a1arg

  

Pointer to a RastPort structure

x

  

X coordinate of the pixel

y

  

Y coordinate of the pixel

argb

  

The desired color in AARRGGBB format. Every component allocates 8 bits of the longword.

Function result

error = 0 if pixel succesfully changed

= -1 if (x,y) is outside the rastport

Description

Write the alpha,red,green and blue 8-bit color component of the given color to a specified x,y location within a certain RastPort

Attention

This function should only be used on screens depths > 8 bits. Use WritePixel on 8 bit screens!

See also

ReadRGBPixel

  

Reads a pixel from a specified location

WritePixel

  

Change the pen num of one specific pixel in a specified RastPort.


Documentation generated on: 2021-07-30