Opal::UI::Buffer
In-memory 2D grid of screen cells representing a terminal frame.
Constructors
Class methods
Instance methods
Applies a shader pass to this buffer
Blits (copies) another buffer onto this buffer at the given coordinates. If ignore_spaces is true, empty cells without background do not overwrite existing cells.
In-place copies all cells and dimensions from another buffer without reallocating
Applies dimming attribute to all cells within the given rectangle.
Fills a rectangle with a specified cell
Returns true if the coordinate is within the buffer bounds and the active clip rect (if any).
Pastes another buffer onto this buffer with selectable BlitMode and optional alpha
Writes string and pads remaining columns up to width with spaces, ensuring clean erasure
Renders the buffer content to a string, optionally including ANSI color and style sequences.
Transforms: Rotate 90 degrees clockwise or counterclockwise
Captures this buffer as a screenshot string in the specified format (:ansi, :text, or :html).
If path is provided, writes the content to disk.
If copy_to_clipboard is true, copies the screenshot to the system clipboard.
Captures this buffer as a screenshot and immediately copies it to the system clipboard.
Shifts cells within a rect by dx and dy, filling exposed regions with fill_char
Applies a custom text shader block to this buffer (or a specific region)
Exports the buffer as a self-contained HTML representation with styled CSS 24-bit colors.
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Executes a block with an active clipping rectangle. If a clip rectangle is already active, computes their intersection.
Executes a block with an active mask map.