Canvas constructor

Canvas(
  1. int width,
  2. int height
)

Creates a canvas with width and height in cells.

Implementation

Canvas(int width, int height) : _scr = ScreenBuffer(width, height) {
  // Lip Gloss v2 uses GraphemeWidth for canvas composition.
  _scr.method = WidthMethod.grapheme;
}