Table of Contents

Method TrySetEncodedData

Namespace
MaaFramework.Binding.Buffers
Assembly
MaaFramework.Binding.dll

TrySetEncodedData(THandle, byte[])

Sets the image encoded data to a MaaImageBuffer.

public static abstract bool TrySetEncodedData(THandle handle, byte[] data)

Parameters

handle THandle

The MaaImageBufferHandle.

data byte[]

The image data (PNG).

Returns

bool

true if the image encoded data was set successfully; otherwise, false.

TrySetEncodedData(THandle, Stream)

Sets the image encoded data to a MaaImageBuffer.

public static abstract bool TrySetEncodedData(THandle handle, Stream data)

Parameters

handle THandle

The MaaImageBufferHandle.

data Stream

The image data (PNG).

Returns

bool

true if the image encoded data was set successfully; otherwise, false.

TrySetEncodedData(THandle, ReadOnlySpan<byte>)

Sets the image encoded data to a MaaImageBuffer.

public static abstract bool TrySetEncodedData(THandle handle, ReadOnlySpan<byte> data)

Parameters

handle THandle

The MaaImageBufferHandle.

data ReadOnlySpan<byte>

The image data (PNG).

Returns

bool

true if the image encoded data was set successfully; otherwise, false.

TrySetEncodedData(byte[], Func<THandle, bool>)

Sets the image encoded data to a function using MaaRectBuffer.

public static abstract bool TrySetEncodedData(byte[] data, Func<THandle, bool> readBuffer)

Parameters

data byte[]

The image data (PNG).

readBuffer Func<THandle, bool>

The function used to read the data from the buffer.

Returns

bool

true if the image encoded data was set successfully; otherwise, false.

TrySetEncodedData(Stream, Func<THandle, bool>)

Sets the image encoded data to a function using MaaRectBuffer.

public static abstract bool TrySetEncodedData(Stream data, Func<THandle, bool> readBuffer)

Parameters

data Stream

The image data (PNG).

readBuffer Func<THandle, bool>

The function used to read the data from the buffer.

Returns

bool

true if the image encoded data was set successfully; otherwise, false.

TrySetEncodedData(ReadOnlySpan<byte>, Func<THandle, bool>)

Sets the image encoded data to a function using MaaRectBuffer.

public static abstract bool TrySetEncodedData(ReadOnlySpan<byte> data, Func<THandle, bool> readBuffer)

Parameters

data ReadOnlySpan<byte>

The image data (PNG).

readBuffer Func<THandle, bool>

The function used to read the data from the buffer.

Returns

bool

true if the image encoded data was set successfully; otherwise, false.