本文整理匯總了Python中FlagPainter.FlagPainter.stripes方法的典型用法代碼示例。如果您正苦於以下問題:Python FlagPainter.stripes方法的具體用法?Python FlagPainter.stripes怎麽用?Python FlagPainter.stripes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FlagPainter.FlagPainter
的用法示例。
在下文中一共展示了FlagPainter.stripes方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: paint_flag_lithuania
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_lithuania():
"""http://www.vexilla-mundi.com/lithuania_flag.html"""
f = FlagPainter(3 / 5)
colors = [(253, 168, 17), (11, 87, 46), (178, 37, 37)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.save('lithuania')
示例2: paint_flag_monaco
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_monaco():
"""http://www.vexilla-mundi.com/monaco_flag.html"""
f = FlagPainter(4 / 5)
colors = [(190, 0, 36), (255, 255, 255)]
ratios = [1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.save('monaco')
示例3: paint_flag_ukraine
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_ukraine():
"""http://www.vexilla-mundi.com/ukraine_flag.html"""
f = FlagPainter(2 / 3)
colors = [(6, 68, 173), (253, 207, 15)]
ratios = [1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.save('ukraine')
示例4: paint_flag_romania
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_romania():
"""http://www.vexilla-mundi.com/romania_flag.html"""
f = FlagPainter(2 / 3)
colors = [(0, 25, 98), (254, 194, 14), (190, 0, 36)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.vertical)
f.save('romania')
示例5: paint_flag_russia
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_russia():
"""http://www.vexilla-mundi.com/russia_flag.html"""
f = FlagPainter(2 / 3)
colors = [(255, 255, 255), (4, 49, 157), (209, 17, 24)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.save('russia')
示例6: paint_flag_andorra
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_andorra():
f = FlagPainter(7 / 10)
colors = [(28, 63, 148), (255, 238, 0), (237, 22, 79)]
ratios = [64, 72, 64]
f.stripes(colors, ratios, StripeDirection.vertical)
f.place_drawing('andorra_detail.png', (1 / 2, 1 / 2), (62 / 200, 66 / 140))
f.save('andorra')
示例7: paint_flag_poland
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_poland():
"""http://www.vexilla-mundi.com/poland_flag.html"""
f = FlagPainter(5 / 8)
colors = [(255, 255, 255), (198, 8, 32)]
ratios = [1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.save('poland')
示例8: paint_flag_netherlands
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_netherlands():
"""http://www.vexilla-mundi.com/netherlands_flag.html"""
f = FlagPainter(2 / 3)
colors = [(190, 0, 36), (255, 255, 255), (0, 36, 151)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.save('netherlands')
示例9: paint_flag_moldova
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_moldova():
"""http://www.vexilla-mundi.com/moldova_flag.html"""
f = FlagPainter(1 / 2)
colors = [(4, 49, 157), (254, 194, 14), (193, 0, 32)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.vertical)
f.place_drawing('moldova_detail', (1 / 2, 1 / 2), (168 / 600, 168 / 300))
f.save('moldova')
示例10: paint_flag_slovakia
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_slovakia():
"""http://www.vexilla-mundi.com/slovakia_flag.html"""
f = FlagPainter(2 / 3)
colors = [(255, 255, 255), (0, 36, 151), (190, 0, 36)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.place_drawing('slovakia_detail', (270 / 900, 300 / 600), (240 / 900, 318 / 600))
f.save('slovakia')
示例11: paint_flag_serbia
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_serbia():
"""http://www.vexilla-mundi.com/serbia_flag.html"""
f = FlagPainter(2 / 3)
colors = [(223, 0, 56), (0, 25, 98), (255, 255, 255)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.place_drawing('serbia_detail', (321.5 / 900, 275 / 600), (225 / 900, 450 / 600))
f.save('serbia')
示例12: paint_flag_slovenia
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_slovenia():
"""http://www.vexilla-mundi.com/slovenia_flag.html"""
f = FlagPainter(1 / 2)
colors = [(255, 255, 255), (4, 49, 157), (203, 0, 44)]
ratios = [1, 1, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.place_drawing('slovenia_detail', (63 / 252, 42 / 126), (32 / 252, 42 / 126))
f.save('slovenia')
示例13: paint_flag_latvia
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_latvia():
"""http://www.vexilla-mundi.com/latvia_flag.html"""
f = FlagPainter(5 / 10)
colors = [(143, 32, 43), (255, 255, 255)]
ratios = [2, 1, 2]
f.stripes(colors=[colors[0], colors[1], colors[0]], ratios=ratios,
stripe_direction=StripeDirection.horizontal)
f.save('latvia')
示例14: paint_flag_spain
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_spain():
""""""
f = FlagPainter(2 / 3)
colors = [(190, 0, 36), (254, 194, 14), (190, 0, 36)]
ratios = [1, 2, 1]
f.stripes(colors, ratios, StripeDirection.horizontal)
f.place_drawing('spain_detail.png', (20 / 60, 1 / 2), (16 / 60, 16 / 40))
f.save('spain')
示例15: paint_flag_vatican_city
# 需要導入模塊: from FlagPainter import FlagPainter [as 別名]
# 或者: from FlagPainter.FlagPainter import stripes [as 別名]
def paint_flag_vatican_city():
"""http://www.vexilla-mundi.com/vatican_flag.html"""
f = FlagPainter(1)
colors = [(254, 220, 17), (255, 255, 255)]
ratios = [1, 1]
f.stripes(colors, ratios, StripeDirection.vertical)
f.place_drawing('vatican_city_detail', (27 / 36, 18 / 36), (13 / 36, 20 / 36))
f.save('vatican_city')