setPixel

Syntax

void setPixel(int x, int y, int color)

Arguments

x
X-coordinate (in pixels) of the relative position (originating top-left at 0, 0) in the control where you want to draw a pixel.
y
Y-coordinate (in pixels) of the relative position (originating top-left at 0, 0) in the control where you want to draw a pixel.
color
The RGB color value of the pixel to be drawn.

Description

Call setPixel to draw an individual pixel to an OWNERDRAW control. First call startSetPixel, then use setPixel or any of the Control drawing functions to draw to the control and finish with a call to endSetPixel. This function is not for setting pixels in the preview / final image; use pset for that instead.

Example

contribute an example here!

Also see

startSetPixel, endSetPixel

Comments

Everyone can add their comments about their experiences with this function here. Tips for using it are welcome, too.