# coding:utf-8
import pygame
from pygame.locals import *
from sys import exit
background_image_file="bkkk.jpg"
pygame.init()
screen=pygame.display.set_mode((500,500),0,32)
#my_name="若你碰到他若你碰到她"
font=pygame.font.Font('SourceHanSansCN-ExtraLight.otf',40)
name_surface=font.render(u'若你碰到他 & 若你碰到她',True,(231,32,111))
x=-name_surface.get_width()
y=40
background_file=pygame.image.load('bk.jpg').convert()
while True:
for event in pygame.event.get():
if event==QUIT:
exit()
screen.blit(name_surface,(0,0))
#x-=0.2
#if x<-name_surface.get_width():
# x=500-name_surface.get_width()
screen.blit(background_file,(x,y))
pygame.display.update()
pygame.image.save(name_surface,"name.png")