Method CreateOrUpdate
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
bitmapDynamicBitmapA reference to the DynamicBitmap instance to update. If null, a new instance is created and assigned to this reference.
sizeSizeDThe dimensions of the bitmap, specified as a SizeD structure.
scaleFactorfloatThe scaling factor to apply to the bitmap, specified as a float.
isTransparentboolA 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.