Skip to content

Commit

Permalink
Added arc/fill_arc to python client
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAMan committed Nov 14, 2016
1 parent da70749 commit db18015
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion clients/python/debug_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
try:
xrange
except NameError:
xrange = range
# python 3-to-2 compatibility
xrange = range #pylint: disable=redefined-builtin, invalid-name

Color = collections.namedtuple('Color', 'r g b')

Expand Down Expand Up @@ -120,6 +121,20 @@ def fill_circle(self, x0, y0, r0, color): #pylint: disable=invalid-name
'''
self.__send_command('fill_circle', color, args=(x0, y0, r0))

def arc(self, x0, y0, r0, start_angle, arc_angle, color): #pylint: disable=invalid-name, too-many-arguments
'''
Draws an arc at (x0, y0) with radius "r0" and color "color", starting at "start_angle"
and extending for "arc_angle" radians
'''
self.__send_command('arc', color, args=(x0, y0, r0, start_angle, arc_angle))

def fill_arc(self, x0, y0, r0, start_angle, arc_angle, color): #pylint: disable=invalid-name, too-many-arguments
'''
Draws a filled arc (sector) at (x0, y0) with radius "r0" and color "color", starting at
"start_angle" and extending for "arc_angle" radians
'''
self.__send_command('fill_arc', color, args=(x0, y0, r0, start_angle, arc_angle))

def rect(self, x0, y0, x1, y1, color): #pylint: disable=invalid-name, too-many-arguments
'''
Draws a non-filled rect with top-left at (x0, y0) and bottom-right at (x1, y1)
Expand Down

0 comments on commit db18015

Please sign in to comment.