Skip to content

Can only change outline if shape has been created with one #78

Open
@ventrue3000

Description

@ventrue3000

I've noticed that I can only change the colour or presence of the outline of a rectangle if it has been created with an outline right from the start. May apply to other shapes as well.

# This works

rect_with_outline = Rect(x=0, y=0, width=10, height=10, outline=0xFFFFFF) # White outline
rect_with_outline.outline = 0xFF0000                # Turns outline red

# These don't, but I would expect them to

rect_with_none = Rect(x=0, y=0, width=10, height=10, outline=None)     # Nothing to see here
rect_with_none.outline = 0xFF0000                   # Does nothing (Expectation: Turn outline red)

rect_with_nothing = Rect(x=0, y=0, width=10, height=10) # Nothing to see here
rect_with_nothing.outline = 0xFF0000                # Does nothing (Expectation: Turn outline red)

# This works around it 
# (baldengineer on Discord told me this, thanks!)

rect_with_workaround = Rect(x=0, y=0, width=10, height=10, outline=0xFFFFFF) # White outline
rect_with_workaround.outline = None                  # Removes outline
rect_with_workaround.outline = 0xFF0000              # Turns outline red

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