Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add ability to draw circle #24

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
Oct 22, 2019
Merged

Add ability to draw circle #24

merged 2 commits into from
Oct 22, 2019

Conversation

boo13
Copy link
Contributor

@boo13 boo13 commented Oct 22, 2019

Fixes #21

Long time listener/fan of Adafruit - first time contributor!

Based on code from here: https://github.com/adafruit/Adafruit_CircuitPython_SSD1306/blob/master/examples/ssd1306_bouncing_ball.py

I tested it using the above 'bouncing ball' example, but frankly could not figure out how to test this library change using the build tools yet.

Appreciate all of your hard work and any feedback!

PS - A special thank you to @kattni for the wonderful guide to contributing

@ladyada ladyada requested a review from makermelissa October 22, 2019 17:59
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.

Hi, thanks for adding this. The framebuf library will be mostly used on the Raspberry Pi side. I can go ahead and test it out on an eInk display for example. Looks like you need to wrap some text down for it to pass the through Travis. Thanks!

@@ -215,6 +215,32 @@ def vline(self, x, y, height, color):
"""Draw a vertical line up to a given length."""
self.rect(x, y, 1, height, color, fill=True)

def circle(self, center_x, center_y, radius, color):
"""Draw a circle at the given midpoint location, radius and color. The ```circle``` method draws only
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like this line is too long. Simple fix. Just take some of the text off the end and add it in front of the text on the line below.

@boo13
Copy link
Contributor Author

boo13 commented Oct 22, 2019

Thanks @makermelissa

I think that worked properly, if not, let me know.

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 on SSD1306 Bonnet and it draws a circle.

@makermelissa makermelissa merged commit c22eca9 into adafruit:master Oct 22, 2019
@makermelissa
Copy link
Collaborator

Thanks!

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 22, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.5.0 from 2.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#33 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#32 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#29 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_framebuf to 1.2.0 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#24 from boo13/draw-circle
  > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#23 from dherrada/master
  > Merge pull request adafruit/Adafruit_CircuitPython_framebuf#22 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_MCP9600
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.

Draw Circle and Ellipse
2 participants