美文网首页
day_10作业

day_10作业

作者: 我是一只菜鳥 | 来源:发表于2018-07-28 17:01 被阅读0次

路飞头像图

"""__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

相关文章

  • day_10作业

    路飞头像图

  • day_10

    每天一句: 如果你不能打败对手,那你就加入对手。一、表单高级 表单字段集 语法: 说明:相当于一个方框,在字段...

  • Day_10 异常与pygame

    异常捕获 pygame操作流程 pygame显示文字 pygame显示图片与图片操作 pygame基本显示

  • day_10 pygame文字图片图形显示

    1.pygame的显示流程 1.初始化2.创建游戏窗口3.游戏循环 2.文字显示 2.1.创建字体对象 a.创建系...

  • Day_10课程回顾——11.3(linux命令)

    查看命令位置:which which 查看可执行文件的位置。 命令格式:which 可执行文件名称 命令参数: -...

  • 【一日一logo|day_10】史塔克家族凛冬将至

    这是「60天60个logo」的第十天。 总算是把冰与火之歌中的四大家族都做好了。 今天,轮到了史塔克家族。 为了设...

  • 今天先不更

    补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业补作业...

  • 作业作业作业

    出外听课两天,小必的学习没过问。 早晨,小必的数学作业没完成,很多没完成:优化设计,数学书,小灵通,都没完成。 中...

  • 作业作业作业

    头疼的厉害,太阳穴绷得紧紧的。躺了一个多小时了,也不见好转。每当这个时候,一场大觉就能让我彻底放松。可是心不静,怎...

  • 作业作业作业

    1,我的作业 写好了文章,倒也没发的欲望,这是我的作业,作业。 只是想着把一切都准备好,明天再发。听说发文很多O推...

网友评论

      本文标题:day_10作业

      本文链接:https://www.haomeiwen.com/subject/tkbomftx.html