cellium_buffer (cellium v0.1.0)
View SourceShared logic for managing a virtual terminal buffer (shadow buffer). Operates on a Map where keys are {X, Y} and values are {Char, Fg, Bg}. Supports nested clipping to restrict drawing to specific rectangular areas.
Summary
Functions
Clears the clipping area on the buffer.
Returns a new empty buffer.
Gets a cell from the buffer. Returns space if empty.
Gets an entire row from 0 to Width-1.
Gets a segment of a row starting at StartX with specific length.
Puts a string into the buffer starting at X, Y, respecting clip if set.
Sets a single cell in the buffer, respecting clip if set.
Sets a rectangular clipping area on the buffer. If a clip already exists, it intersects the new area with the existing one.
Functions
Clears the clipping area on the buffer.
Returns a new empty buffer.
Gets a cell from the buffer. Returns space if empty.
Gets an entire row from 0 to Width-1.
Gets a segment of a row starting at StartX with specific length.
Puts a string into the buffer starting at X, Y, respecting clip if set.
Sets a single cell in the buffer, respecting clip if set.
Sets a rectangular clipping area on the buffer. If a clip already exists, it intersects the new area with the existing one.