Skip to content

Commit

Permalink
Merge pull request #7350 from Gillibald/fixes/TextBoxTextAlignment
Browse files Browse the repository at this point in the history
Fix Skia FormattedTextImpl text alignment
  • Loading branch information
Gillibald authored and maxkatz6 committed Jan 18, 2022
1 parent 9aeed58 commit c04f906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Skia/Avalonia.Skia/FormattedTextImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ internal void Draw(DrawingContextImpl context,
{
AvaloniaFormattedTextLine line = _skiaLines[c];

float x = TransformX(origin.X, 0, paint.TextAlign);
float x = TransformX(origin.X, line.Width, paint.TextAlign);

if (!hasCusomFGBrushes)
{
Expand Down

0 comments on commit c04f906

Please sign in to comment.