diff --git a/adafruit_display_shapes/rect.py b/adafruit_display_shapes/rect.py old mode 100644 new mode 100755 index 951552a..f68debc --- a/adafruit_display_shapes/rect.py +++ b/adafruit_display_shapes/rect.py @@ -78,7 +78,10 @@ def __init__(self, x, y, width, height, *, fill=None, outline=None, stroke=1): self._palette[0] = fill else: self._palette.make_transparent(0) - super().__init__(self._bitmap, pixel_shader=self._palette, position=(x, y)) + try: + super().__init__(self._bitmap, pixel_shader=self._palette, position=(x, y)) + except TypeError: + super().__init__(self._bitmap, pixel_shader=self._palette, x=x, y=y) @property def fill(self): diff --git a/adafruit_display_shapes/roundrect.py b/adafruit_display_shapes/roundrect.py old mode 100644 new mode 100755 index 9c3c4d6..0d51be0 --- a/adafruit_display_shapes/roundrect.py +++ b/adafruit_display_shapes/roundrect.py @@ -90,7 +90,10 @@ def __init__(self, x, y, width, height, r, *, fill=None, outline=None, stroke=1) # draw round corners self._helper(r, r, r, color=1, stroke=stroke, x_offset=width-2*r-1, y_offset=height-2*r-1) - super().__init__(self._bitmap, pixel_shader=self._palette, position=(x, y)) + try: + super().__init__(self._bitmap, pixel_shader=self._palette, position=(x, y)) + except TypeError: + super().__init__(self._bitmap, pixel_shader=self._palette, x=x, y=y) # pylint: disable=invalid-name, too-many-locals, too-many-branches def _helper(self, x0, y0, r, *, color, x_offset=0, y_offset=0,