public static IReadWriteBitmapData CreateBitmapData<T>(
ArraySection<T> buffer,
Size size,
int stride,
PixelFormatInfo pixelFormatInfo,
Func<ICustomBitmapDataRow<T>, int, Color32> rowGetColor,
Action<ICustomBitmapDataRow<T>, int, Color32> rowSetColor,
Color32 backColor = default,
byte alphaThreshold = 128,
Action? disposeCallback = null
)
where T : struct, new()
Public Shared Function CreateBitmapData(Of T As {Structure, New}) (
buffer As ArraySection(Of T),
size As Size,
stride As Integer,
pixelFormatInfo As PixelFormatInfo,
rowGetColor As Func(Of ICustomBitmapDataRow(Of T), Integer, Color32),
rowSetColor As Action(Of ICustomBitmapDataRow(Of T), Integer, Color32),
Optional backColor As Color32 = Nothing,
Optional alphaThreshold As Byte = 128,
Optional disposeCallback As Action = Nothing
) As IReadWriteBitmapData
public:
generic<typename T>
where T : value class, gcnew()
static IReadWriteBitmapData^ CreateBitmapData(
ArraySection<T> buffer,
Size size,
int stride,
PixelFormatInfo pixelFormatInfo,
Func<ICustomBitmapDataRow<T>^, int, Color32>^ rowGetColor,
Action<ICustomBitmapDataRow<T>^, int, Color32>^ rowSetColor,
Color32 backColor = Color32(),
unsigned char alphaThreshold = 128,
Action^ disposeCallback = nullptr
)
static member CreateBitmapData :
buffer : ArraySection<'T> *
size : Size *
stride : int *
pixelFormatInfo : PixelFormatInfo *
rowGetColor : Func<ICustomBitmapDataRow<'T>, int, Color32> *
rowSetColor : Action<ICustomBitmapDataRow<'T>, int, Color32> *
?backColor : Color32 *
?alphaThreshold : byte *
?disposeCallback : Action
(* Defaults:
let _backColor = defaultArg backColor new Color32()
let _alphaThreshold = defaultArg alphaThreshold 128
let _disposeCallback = defaultArg disposeCallback null
*)
-> IReadWriteBitmapData when 'T : struct, new()
ArgumentNullException | buffer is Null -or- rowGetColor or rowSetColor is . |
ArgumentOutOfRangeException | size has a zero or negative width or height
-or- stride is too small for the specified width and pixelFormatInfo. |
ArgumentException | buffer is too small for the specified size, pixelFormatInfo and stride -or- stride is not a multiple of the size of T -or- pixelFormatInfo is indexed or its BitsPerPixel is 0. |