猪猪虾 发表于 2020-4-22 09:42:57

84讲 rect用法,我的对吗


if event.button == 1:    #鼠标左键按下
         cut_image = pygame.rect(turtle,"black",location_mouse_begin,location_mouse_end,width = 2)

location_mouse_begin,location_mouse_end是两个坐标,类似于(1,2)形式

zltzlt 发表于 2020-4-22 13:10:03

不知道你在问什么,发完整代码上来看看

小小小菜菜菜 发表于 2020-4-22 13:27:42

你改成这样去试试看看有没有报错不就行了pygame.Rect(turtle,"black",(location_mouse_begin,location_mouse_end),width = 2)

猪猪虾 发表于 2020-4-22 16:16:32

zltzlt 发表于 2020-4-22 13:10
不知道你在问什么,发完整代码上来看看

解决了,谢谢
页: [1]
查看完整版本: 84讲 rect用法,我的对吗