This documentation is for the old version. Go to the latest Graphics Mill docs

GdiGraphics.SetPixel Method

Writes a color of a pixel at specified coordinates.

Namespace: Aurigma.GraphicsMill.Drawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Sub SetPixel ( _
	x As Integer, _
	y As Integer, _
	color As Color _
)
C#
public void SetPixel(
	int x,
	int y,
	Color color
)

Parameters

x

Type: System.Int32

Horizontal coordinate of the pixel you are changing.
y

Type: System.Int32

Vertical coordinate of the pixel you are changing.
color

Type: Aurigma.GraphicsMill.Color

A color of the pixel you want to write to the specified coordinates.

Remarks

If the current GdiGraphics instance is opened for a device context, you should remember than not all devices have per-pixel access support. Also, the coordinates must be inside the clipping region.

Note

This method works quite slow. It is ok to use it to write one color value, but if you need to process multiple pixels, it would be much faster to use direct access to memory.

See Also

Reference