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

Method line

Lib/pagebot/contexts/flatcontext/flatcontext.py:1122–1129  ·  view source on GitHub ↗

Draws a line from point p0 to point p1.

(self, p0, p1)

Source from the content-addressed store, hash-verified

1120 self.page.place(shape.circle(ptx, pty, pr))
1121
1122 def line(self, p0, p1):
1123 """Draws a line from point p0 to point p1."""
1124 shape = self._getShape()
1125
1126 if shape is not None:
1127 x0, y0 = self.getTransformed(*p0)
1128 x1, y1 = self.getTransformed(*p1)
1129 self.page.place(shape.line(x0, y0, x1, y1))
1130
1131
1132 def polygon(self, *points, **kwargs):

Callers

nothing calls this directly

Calls 3

_getShapeMethod · 0.95
getTransformedMethod · 0.95
placeMethod · 0.80

Tested by

no test coverage detected