本文整理匯總了Python中Polygon.Polygon.line_length方法的典型用法代碼示例。如果您正苦於以下問題:Python Polygon.line_length方法的具體用法?Python Polygon.line_length怎麽用?Python Polygon.line_length使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Polygon.Polygon
的用法示例。
在下文中一共展示了Polygon.line_length方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: BrokenLine
# 需要導入模塊: from Polygon import Polygon [as 別名]
# 或者: from Polygon.Polygon import line_length [as 別名]
bl = BrokenLine(points)
print("Broken line length is %d " % bl.line_length())
bl.print_line()
print("------------------ CLASS Polygon TESTING ------------------")
pp1 = Point(3, 7)
pp2 = Point(7, 1)
pp3 = Point(8, 4)
pp4 = Point(11, 0)
points_1 = [pp1, pp2, pp3, pp4]
pol = Polygon(points_1)
print("Polygon length is %d " % pol.line_length())
print("---------------------- CLASS Point TESTING EXCEPTIONS -----------------------")
# p1 = Point(415, 21)
# p2 = Point(12, 10)
#
# p1.set_x(102)
# p2.set_y(152)
#
# xc = p1.get_x()
# yc = p1.get_y()
#
# print("======================================================================")
#
# xb = p2.get_x()