You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
768 B

import pygame
import sys
pygame.init()
okno = pygame.display.set_mode((800,600))
pygame.display.set_caption("Vykreslování")
CERNA = (0,0,0)
CERVENA = (255,0,0)
ZELENA = (0,255,0)
MODRA = (0,0,255)
bezime = True
while bezime:
for udalost in pygame.event.get():
if udalost.type == pygame.QUIT:
bezime = False
okno.fill(CERNA)
#Kreslení obdelníku/čtverce: okno, barva, (x,y,šířka,výška)
pygame.draw.rect(okno,CERVENA,(100,100,150,100))
#kreslení kruhu: okno, barva, střed(x,y), poloměr
pygame.draw.circle(okno, ZELENA, (400,300), 60)
#kreslení čáry: okno, barva, start(x,y),end(x,y),tlouštka
pygame.draw.line(okno,MODRA,(600,100),(700,500),5)
pygame.display.flip()
pygame.quit()
sys.exit()