728x90
반응형
import pygame
pygame.init()
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
screensize = [400, 300]
screen = pygame.display.set_mode(screensize)
pygame.display.set_caption("Drawing Rectangle")
done = False
clock = pygame.time.Clock()
while not done:
clock.tick(10)
for event in pygame.event.get():
if event.type == pygame.QUIT:
done=True
screen.fill(WHITE)
pygame.draw.circle(screen, BLUE, [60, 250], 40, 2)
pygame.draw.circle(screen, RED, [60, 100], 50)
pygame.draw.circle(screen, GREEN, [120, 150], 100, 2)
pygame.display.flip()
pygame.quit()

728x90
반응형
'프로그램' 카테고리의 다른 글
[파이썬] UI (Tkinter) Button, Label, MessageBox (0) | 2022.09.22 |
---|---|
[파이썬] pandas 컬럼이 null 이면 다른 컬럼값 변경 (1) | 2022.09.22 |
[파이썬] 터틀로 원 그리기 (0) | 2022.09.20 |
[파이썬] 외부 프로그램 실행 (0) | 2022.09.18 |
[파이썬] 배열에서 항목(중복제거) 찾고 Count 하기 (0) | 2022.09.18 |
댓글