Answers for "pygame.draw.rect()"

5

pygame.Rect

pygame.Rect(top, left, width, height) # all values are integers in pixels
Posted by: Guest on February-03-2021
1

pygame.draw.rect()

gameDisplay = pygame.display.set_mode((width,height))
bright_blue =(0,255,255)

# draw rectangle 
pygame.draw.rect(gameDisplay, bright_blue ,(611,473,100,50))
Posted by: Guest on July-11-2020
5

pygame draw rect syntax

pygame.draw.rect(SURFACE, RGB_COLOR, (X, Y, WIDTH, HEIGHT))
Posted by: Guest on September-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language