Skip to content

Add displayio.Shape#1472

Merged
dhalbert merged 8 commits into
adafruit:masterfrom
tannewt:shape
Jan 15, 2019
Merged

Add displayio.Shape#1472
dhalbert merged 8 commits into
adafruit:masterfrom
tannewt:shape

Conversation

@tannewt
Copy link
Copy Markdown
Member

@tannewt tannewt commented Jan 15, 2019

displayio.Shape is a subclassable class that stores shapes by storing boundaries of the shape for each row of pixels. It also allows for mirroring to save memory.

Most of the changes are to enable subclassing native classes which take keyword args. To do so, the signature of make_new changed to take a separate kw_arg map. The basic argument checking changed as a result as well.

FourWire and Group now handle accepting subclasses as well by calling mp_instance_cast_to_native_base to get the native root object.

@tannewt tannewt added this to the 4.0.0 - Bluetooth milestone Jan 15, 2019
@tannewt tannewt requested a review from dhalbert January 15, 2019 18:29
Copy link
Copy Markdown
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

This is fantastic!

@dhalbert dhalbert merged commit 7659648 into adafruit:master Jan 15, 2019
@jepler jepler mentioned this pull request Oct 14, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants