IWritableBitmapDataRowItem Property

Sets the color of the pixel in the current row at the specified x coordinate.


Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 7.0.0-preview.3
Color32 this[
	int x
] { set; }


x  Int32
The x-coordinate of the pixel to set.

Property Value

A Color32 instance that represents the color of the specified pixel.


To set the color from a Color structure you can use also the SetColor method but this member has a slightly better performance.

The color value represents a straight (non-premultiplied) color with gamma correction γ = 2.2, regardless of the underlying KnownPixelFormat. To access the actual KnownPixelFormat-dependent raw data use the WriteRaw method.

If the color to be set is not supported by owner IWritableBitmapData, then it will be quantized to a supported color value.


ArgumentOutOfRangeExceptionx is less than zero or is greater than or equal to the Width of the parent IWritableBitmapData.

See Also