路飞头像图
"""__author__=xx"""
import pygame
if __name__ == '__main__':
pygame.init()
screen = pygame.display.set_mode((600, 400))
screen.fill((255, 255, 255))
# 草帽
pygame.draw.ellipse(screen, (245, 175, 80), (200, 20, 180, 150))
pygame.draw.ellipse(screen, (34, 23, 5), (200, 20, 182, 152), 2)
pygame.draw.ellipse(screen, (245, 175, 80), (170, 60, 240, 200))
pygame.draw.ellipse(screen, (34, 23, 5), (170, 60, 242, 202), 2)
# 脸
pygame.draw.ellipse(screen, (251, 216, 184), (223, 73, 152, 200))
pygame.draw.ellipse(screen, (34, 23, 5), (223, 73, 153, 201),1)
# 嘴
pygame.draw.ellipse(screen, (254, 254, 254), (250, 200, 100, 64))
pygame.draw.ellipse(screen, (34, 23, 5), (250, 200, 102, 66), 2)
pygame.draw.rect(screen, (251, 216, 184),(250, 200, 102, 28))
pygame.draw.lines(screen, (34, 23, 5), False, [(252, 226), (262, 228), (338, 228),(350,226)], 2)
pygame.draw.line(screen, (34, 23, 5), (254, 243), (346, 243), 2)
pygame.draw.line(screen, (34, 23, 23), (320, 236), (320, 247), 2)
pygame.draw.line(screen, (34, 23, 23), (340, 236), (340, 245), 2)
# 左眼
pygame.draw.circle(screen, (254, 254, 254), (260, 180), 20)
pygame.draw.circle(screen, (34, 23, 5), (260, 180), 20, 1)
pygame.draw.circle(screen, (34, 23, 5), (263, 180), 4)
pygame.draw.line(screen, (34, 23, 5), (275, 163), (258, 150), 2)
# 右眼
pygame.draw.circle(screen, (254, 254, 254), (345, 180), 20)
pygame.draw.circle(screen, (34, 23, 5), (345, 180), 20, 1)
pygame.draw.circle(screen, (34, 23, 5), (341, 180), 4)
pygame.draw.line(screen, (34, 23, 5), (330, 159), (353, 149), 2)
pygame.draw.lines(screen, (34, 23, 5), False, [(330, 200),(350, 202),(360, 200)], 2)
pygame.draw.line(screen, (34, 23, 5), (338, 199), (338, 205), 2)
pygame.draw.line(screen, (34, 23, 5), (352, 199), (352, 205), 2)
# 鼻子
pygame.draw.lines(screen, (34, 19, 14), False, [(298, 200), (298, 204) ,(294, 210),(300, 212)], 4)
pygame.draw.line(screen, (100, 100,81), (302, 210), (304,210), 4)
# 头发
image = pygame.image.load('./code/font/image/timg.png')
screen.blit(image, (180, 45))
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit()
路飞.png
网友评论