本文整理匯總了Python中nodebox.graphics.CanvasContext.findpath方法的典型用法代碼示例。如果您正苦於以下問題:Python CanvasContext.findpath方法的具體用法?Python CanvasContext.findpath怎麽用?Python CanvasContext.findpath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nodebox.graphics.CanvasContext
的用法示例。
在下文中一共展示了CanvasContext.findpath方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: findpath
# 需要導入模塊: from nodebox.graphics import CanvasContext [as 別名]
# 或者: from nodebox.graphics.CanvasContext import findpath [as 別名]
def findpath(self, points, curvature=1.0):
# The list of points consists of Point objects,
# but it shouldn't crash on something straightforward
# as someone supplying a list of (x,y)-tuples.
from types import TupleType
for i, pt in enumerate(points):
if type(pt) == TupleType:
points[i] = Point(pt[0], pt[1])
return CanvasContext.findpath(self, points, curvature)