Skip to main content

WriteableBitmap(PixelSize, Vector, Nullable<PixelFormat>, Nullable<AlphaFormat>) Constructor

Initializes a new instance of the WriteableBitmap class.

Definition

Namespace: Avalonia.Media.Imaging
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public WriteableBitmap(
PixelSize size,
Vector dpi,
PixelFormat? format = null,
AlphaFormat? alphaFormat = null
)

Parameters

  PixelSize
The size of the bitmap in device pixels.
  Vector
The DPI of the bitmap.
  Nullable(PixelFormat)  (Optional)
The pixel format (optional).
  Nullable(AlphaFormat)  (Optional)
The alpha format (optional).

Return Value

An instance of the WriteableBitmap class.

See Also

Reference

WriteableBitmap Class
WriteableBitmap Overload
Avalonia.Media.Imaging Namespace