bufferSetCellWithAlphaBlending method
void
bufferSetCellWithAlphaBlending()
Writes one encoded cell through OpenTUI's alpha-blending path.
Implementation
void bufferSetCellWithAlphaBlending(
OptimizedBufferHandle buffer,
int x,
int y,
int character,
Color foreground,
Color background,
int attributes,
) {
_checkUnsignedAbi(x, 0xFFFFFFFF, 'x');
_checkUnsignedAbi(y, 0xFFFFFFFF, 'y');
_checkUnsignedAbi(character, 0xFFFFFFFF, 'character');
_checkUnsignedAbi(attributes, 0xFFFFFFFF, 'attributes');
validateColorChannels(foreground, name: 'foreground');
validateColorChannels(background, name: 'background');
_guardAlloc('Failed to set buffer cell', (allocator) {
_native.bufferSetCellWithAlphaBlending(
buffer.value,
x,
y,
character,
_colorToNative(foreground, allocator),
_colorToNative(background, allocator),
attributes,
);
});
}