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()
运行效果:

网友评论