本文整理匯總了Python中rect.Rect.get_list方法的典型用法代碼示例。如果您正苦於以下問題:Python Rect.get_list方法的具體用法?Python Rect.get_list怎麽用?Python Rect.get_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rect.Rect
的用法示例。
在下文中一共展示了Rect.get_list方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: range
# 需要導入模塊: from rect import Rect [as 別名]
# 或者: from rect.Rect import get_list [as 別名]
for n in nature:
if(not n.name=='CAVE'):
draw.rectangle(n.get_list(), fill=defaultResurce[n.name][0])
else:
draw.polygon(createPolygonFromRect(n,5), fill=defaultResurce[n.name][0])
#STAMPA CINTA MURARIA
draw.line(perim,width=2,fill='#1A1A1A');
#STAMPA EDIFICI
for place in buildings:
color=DEFAULT_COLOR;
if(not place.name=='HOUSE'):
info=getDefaultPlace(place.name)
color=info[3]
draw.rectangle(place.get_list(), outline=DEFAULT_COLOR, fill=color )
draw.text((place.top_left().x+5,place.top_left().y),place.name[0:1],fill="red",font=font)
else:
draw.rectangle(place.get_list(), outline=color)
#STAMPA LEGENDA
draw.rectangle((CITY_SIZE_X_TRUE-maxsize*WIDTH_LEGEND-5,5,CITY_SIZE_X_TRUE-5,CITY_SIZE_Y-5), fill='white' )
draw.rectangle((CITY_SIZE_X_TRUE-maxsize*WIDTH_LEGEND-5,5,CITY_SIZE_X_TRUE-5,CITY_SIZE_Y-5), outline='black' )
LEFT=WIDTH_LEGEND
TOP=0
for i in range(0,len(LIGHT_PLACES)):
if((TOP*(FONT_SIZE+1)+10)>CITY_SIZE_Y):
TOP=0