[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] BUG: draw.arc mis-plot



Hi again


===

# dirtyarc.py
#
# Notice the trace of curve at 180 degrees when leave_artifact is True

import pygame
import math
from pygame.locals import *

leave_artifact = True

RED = (255, 50, 50)

def dirtyarc():
    try:
        pygame.init()
        bgrnd = pygame.display.set_mode((800, 600))
        angle1, angle2 = math.radians(0), math.radians(90)
        rect = pygame.Rect(0, 0, 200, 200)
        if leave_artifact:
            surf = pygame.Surface((200,200))
            pygame.draw.arc(surf, RED, rect, angle1, angle2, 1)
            bgrnd.blit(surf, (400, 300))
        else:
            rect.center = (400, 300)
            pygame.draw.arc(bgrnd, RED, rect, angle1, angle2, 1)
        pygame.display.flip()
        while 1:
            pygame.event.pump()
            if pygame.key.get_pressed()[K_ESCAPE]:
                break
    finally:
        pygame.quit()


if __name__ == '__main__':
    dirtyarc()

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm