Skip to content
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

Label.ShadowColor does not affect Label.StrokeText #943

Open
Taschenbuch opened this issue Mar 2, 2024 · 1 comment
Open

Label.ShadowColor does not affect Label.StrokeText #943

Taschenbuch opened this issue Mar 2, 2024 · 1 comment

Comments

@Taschenbuch
Copy link
Contributor

observed behavior:

Stroke color seems to be always Black even when Label.ShadowColor is set to Color.White.

expected behavior:

  • changing stroke color with Label.ShadowColor should be used as Stoke color (or even better: add something like Label.StrokeColor)
  • OR: update Description of StokeText and ShadowColor that they are not related.

Note from freesnow

I think technically the description on the property is just wrong. There doesn't appear to have ever been an attempt to actually have ShadowColor impact the stroke color.

var strokePreMultiplied = Color.Black * absoluteOpacity;

Examples:

with strokeText

new Label
{
    Text           = text,
    TextColor = Color.Black,
    StrokeText = true,
    ShadowColor = Color.White,
    AutoSizeHeight = true,
    AutoSizeWidth  = true,
    Parent         = parent
};

image

image

same without strokeText

new Label
{
    Text           = text,
    TextColor = Color.Black,
    AutoSizeHeight = true,
    AutoSizeWidth  = true,
    Parent         = parent
};

image

relevant discord chat

https://discord.com/channels/531175899588984842/536970543736291346/1213597398635520050

@dlamkins
Copy link
Member

dlamkins commented Mar 3, 2024

Note to self: Probably best to update the description and consider making a new property for the stroke color. Granted, they (stroke + shadow) should be mutually exclusive, so a shared property makes sense, but it is confusing. 🤔

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

2 participants