MCPcopy Index your code
hub / github.com/gonum/plot / Height

Method Height

text/text.go:110–113  ·  view source on GitHub ↗

Height returns the height of the text when using the given font before any text rotation is applied.

(txt string)

Source from the content-addressed store, hash-verified

108// Height returns the height of the text when using
109// the given font before any text rotation is applied.
110func (s Style) Height(txt string) vg.Length {
111 _, h := s.box(txt)
112 return h
113}
114
115// box returns the bounding box of a possibly multi-line text.
116func (s Style) box(txt string) (w, h vg.Length) {

Callers 12

TestPlainTextFunction · 0.95
TestLatexTextFunction · 0.95
sizeMethod · 0.80
drawMethod · 0.80
GlyphBoxesMethod · 0.80
sizeMethod · 0.80
drawMethod · 0.80
GlyphBoxesMethod · 0.80
NominalYMethod · 0.80
BoxMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80

Calls 1

boxMethod · 0.95

Tested by 2

TestPlainTextFunction · 0.76
TestLatexTextFunction · 0.76