Home > Language Reference > Classes > Display
PutPixel Method
Sets the color of a pixel.
Syntax
Public Sub PutPixel(ByVal x As Integer, ByVal y As Integer, Optional ByVal lColor As Long = -1)
| Parameter | Description |
| x | X-coordinate of the pixel. |
| y | Y-coordinate of the pixel. |
| lColor | Color of the pixel. |
Remarks
The PutPixel method sets the color of a pixel located at the coordinates (x,y) to that specified by the optional parameter lColor. If this is omitted, the pixel color will be set to the current foreground color.
This method enqueues the drawing request in the graphics instruction buffer. The pixel color is only set when the buffer is emptied, either because it is full or because the Flush method is called.
Note: specifying a value for the lColor parameter makes the call slower. Thus, if you need to fill several pixels with the same color, it is advised to set the foreground color to that color using the ForeColor property, and to omit the lColor parameter on the subsequent PuPixel calls.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |