public static IReadWriteBitmapData CreateBitmapData<T>(
ArraySection<T> buffer,
Size size,
int stride,
PixelFormatInfo pixelFormatInfo,
Func<ICustomBitmapDataRow<T>, int, int>? rowGetColorIndex,
Action<ICustomBitmapDataRow<T>, int, int>? rowSetColorIndex,
Palette? palette = null,
Func<Palette, bool>? trySetPaletteCallback = null,
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,
rowGetColorIndex As Func(Of ICustomBitmapDataRow(Of T), Integer, Integer),
rowSetColorIndex As Action(Of ICustomBitmapDataRow(Of T), Integer, Integer),
Optional palette As Palette = Nothing,
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(
ArraySection<T> buffer,
Size size,
int stride,
PixelFormatInfo pixelFormatInfo,
Func<ICustomBitmapDataRow<T>^, int, int>^ rowGetColorIndex,
Action<ICustomBitmapDataRow<T>^, int, int>^ rowSetColorIndex,
Palette^ palette = nullptr,
Func<Palette^, bool>^ trySetPaletteCallback = nullptr,
Action^ disposeCallback = nullptr
)
static member CreateBitmapData :
buffer : ArraySection<'T> *
size : Size *
stride : int *
pixelFormatInfo : PixelFormatInfo *
rowGetColorIndex : Func<ICustomBitmapDataRow<'T>, int, int> *
rowSetColorIndex : Action<ICustomBitmapDataRow<'T>, int, int> *
?palette : Palette *
?trySetPaletteCallback : Func<Palette, bool> *
?disposeCallback : Action
(* Defaults:
let _palette = defaultArg palette null
let _trySetPaletteCallback = defaultArg trySetPaletteCallback null
let _disposeCallback = defaultArg disposeCallback null
*)
-> IReadWriteBitmapData when 'T : struct, new()
ArgumentNullException | buffer is Null -or- Both rowGetColorIndex and rowSetColorIndex are . |
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- palette is too large for the specified pixelFormatInfo -or- pixelFormatInfo is not indexed or its BitsPerPixel is not between 1 and 16. |