问题描述
使用此代码旋转图像时:
import pygame
size = (400,400)
win = pygame.display.set_mode(size)
clock = pygame.time.Clock()
def main_loop():
global FACE
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
FACE = pygame.transform.rotate(FACE,1)
win.fill((0,0))
win.blit(FACE,(50,50))
pygame.display.update()
clock.tick(5)
if __name__ == "__main__":
pygame.init()
FACE = pygame.image.load("./face.jpg").convert_alpha()
main_loop()
any1 知道如何解决这个问题 (使用 macos mojave python3.7.3 pygame 2.0.1)
编辑 您需要增加角度并旋转原始图像,而不是继续旋转已经旋转的图像 How do I rotate an image around its center using Pygame?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)