我的标题正在覆盖窗口中的图像(Python)

2024-10-02 00:28:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法显示我的图像和标题。我缩小了代码的范围,发现标题不知何故覆盖了我的图像。似乎是绘图处理器在做这件事。现在,代码将只显示标题。那么,我的问题是,你如何同时显示召唤火徽和图像

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()

Tags: 代码图像image标题titledefframefire

热门问题