Skip to content

LabelStyle: improve horizontal alignment for multiline strings#4045

Merged
swharden merged 2 commits intomainfrom
3859
Jul 5, 2024
Merged

LabelStyle: improve horizontal alignment for multiline strings#4045
swharden merged 2 commits intomainfrom
3859

Conversation

@swharden
Copy link
Member

@swharden swharden commented Jul 5, 2024

Plot plot = new();

var txt1 = plot.Add.Text($"aaa\nbbbbbbbbbbb\nccc", 0, 0);
txt1.Alignment = Alignment.MiddleLeft;
txt1.LabelBackgroundColor = Colors.SkyBlue;


var txt2 = plot.Add.Text($"aaa\nbbbbbbbbbbb\nccc", 1, 1);
txt2.Alignment = Alignment.MiddleCenter;
txt2.LabelBackgroundColor = Colors.SkyBlue;


var txt3 = plot.Add.Text($"aaa\nbbbbbbbbbbb\nccc", 2, 2);
txt3.Alignment = Alignment.MiddleRight;
txt3.LabelBackgroundColor = Colors.SkyBlue;

image

@swharden swharden merged commit 430217d into main Jul 5, 2024
@swharden swharden deleted the 3859 branch July 5, 2024 21:12
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

Successfully merging this pull request may close these issues.

Label: multiline labels with nonstandard internal text alignment throws exception Label: incorrect horizontal alignment for multiline strings

1 participant