美文网首页
day9-作业-自画像

day9-作业-自画像

作者: PeppaTang | 来源:发表于2018-07-28 16:26 被阅读0次
    '''Tangzhuzhu'''
    
    import pygame
    
    pygame.init()
    screen = pygame.display.set_mode((600, 400))
    screen.fill((255, 255, 255))
    image = pygame.image.load('./image/花.jpg')
    image = pygame.transform.rotozoom(image,0,0.4)
    
    screen.blit(image,(139,17))
    pygame.draw.ellipse(screen,(0,0,0) , (92,105,245,235), 3)
    # 眼睛
    pygame.draw.ellipse(screen,(0,0,0) , (140,200,35,20), 2)
    pygame.draw.ellipse(screen,(0,0,0) , (158,200,15,15) )
    
    pygame.draw.ellipse(screen,(0,0,0) , (220,200,35,20), 2)
    pygame.draw.ellipse(screen,(0,0,0) , (238,200,15,15))
    
    pygame.draw.line(screen, (0, 0, 0), (220, 105), (240, 70), 2)
    
    pygame.draw.circle(screen,(255,0,0),(115,235),15)
    pygame.draw.circle(screen,(255,0,0),(260,235),15)
    
    
    from math import pi
    
    pygame.draw.arc(screen,(0, 0, 0), (190, 250,30, 30), pi+pi/4, pi*2-pi/4)
    
    
    pygame.display.flip()
    
    while True :
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                exit()
    
    自画像

    相关文章

      网友评论

          本文标题:day9-作业-自画像

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