Graphics.SetPixel Method

Sets the color of the specified pixel.

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

Syntax

C#
public void SetPixel(
	int x,
	int y,
	Color color
)

Parameters

x

Type: System.Int32

The x-coordinate of the pixel to set.
y

Type: System.Int32

The y-coordinate of the pixel to set.
color

Type: Aurigma.GraphicsMill.Color

A Color that represents the color to assign to the specified pixel.

Remarks

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

Note

This method works quite slow. It is ok to use it to set 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