图片未呈现到pygame屏幕

时间:2019-07-17 12:59:42

标签: python-3.x pygame pygame-surface

在执行过程中,将加载正确分辨率的屏幕,但是图像(1200x800)未显示在屏幕上,而是显示了黑屏

import pygame

class Application:
    def __init__(self):
        pygame.init()
        self.Running = True
        self.Display = pygame.display.set_mode((1200,800))
        self.WindowTitle = pygame.display.set_caption("test")
        self.Surface = pygame.Surface((1200, 800))
        self.Background = None

    def Splashscreen(self):
        Splashscreen = pygame.image.load("./Assets/Backgrounds/001.png").convert()
        self.Background = self.Surface.blit(Splashscreen, (0,0))

if __name__ == "__main__" :
    MainApplication = Application()
    MainApplication.Splashscreen()

这是为什么,我该如何解决?

0 个答案:

没有答案