Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ventrue3000 opened this issue Jan 16, 2025 · 0 comments
Open

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

ventrue3000 opened this issue Jan 16, 2025 · 0 comments

Comments

@ventrue3000
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant