CRT::Ansi::Viewport
Inherits CRT::Ansi::Canvas < Reference < Object
A virtual buffer larger than the visible area, for scrollable content.
Has the same drawing API as Render (via Canvas): put, write,
clear, cell, box, panel. Use blit on the target to
copy a visible window from the viewport.
vp = Viewport.new(width: 80, height: 200)
vp.write(0, 150, "way down here", style)
render.blit(vp, x: 5, y: 3, w: 20, h: 10, scroll_y: 140)
Constructors
Instance methods
clear(style : Style = default_style) : Nil
Sourcedefault_style
Sourceheight
Sourcewidth
Source