MCPcopy Create free account
hub / github.com/cogentcore/core / AppendRune

Method AppendRune

paint/span.go:160–165  ·  view source on GitHub ↗

AppendRune adds one rune and associated formatting info

(r rune, face font.Face, clr image.Image, bg image.Image, deco styles.TextDecorations)

Source from the content-addressed store, hash-verified

158
159// AppendRune adds one rune and associated formatting info
160func (sr *Span) AppendRune(r rune, face font.Face, clr image.Image, bg image.Image, deco styles.TextDecorations) {
161 sr.Text = append(sr.Text, r)
162 rr := Rune{Face: face, Color: clr, Background: bg, Deco: deco}
163 sr.Render = append(sr.Render, rr)
164 sr.HasDecoUpdate(bg, deco)
165}
166
167// AppendString adds string and associated formatting info, optimized with
168// only first rune having non-nil face and color settings

Callers 2

SetHTMLNoPreMethod · 0.80
SetHTMLPreMethod · 0.80

Calls 1

HasDecoUpdateMethod · 0.95

Tested by

no test coverage detected