max_72xx v0.1.0 Max72XX.Array.Buffer View Source
Represents an array buffer.
This module is used to store/manipulate the bitmap data in an array.
As the array module allows to load buffers it can be useful to implement a backbuffer.
Link to this section Summary
Functions
Clear buffer (All pixels off)
Returns the buffer dimensions
Load bitmap data
The bitmap needs to fit the array bitmap dimensions (array_size * 16 bytes)
Load the bitmap data from other buffer. Both buffers needs to have same dimensions.
Create new buffer
Set a pixel on or off
Returns the list of commands to be send to load the buffer in the device. This method is used internally by Array to transfer the data.
Link to this section Types
Link to this section Functions
Clear buffer (All pixels off)
Returns the buffer dimensions
Load bitmap data
The bitmap needs to fit the array bitmap dimensions (array_size * 16 bytes)
Load the bitmap data from other buffer. Both buffers needs to have same dimensions.
Create new buffer
set_pixel(buffer, x, y, state \\ true)
View Sourceset_pixel( buffer :: t(), x :: integer(), y :: integer(), state :: pixel_state() ) :: t()
Set a pixel on or off
Returns the list of commands to be send to load the buffer in the device. This method is used internally by Array to transfer the data.