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

Method Width

text/text.go:103–106  ·  view source on GitHub ↗

Width returns the width of lines of text when using the given font before any text rotation is applied.

(txt string)

Source from the content-addressed store, hash-verified

101// Width returns the width of lines of text
102// when using the given font before any text rotation is applied.
103func (s Style) Width(txt string) (max vg.Length) {
104 w, _ := s.box(txt)
105 return w
106}
107
108// Height returns the height of the text when using
109// the given font before any text rotation is applied.

Callers 6

TestPlainTextFunction · 0.95
TestLatexTextFunction · 0.95
BoxMethod · 0.45
DrawMethod · 0.45
BoxMethod · 0.45
DrawMethod · 0.45

Calls 1

boxMethod · 0.95

Tested by 2

TestPlainTextFunction · 0.76
TestLatexTextFunction · 0.76