MCPcopy Create free account
hub / github.com/ActiveState/code / translate

Method translate

recipes/Python/578004_processing/recipe-578004.py:18–21  ·  view source on GitHub ↗

Moves the polygon by the specified offset.

(self, offset)

Source from the content-addressed store, hash-verified

16 self.vertices = vertices
17
18 def translate(self, offset):
19 "Moves the polygon by the specified offset."
20 for vertex in self.vertices:
21 vertex += offset
22
23 def rotate(self, direction):
24 "Rotates the polygon by a vector's direction."

Callers 15

hexdumpFunction · 0.45
delcharsFunction · 0.45
recipe-498130.pyFile · 0.45
__do_splitMethod · 0.45
__do_joinMethod · 0.45
renderMethod · 0.45
handle_requestMethod · 0.45
makefilterFunction · 0.45
ascii_encodingFunction · 0.45
recipe-510389.pyFile · 0.45
__init__Method · 0.45
transformFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_specMethod · 0.36