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

Method _set_glue

lib/matplotlib/_mathtext.py:1299–1313  ·  view source on GitHub ↗
(self, x: float, sign: int, totals: list[float],
                  error_type: str)

Source from the content-addressed store, hash-verified

1297 )
1298
1299 def _set_glue(self, x: float, sign: int, totals: list[float],
1300 error_type: str) -> None:
1301 self.glue_order = o = next(
1302 # Highest order of glue used by the members of this list.
1303 (i for i in range(len(totals))[::-1] if totals[i] != 0), 0)
1304 self.glue_sign = sign
1305 if totals[o] != 0.:
1306 self.glue_set = x / totals[o]
1307 else:
1308 self.glue_sign = 0
1309 self.glue_ratio = 0.
1310 if o == 0:
1311 if len(self.children):
1312 _log.warning("%s %s: %r",
1313 error_type, type(self).__name__, self)
1314
1315 def shrink(self) -> None:
1316 for child in self.children:

Callers 2

hpackMethod · 0.80
vpackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected