MCPcopy Create free account
hub / github.com/PyQt5/PyQt / in_end_range

Method in_end_range

QPainter/Draw.py:48–49  ·  view source on GitHub ↗
(curr, first)

Source from the content-addressed store, hash-verified

46 def mouseMoveEvent(self, ev):
47 if self.drawEnable:
48 def in_end_range(curr, first):
49 return first.x() - 5 <= curr.x() <= first.x() + 5 and first.y() - 5 <= curr.y() <= first.y() + 5
50
51 if len(self.current_points) > 0 and in_end_range(ev.pos(), self.current_points[0]):
52 self.current_points.append(self.current_points[0])

Callers

nothing calls this directly

Calls 2

yMethod · 0.80
xMethod · 0.45

Tested by

no test coverage detected