CRT::Ansi::Canvas
Shared drawing interface for Render and Viewport.
Provides the common API: put, write, clear, cell,
box, panel, and blit. Includers implement the abstract
methods; the concrete methods build on them.
Instance methods
blit(source : Canvas, *, x : Int, y : Int, w : Int, h : Int, scroll_x : Int = 0, scroll_y : Int = 0) : Nil
Copy a visible window from a source canvas onto this one.
x,y— destination position on this canvasw,h— size of the visible windowscroll_x,scroll_y— offset into the source
box(x : Int, y : Int, *, w : Int = 0, h : Int = 0, style : Style = default_style, border : Border = Border::Single, fill : Style | Style::Char | Nil = nil) : Nil
Draw a box, horizontal line, or vertical line.
w > 0andh > 0: bordered box (w wide, h tall, inclusive)w > 0andh == 0: horizontal line of length ww == 0andh > 0: vertical line of length h
clear(style : Style) : Nil
Sourcedefault_style
Sourceheight
SourceReturns a Panel builder for fluid drawing within a region.
width
Source