MCPcopy Create free account
hub / github.com/PageBot/PageBot / _get_mm

Method _get_mm

Lib/pagebot/toolbox/units.py:573–583  ·  view source on GitHub ↗

Answers the rendered value, translated to mm via pt. >>> int(round(4 * pt(12).mm)) # Rendered and cast to picas 17 >>> int(round(inch(5).mm)) 127 >>> cm(5).mm 50

(self)

Source from the content-addressed store, hash-verified

571 cm = property(_get_cm)
572
573 def _get_mm(self):
574 """Answers the rendered value, translated to mm via pt.
575
576 >>> int(round(4 * pt(12).mm)) # Rendered and cast to picas
577 17
578 >>> int(round(inch(5).mm))
579 127
580 >>> cm(5).mm
581 50
582 """
583 return asIntOrFloat(self.pt/Mm.PT_FACTOR)
584 mm = property(_get_mm)
585
586 def _get_rv(self):

Callers

nothing calls this directly

Calls 1

asIntOrFloatFunction · 0.90

Tested by

no test coverage detected