MCPcopy Create free account
hub / github.com/charmbracelet/bubbletea / init

Method init

examples/cellbuffer/main.go:79–86  ·  view source on GitHub ↗
(w, h int)

Source from the content-addressed store, hash-verified

77}
78
79func (c *cellbuffer) init(w, h int) {
80 if w == 0 {
81 return
82 }
83 c.stride = w
84 c.cells = make([]string, w*h)
85 c.wipe()
86}
87
88func (c cellbuffer) set(x, y int) {
89 i := y*c.stride + x

Callers 2

InitMethod · 0.80
UpdateMethod · 0.80

Calls 1

wipeMethod · 0.95

Tested by 1

InitMethod · 0.64