Browse Source

Fixed: the Decoration element is not aligned to right when in RTL mode

MarcinZiabek 3 years ago
parent
commit
2a0e91af68
1 changed files with 1 additions and 1 deletions
  1. 1 1
      QuestPDF/Elements/Decoration.cs

+ 1 - 1
QuestPDF/Elements/Decoration.cs

@@ -68,7 +68,7 @@ namespace QuestPDF.Elements
                 
                 var offset = ContentDirection == ContentDirection.LeftToRight
                     ? command.Offset
-                    : new Position(availableSpace.Width - command.Offset.X - command.Measurement.Width, command.Offset.Y);
+                    : new Position(availableSpace.Width - width, command.Offset.Y);
                 
                 Canvas.Translate(offset);
                 command.Element.Draw(elementSize);