BitmapImage.SetPixel(Int32, Int32, Color) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets pixel at specific position
C#
public abstract void SetPixel (int x, int y, System.Drawing.Color color);
abstract member SetPixel : int * int * System.Drawing.Color -> unit
Public MustOverride Sub SetPixel (x As Integer, y As Integer, color As Color)
- x
- Int32
X coordinate of the pixel
- y
- Int32
Y coordinate of the pixel
- color
- Color
Color to set the pixel to
The use of SetPixel(Int32, Int32, Color) and GetPixel(Int32, Int32) is usually slow. For fast image updates, grab the underlying raw buffer by calling AsByteSpan() or use the GetDrawingApi() method and use high-level drawing functions.
Produkt | Verzie |
---|---|
.NET IoT Libraries | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0 |