Skip to content

Label.ShadowColor does not affect Label.StrokeText #943

Description

@Taschenbuch

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

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