-
Notifications
You must be signed in to change notification settings - Fork 18
adafruit_display_shapes.arc outline vs. display rotation #77
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
Comments
I moved this to https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes because the bundle is just the grouping of all of the libraries. Display_Shapes is the one that contains Arc which you are experiencing this issue with. However ultimately this may be down to a difference in the way that rotation is treated by core @dmca-glasgow as a work around in the shorter term: Since you're using the outline mostly to draw "emptiness" between the segments of Arc maybe instead of relying on |
Thanks @FoamyGuy, I learned how to get up and running from your YouTube video :) |
@dmca-glasgow Nice! I'm glad to hear it! I confirmed this behavior on a PyPortal. It feels like a potential core bug since I would expect the rotations to not really effect the actual pixels that end up being drawn. My best guess is maybe there is some math involved with the rotation that is suffering from rounding causing it to drift by an amount that becomes noticeable as individual pixels. But that is just an uncertain hunch. |
I think that I have narrowed this down further to technically an issue with
When rotation is 0 there is a 1px gap between the yellow square and the red Arc segment. When rotation is So the vectorio.Polygon is off by 1px from where it is positioned in the different orientations. This might actually be the same root cause as: adafruit/circuitpython#8742 |
@dmca-glasgow this was indeed the same root cause as the core issue #8742. I went down the If you get the "absolute newest" firmware build from S3 for your device it should have the fix in it. Or if you wait a bit eventually there will be more official pre-release build that contains it. Since that fix is merged I'm going to close this. Let me know if you have any trouble if you get a chance to try it out. |
Thanks @FoamyGuy 👍 I'm currently stuck on a different problem if you have any advice! |
Hi there,
I've had a great couple of days experimenting with python (JavaScript dev here), CircuitPython and an M5Dial. Thanks for a great open source ecosystem.
Using the following code:
I've noticed a difference in the rendering of
outline
depending on the display rotation.It looks as expected when rotation is set to
0
(outline is creating the thin black tick marks on the gauge):but when used along with
board.DISPLAY.rotation = 180
, the outline doesn't seem to line up with the filled arc:Thanks.
The text was updated successfully, but these errors were encountered: