Skip to content

adafruit_display_shapes.arc outline vs. display rotation #77

@dmca-glasgow

Description

@dmca-glasgow

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:

import displayio
from adafruit_display_shapes.arc import Arc

volumeGauge = displayio.Group()
foreColour = 0xff5400
bgColour = 0x2a2a2a
resolution = 25

for n in range(resolution):
  angle = 270 / resolution
  direction = 180 + 45 - (angle * n)
  segment = Arc(
    x = 120,
    y = 120,
    radius = 116,
    arc_width = 8,
    segments = 25,
    angle = angle,
    direction = direction - (angle / 2),
    fill = bgColour,
    outline = 0x000000,
  )
  volumeGauge.append(segment)

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):

PXL_20241127_110404491

but when used along with board.DISPLAY.rotation = 180, the outline doesn't seem to line up with the filled arc:

PXL_20241127_110333222

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions