MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / overline

Method overline

lib/matplotlib/_mathtext.py:2932–2949  ·  view source on GitHub ↗
(self, toks: ParseResults)

Source from the content-addressed store, hash-verified

2930 return [hlist]
2931
2932 def overline(self, toks: ParseResults) -> T.Any:
2933 body = toks["body"]
2934
2935 state = self.get_state()
2936 thickness = state.get_current_underline_thickness()
2937
2938 height = body.height - body.shift_amount + 3 * thickness
2939 depth = body.depth + body.shift_amount
2940
2941 # Place overline above body
2942 rightside = Vlist([Hrule(state), Glue('fill'), Hlist([body])])
2943
2944 # Stretch the glue between the hrule and the body
2945 rightside.vpack(height + (state.fontsize * state.dpi) / (100 * 12),
2946 'exactly', depth)
2947
2948 hlist = Hlist([rightside])
2949 return [hlist]
2950
2951 def underline(self, toks: ParseResults) -> T.Any:
2952 body = toks["body"]

Callers

nothing calls this directly

Calls 7

get_stateMethod · 0.95
vpackMethod · 0.95
VlistClass · 0.85
HruleClass · 0.85
GlueClass · 0.85
HlistClass · 0.85

Tested by

no test coverage detected