public static IReadWriteBitmapData CreateBitmapData<T>(
T[,] buffer,
int pixelWidth,
KnownPixelFormat pixelFormat,
Palette? palette,
Func<Palette, bool>? trySetPaletteCallback = null,
Action? disposeCallback = null
)
where T : struct, new()
Public Shared Function CreateBitmapData(Of T As {Structure, New}) (
buffer As T(,),
pixelWidth As Integer,
pixelFormat As KnownPixelFormat,
palette As Palette,
Optional trySetPaletteCallback As Func(Of Palette, Boolean) = Nothing,
Optional disposeCallback As Action = Nothing
) As IReadWriteBitmapData
public:
generic<typename T>
where T : value class, gcnew()
static IReadWriteBitmapData^ CreateBitmapData(
array<T,2>^ buffer,
int pixelWidth,
KnownPixelFormat pixelFormat,
Palette^ palette,
Func<Palette^, bool>^ trySetPaletteCallback = nullptr,
Action^ disposeCallback = nullptr
)
static member CreateBitmapData :
buffer : 'T[,] *
pixelWidth : int *
pixelFormat : KnownPixelFormat *
palette : Palette *
?trySetPaletteCallback : Func<Palette, bool> *
?disposeCallback : Action
(* Defaults:
let _trySetPaletteCallback = defaultArg trySetPaletteCallback null
let _disposeCallback = defaultArg disposeCallback null
*)
-> IReadWriteBitmapData when 'T : struct, new()
ArgumentNullException | buffer is . |
ArgumentOutOfRangeException | pixelWidth is too large for the specified buffer and pixelFormat -or- pixelFormat is not one of the valid formats. |
ArgumentException | buffer is empty
-or- palette is too large for the specified pixelFormat. |