您的位置:首页 > 其它

用pygame画一个圆

2015-06-11 16:45 197 查看
import sys, random, math, pygame
from pygame.locals import *
from datetime import datetime, date, time

pygame.init()

screen = pygame.display.set_mode((600, 500))
pygame.display.set_caption("Analog Clock Demo")
#screen.fill((0, 0, 100))

pos_x = 300
pos_y = 250
radius = 250
angle = 360

while True:
for event in pygame.event.get():
if event.type in (QUIT, KEYDOWN):
sys.exit()
screen.fill((0, 0, 200))
color = 255, 255, 0
position = 300, 250
radius = 100
width = 10

pygame.draw.circle(screen, color, position, radius, width)
pygame.display.update()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: