边框应该是图片上的样子。我试着在它上面设置一个新的图片,但它不是这样的。

发布于 2020-11-13 21:28:47
你是在说这个吗?
import pygame
BLACK = (0,0,0)
pygame.init()
# Set up the drawing window
screen = pygame.display.set_mode([500, 500])
width,height = pygame.display.get_surface().get_size()
# Run until the user asks to quit
running = True
while running:
pygame.draw
# Did the user click the window close button?
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Fill the background with white
screen.fill((255, 255, 255))
pygame.draw.lines(screen, BLACK, False, [(0,0), (width-1,0), (width-1,height-1), (0, height-1), (0,0)], 3)
# Flip the display
pygame.display.flip()
pygame.quit()https://stackoverflow.com/questions/64821350
复制相似问题