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

Method _get_inch

Lib/pagebot/toolbox/units.py:537–546  ·  view source on GitHub ↗

Answers the rendered value, translated to inch via pt. >>> u = pt(72) >>> u.pt, u.inch (72, 1) >>> int(round(cm(2.54).inch)) 1

(self)

Source from the content-addressed store, hash-verified

535 px = property(_get_px)
536
537 def _get_inch(self):
538 """Answers the rendered value, translated to inch via pt.
539
540 >>> u = pt(72)
541 >>> u.pt, u.inch
542 (72, 1)
543 >>> int(round(cm(2.54).inch))
544 1
545 """
546 return asIntOrFloat(self.pt/Inch.PT_FACTOR)
547 inch = property(_get_inch)
548
549 def _get_p(self):

Callers

nothing calls this directly

Calls 1

asIntOrFloatFunction · 0.90

Tested by

no test coverage detected