我无法显示我的图像和标题。我缩小了代码的范围,发现标题不知何故覆盖了我的图像。似乎是绘图处理器在做这件事。现在,代码将只显示标题。那么,我的问题是,你如何同时显示召唤火徽和图像
import simplegui
title = 'Fire Emblem Summoning'
def Title(canvas):
canvas.draw_text(title, [40,50], 24, "Blue")
def draw_handler(canvas):
canvas.draw_image(image, (1440 / 2, 1354 / 2), (1440, 1354), (500, 225), (200, 200))
image = simplegui.load_image('http://cdn.idigitaltimes.com/sites/idigitaltimes.com/files/2017/02/03/fire-emblem-heroes-five-star-characters-legends.jpg')
frame = simplegui.create_frame('Fire Emblem Summoning', 1000, 400)
frame.set_draw_handler(draw_handler)
frame.start()
frame.set_draw_handler(Title)
frame.start()
同一时间只能使用一帧。因此,将所有代码放在同一个draw处理程序函数中: http://www.codeskulptor.org/#user43_OTR2cL61rxlqoO6.py
相关问题 更多 >
编程相关推荐