SkiaBitmapExportContext(Int32, Int32, Single, Int32, Boolean, Boolean) Constructor
Definition
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.
Initializes a new instance of the SkiaBitmapExportContext class with the specified dimensions and properties.
public SkiaBitmapExportContext(int width, int height, float displayScale, int dpi = 72, bool disposeBitmap = true, bool transparent = true);
new Microsoft.Maui.Graphics.Skia.SkiaBitmapExportContext : int * int * single * int * bool * bool -> Microsoft.Maui.Graphics.Skia.SkiaBitmapExportContext
Public Sub New (width As Integer, height As Integer, displayScale As Single, Optional dpi As Integer = 72, Optional disposeBitmap As Boolean = true, Optional transparent As Boolean = true)
Parameters
- width
- Int32
The width of the bitmap in pixels.
- height
- Int32
The height of the bitmap in pixels.
- displayScale
- Single
The display scale factor to use.
- dpi
- Int32
The dots per inch (DPI) of the bitmap. Default is 72.
- disposeBitmap
- Boolean
Whether to dispose the bitmap when this context is disposed.
- transparent
- Boolean
Whether the bitmap should have an alpha channel (transparency).
Exceptions
Thrown when unable to create a Skia surface.