Shapes error in clue

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Teddygag
 
Posts: 15
Joined: Thu Feb 20, 2020 5:31 pm

Shapes error in clue

Post by Teddygag »

Can someone please help me. I ran the following code on the clue and got the error that the fill attribute is not right. Run it yourself to see the error. If you remove the fill=clue.RED, the program displays the pentagram.

Code: Select all


"""CLUE Polygon-BANNED"""
import board
from adafruit_clue import clue
from adafruit_display_shapes.polygon import Polygon
import displayio

display = board.DISPLAY

clue_group = displayio.Group(max_size=2)

a_polygon = Polygon([(119, 0), (233, 80), (191, 214), (48, 214), (6, 80), (119,0)], outline=clue.GREEN, fill=clue.RED)

clue_group.append(a_polygon)

while True:
    display.show(clue_group)


User avatar
adafruit_support_carter
 
Posts: 29483
Joined: Tue Nov 29, 2016 2:45 pm

Re: Shapes error in clue

Post by adafruit_support_carter »

The polygon shape only has an outline option:
https://github.com/adafruit/Adafruit_Ci ... gon.py#L58
so there is currently no fill option.

User avatar
Teddygag
 
Posts: 15
Joined: Thu Feb 20, 2020 5:31 pm

Re: Shapes error in clue

Post by Teddygag »

Thank you. I got this info from reading through the shapes library. I downloaded the raw files so I could scroll through them. That way I can get the parameters for a command. Evidently the fill attribute was never implemented. Strange as the rectangle, circle,triangle,rounded rectangle shapes do have the attribute.

Either way I am a user not a developer so I accept your answer as fact. Thank you.

Locked
Please be positive and constructive with your questions and comments.

Return to “CLUE Board”