瀏覽代碼

Add units to row spacing (#711)

This brings it in line with column spacing and allows the user to specify row spacing in units other than points.
Stephen Clarke 2 年之前
父節點
當前提交
97153ad83d
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Source/QuestPDF/Fluent/RowExtensions.cs

+ 3 - 3
Source/QuestPDF/Fluent/RowExtensions.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using QuestPDF.Drawing.Exceptions;
 using QuestPDF.Elements;
 using QuestPDF.Infrastructure;
@@ -12,9 +12,9 @@ namespace QuestPDF.Fluent
         /// <summary>
         /// Adjusts horizontal spacing between items.
         /// </summary>
-        public void Spacing(float value)
+        public void Spacing(float value, Unit unit = Unit.Point)
         {
-            Row.Spacing = value;
+            Row.Spacing = value.ToPoints(unit);
         }
 
         private IContainer Item(RowItemType type, float size = 0)