Draw a transparent rectangle in pygame

前端 未结 5 1502
一向
一向 2020-12-01 01:20

How can I draw a rectangle that has a color with an alpha? I have:

windowSurface = pygame.display.set_mode((1000, 750), pygame.DOUBLEBUF)
pygame.draw.rect(w         


        
5条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 02:14

    the most i can do to help you is to show you how to draw a rectangle that is not filled in. the line for the rectangle is:

    pygame.draw.rect(surface, [255, 0, 0], [50, 50, 90, 180], 1)
    

    the "1" means that it is not filled in

提交回复
热议问题