Browse Source

Fixed: the Line element is drawn in the incorrect place #1213

Marcin Ziąbek 9 months ago
parent
commit
e06bc03311
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/QuestPDF/Elements/Line.cs

+ 2 - 2
Source/QuestPDF/Elements/Line.cs

@@ -56,11 +56,11 @@ namespace QuestPDF.Elements
             
             if (Type == LineType.Vertical)
             {
-                Canvas.DrawFilledRectangle(new Position(-Thickness/2, 0), new Size(Thickness, availableSpace.Height), Color);
+                Canvas.DrawFilledRectangle(Position.Zero, new Size(Thickness, availableSpace.Height), Color);
             }
             else if (Type == LineType.Horizontal)
             {
-                Canvas.DrawFilledRectangle(new Position(0, -Thickness/2), new Size(availableSpace.Width, Thickness), Color);
+                Canvas.DrawFilledRectangle(Position.Zero, new Size(availableSpace.Width, Thickness), Color);
             }
             
             IsRendered = true;