本文整理汇总了Python中Polygon.tile方法的典型用法代码示例。如果您正苦于以下问题:Python Polygon.tile方法的具体用法?Python Polygon.tile怎么用?Python Polygon.tile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Polygon
的用法示例。
在下文中一共展示了Polygon.tile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: updateBbox
# 需要导入模块: import Polygon [as 别名]
# 或者: from Polygon import tile [as 别名]
# to draw the last face properly)
# del c[-1]
# for each vertex
# for v in c:
# offset all verts in tile to arrange in scenespace
# this isn't necessary when the data is coming straight from the json,
# only when the data is coming from a tangram vbo
# v = [v[0]+(4096*(tilemax[0]-tile.x)), v[1]+(4096*(tilemax[1]-tile.y))]
poly.addContour(c)
# update tile's bbox with contour's bbox
t.bbox = updateBbox(t.bbox, list(poly.boundingBox()))
poly.tile = t
t.polys.append(poly)
printStatus("100%")
# make a list of all polys
# this list comprehension is the same as the nested for loops below
# neat, eh? ...but harder to read :/
# polys = [p for t in tiles for p in t.polys]
polys = []
for t in tiles:
for p in t.polys:
polys.append(p)