Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def stroke_arcs(self, x, y, radius, start_angle, end_angle, anticlockwise=False):
"""Draw an arc outlines centered at ``(x, y)`` with a radius of ``radius``.
Where ``x``, ``y``, ``radius`` and other arguments are NumPy arrays, lists or scalar values.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(radius, args, buffers)
populate_args(start_angle, args, buffers)
populate_args(end_angle, args, buffers)
args.append(anticlockwise)
self._send_canvas_command('strokeArcs', args, buffers)
def stroke_rects(self, x, y, width, height=None):
"""Draw a rectangular outlines of sizes ``(width, height)`` at the ``(x, y)`` positions.
Where ``x``, ``y``, ``width`` and ``height`` arguments are NumPy arrays, lists or scalar values.
If ``height`` is None, it is set to the same value as width.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(width, args, buffers)
if height is None:
args.append(args[-1])
else:
populate_args(height, args, buffers)
self._send_canvas_command('strokeRects', args, buffers)
"""Draw filled rectangles of sizes ``(width, height)`` at the ``(x, y)`` positions.
Where ``x``, ``y``, ``width`` and ``height`` arguments are NumPy arrays, lists or scalar values.
If ``height`` is None, it is set to the same value as width.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(width, args, buffers)
if height is None:
args.append(args[-1])
else:
populate_args(height, args, buffers)
self._send_canvas_command('fillRects', args, buffers)
def fill_arcs(self, x, y, radius, start_angle, end_angle, anticlockwise=False):
"""Draw filled arcs centered at ``(x, y)`` with a radius of ``radius``.
Where ``x``, ``y``, ``radius`` and other arguments are NumPy arrays, lists or scalar values.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(radius, args, buffers)
populate_args(start_angle, args, buffers)
populate_args(end_angle, args, buffers)
args.append(anticlockwise)
self._send_canvas_command('fillArcs', args, buffers)
def stroke_arcs(self, x, y, radius, start_angle, end_angle, anticlockwise=False):
"""Draw an arc outlines centered at ``(x, y)`` with a radius of ``radius``.
Where ``x``, ``y``, ``radius`` and other arguments are NumPy arrays, lists or scalar values.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(radius, args, buffers)
populate_args(start_angle, args, buffers)
populate_args(end_angle, args, buffers)
args.append(anticlockwise)
self._send_canvas_command('strokeArcs', args, buffers)
def fill_rects(self, x, y, width, height=None):
"""Draw filled rectangles of sizes ``(width, height)`` at the ``(x, y)`` positions.
Where ``x``, ``y``, ``width`` and ``height`` arguments are NumPy arrays, lists or scalar values.
If ``height`` is None, it is set to the same value as width.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(width, args, buffers)
if height is None:
args.append(args[-1])
else:
populate_args(height, args, buffers)
self._send_canvas_command('fillRects', args, buffers)
def fill_arcs(self, x, y, radius, start_angle, end_angle, anticlockwise=False):
"""Draw filled arcs centered at ``(x, y)`` with a radius of ``radius``.
Where ``x``, ``y``, ``radius`` and other arguments are NumPy arrays, lists or scalar values.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(radius, args, buffers)
populate_args(start_angle, args, buffers)
populate_args(end_angle, args, buffers)
args.append(anticlockwise)
self._send_canvas_command('fillArcs', args, buffers)
def fill_arcs(self, x, y, radius, start_angle, end_angle, anticlockwise=False):
"""Draw filled arcs centered at ``(x, y)`` with a radius of ``radius``.
Where ``x``, ``y``, ``radius`` and other arguments are NumPy arrays, lists or scalar values.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(radius, args, buffers)
populate_args(start_angle, args, buffers)
populate_args(end_angle, args, buffers)
args.append(anticlockwise)
self._send_canvas_command('fillArcs', args, buffers)
def fill_rects(self, x, y, width, height=None):
"""Draw filled rectangles of sizes ``(width, height)`` at the ``(x, y)`` positions.
Where ``x``, ``y``, ``width`` and ``height`` arguments are NumPy arrays, lists or scalar values.
If ``height`` is None, it is set to the same value as width.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(width, args, buffers)
if height is None:
args.append(args[-1])
else:
populate_args(height, args, buffers)
self._send_canvas_command('fillRects', args, buffers)
def fill_rects(self, x, y, width, height=None):
"""Draw filled rectangles of sizes ``(width, height)`` at the ``(x, y)`` positions.
Where ``x``, ``y``, ``width`` and ``height`` arguments are NumPy arrays, lists or scalar values.
If ``height`` is None, it is set to the same value as width.
"""
args = []
buffers = []
populate_args(x, args, buffers)
populate_args(y, args, buffers)
populate_args(width, args, buffers)
if height is None:
args.append(args[-1])
else:
populate_args(height, args, buffers)
self._send_canvas_command('fillRects', args, buffers)