Skip to content

Fill for polygons #63

Closed
Closed
@dclaar

Description

@dclaar

Please add a fill option for polygons. See also: https://forums.adafruit.com/viewtopic.php?t=205093

Unlike other classes in this library, polygon.py does not have a fill option.

It has this option that I don't really understand:

   :param int colors: (Optional) Number of colors to use. Most polygons would use two, one for
                    outline and one for fill. If you're not filling your polygon, set this to 1
                    for smaller memory footprint. (2)

But there's no way to select that second color. Setting this value to either 1 or 2 does not appear to make any difference at all!

It would be great if it supported all of the "standard" params (meaning what the others support):

    :param int|None fill: The color to fill the rectangle. Can be a hex value for a color or
                    ``None`` for transparent.
    :param int|None outline: The outline of the rectangle. Can be a hex value for a color or
                    ``None`` for no outline.
    :param int stroke: Used for the outline. Will not change the outer bound size set by ``width``
                    and ``height``.

I suppose it's a bit tricky for an arbitrary shape though.

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