MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Glyph

Method Glyph

textrenderer.go:119–136  ·  view source on GitHub ↗
(char rune)

Source from the content-addressed store, hash-verified

117}
118
119func (tr *TextRenderer) Glyph(char rune) *Glyph {
120
121 glyph, exists := tr.Glyphs[char]
122
123 if !exists {
124
125 glyph = &Glyph{Rune: char}
126 // Might as well try to generate the texture
127 if glyph.Texture() == nil {
128 return nil
129 }
130 tr.Glyphs[char] = glyph
131
132 }
133
134 return glyph
135
136}
137
138func (tr *TextRenderer) GlyphsForRunes(word []rune) []*Glyph {
139 glyphs := []*Glyph{}

Callers 7

GlyphsForRunesMethod · 0.95
MeasureTextAutowrapMethod · 0.95
RenderTextMethod · 0.95
QuickRenderTextMethod · 0.95
UpdateMethod · 0.80
DrawMethod · 0.80
IndexToWorldMethod · 0.80

Calls 1

TextureMethod · 0.45

Tested by

no test coverage detected