美文网首页
12-pygame画肖像

12-pygame画肖像

作者: 云水君丶 | 来源:发表于2018-07-28 11:16 被阅读0次
import pygame

pygame.init()

screen = pygame.display.set_mode((560,480))

screen.fill((255, 255, 255))
image = pygame.image.load("./images/3.jpg")
image = pygame.transform.rotozoom(image, 0, 0.5)
screen.blit(image,(0,0))
x1 =200;x2=320 ;x3=(x1+x2)/2
y1 =y2=270
w = 100
h = 40
from math import pi
pygame.draw.arc(screen, (0, 0, 0), (x1-0.5*w, y1-0.8*h, w, h), pi/4, pi/1.2,10)
pygame.draw.arc(screen, (0, 0, 0), (x2-0.5*w, y1-0.8*h, w, h), pi/4, pi/1.2,10)
pygame.draw.ellipse(screen, (2, 2, 2), (x1-0.3*w, y1-0.5*h, 60, h), 2)
pygame.draw.circle(screen, (0, 0, 10), (x1, y1),20, 0)
pygame.draw.ellipse(screen, (2, 2, 2), (x2-0.3*w, y2-0.5*h, 60, h), 2)
pygame.draw.circle(screen, (0, 0, 10), (x2, y2),20, 0)

pygame.draw.lines(screen, (0, 0, 0), False, [(x3, 290), (x3, 330), (230, 360),(x3+10,365)],10)
pygame.draw.line(screen, (0, 0, 0), (x3-30, 420), (x3+40, 400), 8)
pygame.display.flip()

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            exit()

运行效果:


运行效果

相关文章

  • 12-pygame画肖像

    运行效果:

  • 画人物肖像

    今天画的人物肖像 人物肖像

  • 网络画展3

    肖像画

  • 一日一画(183)

    ——肖像画

  • 《自我的界限》听书笔记

    中国肖像画的发展规律。 潜在线索,肖像画从正式向非正式逐渐过渡。 正式肖像画:逼真,感觉好像见到真人,具有功能性。...

  • 我的肖像画

    大家都有肖像画吧,肖像画就是画自己的神态,表面上的表情,我的肖像画上有很多的表情,我的表情就是生气,上面还有...

  • 漫友画我

    肖像漫画 自己负责肖像漫画的策划、运作,但是自己画肖像漫画却很吃力,首先没有经过基础训练,人都画不准,别说夸张了。...

  • 偶尔画的明星肖像

    偶尔画的明星肖像

  • 题纲

    中国传统肖像画 两个故事 什么叫中国传统肖像画 与现在肖像画相比之特色 历代代表人物 任伯年其人 从民间...

  • 2018-05-04

    肖像画“柏原崇”承接绘画

网友评论

      本文标题:12-pygame画肖像

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