abstract class
Termisu::Renderer
- Termisu::Renderer
- Reference
- Object
Overview
Abstract renderer interface for terminal output.
Separates rendering logic from I/O operations, enabling different renderer implementations (terminal, in-memory, etc.).
This interface defines all methods that Buffer requires for rendering cells to the screen, including cursor control, colors, and attributes.
Note: Methods with _seq suffix write escape sequences immediately.
This distinguishes them from buffer state management methods.
Direct Known Subclasses
Defined in:
termisu/renderer.crInstance Method Summary
-
#background=(color : Color)
Sets the background color (writes escape sequence).
-
#close
Closes the renderer and releases resources.
-
#enable_blink
Enables blink text (writes escape sequence).
-
#enable_bold
Enables bold text (writes escape sequence).
-
#enable_cursive
Enables italic/cursive text (writes escape sequence).
-
#enable_dim
Enables dim/faint text (writes escape sequence).
-
#enable_hidden
Enables hidden/invisible text (writes escape sequence).
-
#enable_reverse
Enables reverse video (writes escape sequence).
-
#enable_strikethrough
Enables strikethrough text (writes escape sequence).
-
#enable_underline
Enables underline text (writes escape sequence).
-
#flush
Flushes any buffered output.
-
#foreground=(color : Color)
Sets the foreground color (writes escape sequence).
-
#move_cursor(x : Int32, y : Int32)
Moves cursor to the specified position (writes escape sequence).
-
#reset_attributes
Resets all text attributes to default (writes escape sequence).
-
#size : Tuple(Int32, Int32)
Returns the renderer dimensions as {width, height}.
-
#write(data : String)
Writes data to the renderer.
-
#write_hide_cursor
Writes hide cursor escape sequence.
-
#write_show_cursor
Writes show cursor escape sequence.
Instance Method Detail
Sets the background color (writes escape sequence).
Sets the foreground color (writes escape sequence).
Moves cursor to the specified position (writes escape sequence).