本文整理汇总了Python中animation.Animation.grid_if_update_needed方法的典型用法代码示例。如果您正苦于以下问题:Python Animation.grid_if_update_needed方法的具体用法?Python Animation.grid_if_update_needed怎么用?Python Animation.grid_if_update_needed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类animation.Animation
的用法示例。
在下文中一共展示了Animation.grid_if_update_needed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from animation import Animation [as 别名]
# 或者: from animation.Animation import grid_if_update_needed [as 别名]
neo_text[4+3].y = new_y
neo_text[3].y = old_y
if t.minute % 10 == 0:
neo_text[4+2].y = new_y
neo_text[2].y = old_y
if t.minute == 0:
neo_text[4+1].y = new_y
neo_text[1].y = old_y
if t.hour % 10 == 0 and t.minute == 0:
neo_text[4+0].y = new_y
neo_text[0].y = old_y
if t.hour == 23 and t.minute == 59:
new_grid1 = ani1.grid_if_update_needed()
if new_grid1 is not None:
neo.bitmap(0, 0, new_grid1, r1, g1, b1)
new_grid2 = ani2.grid_if_update_needed()
if new_grid2 is not None:
neo.bitmap(8, 0, new_grid2, r2, g2, b2)
elif t.minute == 59 and t.second == 59:
# mario animation every hour
for ii in range(32):
bitmap = im_mario.crop_bitmap(
0, -8+ii)
neo.color_bitmap(0, 0, bitmap, multiplier=MULTIPLIERS_BY_HOUR[t.hour])
neo.update()
elif t.hour == 12+1 and t.minute == 30:
# the infamous coffeetime
neo.text(x, 1, txt_coffee, tiny_font, g=10)