MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / _pointlist

Method _pointlist

Python/Turtle.py:644–654  ·  view source on GitHub ↗

returns list of coordinate-pairs of points of item Example (for insiders): >>> from turtle import * >>> getscreen()._pointlist(getturtle().turtle._item) [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982), (9.9999999999999982, 0.0)] >>>

(self, item)

Source from the content-addressed store, hash-verified

642 return self.cv.type(item)
643
644 def _pointlist(self, item):
645 """returns list of coordinate-pairs of points of item
646 Example (for insiders):
647 >>> from turtle import *
648 >>> getscreen()._pointlist(getturtle().turtle._item)
649 [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982),
650 (9.9999999999999982, 0.0)]
651 >>> """
652 cl = self.cv.coords(item)
653 pl = [(cl[i], -cl[i+1]) for i in range(0, len(cl), 2)]
654 return pl
655
656 def _setscrollregion(self, srx1, sry1, srx2, sry2):
657 self.cv.config(scrollregion=(srx1, sry1, srx2, sry2))

Callers 1

_gotoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected