随便画点
"""__author__== God"""
import pygame
import random
def rand_color():
return random.randint(0,255)
if __name__ == '__main__':
pygame.init()
screen = pygame.display.set_mode((600,600))
screen.fill((255,255,255))
font = pygame.font.Font('./font/aa.ttf',20)
surface = font.render('程李明',True,(230,39,39))
screen.blit(surface, (20, 20))
pygame.display.flip()
def print_cm():
from cmath import pi
x1 = random.randint(230,270)
y1 = random.randint(235,245)
x2 = random.randint(330,360)
y2 = random.randint(235,245)
pygame.draw.circle(screen,(rand_color(),rand_color(),rand_color()),(300,300),100,0)
pygame.draw.arc(screen, (0, 0, 0), (220, 228, 160, 150), pi, 2 * pi,3)
pygame.draw.ellipse(screen, (255, 255, 204), (220, 230, 66, 36), 0)
pygame.draw.ellipse(screen, (255, 255, 204), (320, 230, 56, 36),0)
pygame.draw.ellipse(screen, (0, 0, 0), (x1, y1, 20, 20), 0)
pygame.draw.ellipse(screen, (0, 0, 0), (x2, y2, 20, 20), 0)
pygame.display.flip()
# x = 0
# y = 0
while True:
for event in pygame.event.get():
if event.type==pygame.QUIT:
exit()
pygame.time.wait(500)
print_cm()
pygame.display.update()
# screen.fill((255,255,255))
# rotozoom1 = pygame.transform.rotozoom(print_cm(), random.randint(0,360), 0.5)
# screen.blit(print_cm(),(x,y))
# x+=1
# y+=1
网友评论