您应该尝试使用pygame进行图形处理。首先下载pygame
这是示例代码
import pygame,sys
from pygame import *
WIDTH = 480
HEIGHT = 480
WHITE = (255,255,255) #RGB
BLACK = (0,0,0) #RGB
pygame.init()
screen = display.set_mode((WIDTH,HEIGHT),0,32)
display.set_caption("Name of Application")
screen.fill(WHITE)
timer = pygame.time.Clock()
pos_on_screen, radius = (50, 50), 20
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
timer.tick(60) #60 times per second you can do the math for 17 ms
draw.circle(screen, BLACK, pos_on_screen, radius)
display.update()
希望有帮助。请记住,您需要先下载pygame。您还应该阅读pygame。这真的很有帮助。