Skip to content

allow stroke parameter for Circle() #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2020

Conversation

FoamyGuy
Copy link

Circle is extending RoundRect which already has support for stroke. It wasn't being accepted as a parameter on Circle __init__() however so it was not working with Circle.

This change accepts stroke with a default of 1 and passes it through to the super class RoundRect constructor.

circle = Circle(100, 100, 20, fill=0x00FF00, outline=0xFF00FF, stroke=5)

@FoamyGuy
Copy link
Author

There were some pylint failures related to newer versions of pylint I think that came up in the actions for this PR some of them are unrelated to the changes I've made but I did go ahead and resolve them.

polygon.py and triangle.py already disable invalid-name in order to use names like x0, y0 etc...I've disabled it in line and circle as well in order to resolve the issue in those classes.

circle and line both have super classes that provide the public methods that do things.

If there is a more preferred way to handle any of these let me know and I can make a change to it.

@FoamyGuy FoamyGuy requested a review from a team June 27, 2020 21:59
@ladyada
Copy link
Member

ladyada commented Jun 28, 2020

@makermelissa maybe try it out next week?

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works. Thanks

@makermelissa makermelissa merged commit ea0faca into adafruit:master Jul 1, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 2, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX31855 to 3.2.2 from 3.2.1:
  > Fix discord badge

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1305 to 1.3.1 from 1.3.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1305#10 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_TSL2561 to 3.3.2 from 3.3.1:
  > Fix discord badge

Updating https://github.com/adafruit/Adafruit_CircuitPython_Debouncer to 1.3.4 from 1.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Debouncer#20 from jepler/fix-formatting

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes to 1.4.0 from 1.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Shapes#15 from FoamyGuy/support_stroke_on_circle

Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 4.1.3 from 4.1.2:
  > Pass in descriptor in documentation

Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 0.11.2 from 0.11.1:
  > Link to learn guide page about bitmaps

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_BH1750
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants