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

Method _get_ry

Lib/pagebot/elements/element.py:2326–2342  ·  view source on GitHub ↗

Answers the relative rotation center for y. >>> from pagebot.toolbox.units import mm >>> e = Element(ry=120) >>> e.ry 120pt >>> e.ry += 20 >>> e.ry 140pt >>> e.ry = mm(100) >>> e.ry 100mm

(self)

Source from the content-addressed store, hash-verified

2324 rx = property(_get_rx, _set_rx)
2325
2326 def _get_ry(self):
2327 """Answers the relative rotation center for y.
2328
2329 >>> from pagebot.toolbox.units import mm
2330 >>> e = Element(ry=120)
2331 >>> e.ry
2332 120pt
2333 >>> e.ry += 20
2334 >>> e.ry
2335 140pt
2336 >>> e.ry = mm(100)
2337 >>> e.ry
2338 100mm
2339 """
2340 # Retrieve as Unit instance and adjust attributes to current settings.
2341 #base = dict(base=self.parentH, em=self.em) # In case relative units, use this as base.
2342 return units(self.style.get('ry', 0))#, base=base)
2343
2344 def _set_ry(self, ry):
2345 """Convert to units, if rx is not already a Unit instance."""

Callers

nothing calls this directly

Calls 2

unitsFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected