Share via


PlatformBitmapExportService.CreateContext(Int32, Int32, Single) Method

Definition

Creates a new bitmap export context with the specified dimensions and display scale.

public Microsoft.Maui.Graphics.BitmapExportContext CreateContext(int width, int height, float displayScale = 1);
abstract member CreateContext : int * int * single -> Microsoft.Maui.Graphics.BitmapExportContext
override this.CreateContext : int * int * single -> Microsoft.Maui.Graphics.BitmapExportContext
Public Function CreateContext (width As Integer, height As Integer, Optional displayScale As Single = 1) As BitmapExportContext

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.

Returns

A new BitmapExportContext instance for creating bitmap images.

Implements

Applies to