我不能让clamp工作。我认为clamp是将一个rect放在另一个rect中,但是下面的尝试没有将蓝色的球放入红色的rect中。问题出在哪里?
import pygame
from pygame.locals import *
pygame.init()
TV=pygame.display.set_mode((400,400))
pygame.display.set_caption("Rect")
c=pygame.draw.circle(TV,(0,100,0),(150,100),100,1)
c1=pygame.draw.circle(TV,(0,0,200),(250,250),20,1)
r=pygame.draw.rect(TV,(100,0,0),c,1)
c1.clamp(r)
pygame.display.flip()
while True:
for e in pygame.event.get():
if e.type==QUIT:
pygame.quit()发布于 2016-03-21 16:28:37
https://stackoverflow.com/questions/36119653
复制相似问题