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

Method translate

Lib/pagebot/contexts/basecontext/basecontext.py:733–736  ·  view source on GitHub ↗

Translate the origin to this point.

(self, x=0, y=0)

Source from the content-addressed store, hash-verified

731 self.b.transform(matrix, center=center)
732
733 def translate(self, x=0, y=0):
734 """Translate the origin to this point."""
735 xpt, ypt = point2D(upt(x, y))
736 self.b.translate(xpt, ypt)
737
738 def rotate(self, angle, center=None):
739 """Rotate the canvas by angle. If angle is not a units.Angle instance,

Callers 2

drawPathMethod · 0.95
drawGlyphMethod · 0.95

Calls 2

point2DFunction · 0.90
uptFunction · 0.90

Tested by

no test coverage detected