Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- from math import pi
- pygame.init()
- screen = pygame.display.set_mode([1000,1000])
- clock = pygame.time.Clock()
- done = False
- while not done:
- clock.tick(10)
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- done = True
- screen.fill((0,0,0))
- # draw first arc just past pi/2 to make sure arc is not cut off by rectangle bounds
- pygame.draw.arc(screen, (255,255,255),[100,100,800,800], 9 * pi / 16, 1)
- # normal, easy, simple, arc does not touch vertical red line as expected
- pygame.draw.arc(screen, (255,255,255),[200,200,600,600], 2 * pi, 1)
- # shorter arc because in my actual code it seems that smaller arcs have larger gaps
- # but I can't seem to tell here besides it doesn't connect either
- pygame.draw.arc(screen, (255,255,255),[300,300,400,400], 4 * pi / 16, 1)
- # Horizontal and vertical lines for comparison
- pygame.draw.line(screen, (255,0,0), [500,500], [500,0])
- pygame.draw.line(screen, (255,0,0), [500,500], [900,500])
- pygame.display.flip()
- pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement