pub const fn buffer_size<C: PixelColor>(width: usize, height: usize) -> usize
Expand description

Calculates the required buffer size.

This function is a workaround for current limitations in Rust const generics. It can be used to calculate the N parameter based on the size and color type of the framebuffer.