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

Method newPath

Lib/pagebot/contexts/basecontext/basecontext.py:263–278  ·  view source on GitHub ↗

Makes a new Bezierpath to draw in and answers it. This will not initialize self._bezierpath, which is accessed by the property self.bezierpath. This method uses a BezierPath class path to draw. NOTE: PageBot function. >>> from pagebot import getContext >>> c

(self)

Source from the content-addressed store, hash-verified

261 # Path.
262
263 def newPath(self):
264 """Makes a new Bezierpath to draw in and answers it. This will not
265 initialize self._bezierpath, which is accessed by the property
266 self.bezierpath. This method uses a BezierPath class path to draw.
267
268 NOTE: PageBot function.
269
270 >>> from pagebot import getContext
271 >>> context = getContext()
272 >>> context.newPage(420, 420)
273 >>> path = context.newPath()
274 """
275 # Defaults to DrawBot at the moment, should create a BaseBezier here.
276 raise NotImplementedError
277 #self._bezierpath = BaseBezierPath(self.b)
278 #return self._bezierpath
279
280 def moveTo(self, p):
281 """Move to point `p` in the open path. Create a new self._bezierpath if none

Callers 4

_get_bezierpathMethod · 0.95
bluntCornerRectMethod · 0.95
roundedRectMethod · 0.95
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected