# Import library functions of 'pygame'
import pygame
 
# Initialize pygame
pygame.init()
 
# constants
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
 
PI = 3.141592653
 
# screen size
size = (400, 500)
screen = pygame.display.set_mode(size)
 
pygame.display.set_caption("Rotate Text")
 
# Loop until closining.
done = False
clock = pygame.time.Clock()
 
text_rotate_degrees = 0
 
# Loop as long as done == False
while not done:
 
    for event in pygame.event.get():  # User did something
        if event.type == pygame.QUIT:  # If user clicked close
            done = True  # Flag that we are done so we exit this loop
 
     # Clear and fill as black
    screen.fill(RED)

    # Draw some borders
    pygame.draw.rect(screen, BLACK, [150, 200, 123, 123], 7)
    pygame.draw.rect(screen, BLUE, [125, 175, 175, 175], 7)  
    # Font specifics
    font = pygame.font.SysFont('Calibri', 25, True, False)
  
    # rotation details
    text = font.render("Stacy Bates", True, BLUE)
    text = pygame.transform.rotate(text, text_rotate_degrees)
    text_rotate_degrees += 1
    screen.blit(text, [150, 200])
 
    # Update screen with above draw code.
    # This MUST happen after all the other drawing commands.
    pygame.display.flip()
 

    # at the minute all speed to prog. but untick# below and will slow to 60 cycles
    #clock.tick(60)
 
# Pygame on VS CODE S BATES
pygame.quit()