头像小娃娃
import pygame
pygame.init()
screen = pygame.display.set_mode((800, 500))
screen.fill((255, 255, 255))
pygame.draw.circle(screen, (255, 0, 0), (400, 200), 100, 0)
pygame.draw.line(screen, (255, 255, 0), (400,200), (380,230), 1)
pygame.draw.line(screen, (255, 255, 0), (380,230), (420,230), 1)
pygame.draw.line(screen, (255, 255, 0), (420,230), (400,200), 1)
pygame.draw.circle(screen, (0, 0, 0), (370, 150), 10, 9 )
pygame.draw.circle(screen, (0, 0, 0), (430, 150), 10, 9 )
pygame.draw.line(screen,(0, 255, 0), (380, 250), (420, 250), 4)
pygame.draw.line(screen, (255, 0, 0), (340, 280), (340, 380), 2)
pygame.draw.line(screen, (255, 0, 0), (460, 280), (460, 380), 2)
pygame.draw.line(screen, (255, 0, 0), (340, 380), (460, 380), 2)
pygame.draw.line(screen, (255, 0, 0), (340, 280), (300, 350), 2)
pygame.draw.line(screen, (255, 0, 0), (460, 280), (500, 350), 2)
pygame.draw.circle(screen, (0, 0, 0), (300, 350), 15, 0)
pygame.draw.circle(screen, (0, 0, 0), (500, 350), 15, 0)
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit()
网友评论