#NEWLINE# def arc( x , y , radius , startAngle , endAngle , antiClockwise , canvas ) : #NEWLINE# #INDENT# matrix = canvas . matrix #NEWLINE# context = canvas . context #NEWLINE# if ( not antiClockwise ) : #NEWLINE# #INDENT# realStartAngle = endAngle #NEWLINE# realEndAngle = startAngle #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# realStartAngle = startAngle #NEWLINE# realEndAngle = endAngle #NEWLINE# #UNINDENT# ar = ( radius * 10 ) #NEWLINE# startX = ( ( x + ( math . cos ( realStartAngle ) * ar ) ) - 5 ) #NEWLINE# startY = ( ( y + ( math . sin ( realStartAngle ) * ar ) ) - 5 ) #NEWLINE# endX = ( ( x + ( math . cos ( realEndAngle ) * ar ) ) - 5 ) #NEWLINE# endY = ( ( y + ( math . sin ( realEndAngle ) * ar ) ) - 5 ) #NEWLINE# if ( ( startX == endX ) and ( not antiClockwise ) ) : #NEWLINE# #INDENT# startX += 0.125 #NEWLINE# #UNINDENT# cx = canvas . getCoordX ( matrix , x , y ) #NEWLINE# cy = canvas . getCoordY ( matrix , x , y ) #NEWLINE# arcX = ( context . arcScaleX * ar ) #NEWLINE# arcY = ( context . arcScaleY * ar ) #NEWLINE# return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ARC + str ( int ( math . floor ( ( ( cx - arcX ) + 0.5 ) ) ) ) ) + ',' ) + str ( int ( math . floor ( ( ( cy + arcY ) + 0.5 ) ) ) ) ) + ' ' ) + str ( int ( math . floor ( ( ( cx + arcX ) + 0.5 ) ) ) ) ) + ',' ) + str ( int ( math . floor ( ( ( cy - arcY ) + 0.5 ) ) ) ) ) + ' ' ) + str ( canvas . getCoordX ( matrix , startX , startY ) ) ) + ',' ) + str ( canvas . getCoordY ( matrix , startX , startY ) ) ) + ' ' ) + str ( canvas . getCoordX ( matrix , endX , endY ) ) ) + ',' ) + str ( canvas . getCoordY ( matrix , endX , endY ) ) )