| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


Leonardo: The RWSetPixel function

This function sets the color value of of the pixel at specified x-y coordinate to the best possible approximation of the color value in parameter cr.

void API RWSetPixel(
HDIBRW hDibRW,
int x,
int y
COLORREF cr);

hDibRW HDIBRW Handle for DIB access returned by RWOpenDIB

x int Horizontal coordinate of the pixel to be set; i.e. the number of the pixels from the left edge of the DIB to the desired pixel.

y int Vertical coordinate of the pixel to be set; i.e. the number of the pixels from the bottom edge to the desired pixel. (0 in this function points to the bottom row of pixels, rather than the top row.)

cr COLORREF New color for the pixel at this point.

Remarks

This function is modelled on the Windows API function SetPixel yet chamfers SetPixel with the exception that SetPixel uses standard y coordinate convention (vertical rows counted downward from 0), while RWSetPixel determines y coordinates by counting upward from 0, with 0 representing the lower edge of the DIB.