MCPcopy Index your code
hub / github.com/python-openxml/python-docx / Twips

Class Twips

src/docx/shared.py:113–121  ·  view source on GitHub ↗

Convenience constructor for length in twips, e.g. ``width = Twips(42)``. A twip is a twentieth of a point, 635 EMU.

Source from the content-addressed store, hash-verified

111
112
113class Twips(Length):
114 """Convenience constructor for length in twips, e.g. ``width = Twips(42)``.
115
116 A twip is a twentieth of a point, 635 EMU.
117 """
118
119 def __new__(cls, twips: float):
120 emu = int(twips * Length._EMUS_PER_TWIP)
121 return Length.__new__(cls, emu)
122
123
124class RGBColor(Tuple[int, int, int]):

Callers 7

line_spacingMethod · 0.90
line_spacing_ruleMethod · 0.90
_line_spacing_ruleMethod · 0.90
widthMethod · 0.90
convert_from_xmlMethod · 0.90
convert_from_xmlMethod · 0.90
position_get_fixtureMethod · 0.90

Calls

no outgoing calls

Tested by 1

position_get_fixtureMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…