本文整理汇总了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()