Table of Contents

Method CreateOrUpdate

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

CreateOrUpdate(ref DynamicBitmap?, SizeD, float, bool)

Updates the properties of an existing DynamicBitmap instance or creates a new instance if the reference is null.

public static void CreateOrUpdate(ref DynamicBitmap? bitmap, SizeD size, float scaleFactor, bool isTransparent)

Parameters

bitmap DynamicBitmap

A reference to the DynamicBitmap instance to update. If null, a new instance is created and assigned to this reference.

size SizeD

The dimensions of the bitmap, specified as a SizeD structure.

scaleFactor float

The scaling factor to apply to the bitmap, specified as a float.

isTransparent bool

A value indicating whether the bitmap should support transparency. true if transparency is enabled; otherwise, false.

Remarks

If the bitmap parameter is null, a new DynamicBitmap instance is created with the specified properties. If the bitmap parameter is not null, its properties are updated to match the specified values.