Closes the open path if it exists, otherwise ignore it. >>> from pagebot import getContext >>> context = getContext() >>> context.newPage(420, 420) >>> # Creates. a new self._bezierpath by property self.bezierpath. >>> context.moveTo(pt(100, 100)) >>>
(self)
| 369 | return self.b.arcTo(xy1, xy2, radius) |
| 370 | |
| 371 | def closePath(self): |
| 372 | """Closes the open path if it exists, otherwise ignore it. |
| 373 | |
| 374 | >>> from pagebot import getContext |
| 375 | >>> context = getContext() |
| 376 | >>> context.newPage(420, 420) |
| 377 | >>> # Creates. a new self._bezierpath by property self.bezierpath. |
| 378 | >>> context.moveTo(pt(100, 100)) |
| 379 | >>> context.curveTo(pt(100, 200), pt(200, 200), pt(200, 100)) |
| 380 | >>> context.closePath() |
| 381 | >>> # Drawing on a separate path. |
| 382 | >>> path = context.newPath() |
| 383 | >>> path.moveTo(pt(100, 100)) |
| 384 | >>> path.curveTo(pt(100, 200), pt(200, 200), pt(200, 100)) |
| 385 | >>> path.closePath() |
| 386 | >>> context.drawPath(path) |
| 387 | """ |
| 388 | if self._bezierpath is not None: # Only if an open path exists. |
| 389 | self._bezierpath.closePath() |
| 390 | |
| 391 | def drawPath(self, path=None, p=None, sx=1, sy=None, fill=None, |
| 392 | stroke=None, strokeWidth=None): |
no outgoing calls
no test coverage detected