Browse Source

Added the SkParagraphBuilder.Reset API

Marcin Ziąbek 1 year ago
parent
commit
96ade3434b
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Source/QuestPDF/Skia/Text/SkParagraphBuilder.cs

+ 8 - 0
Source/QuestPDF/Skia/Text/SkParagraphBuilder.cs

@@ -113,6 +113,11 @@ internal sealed class SkParagraphBuilder : IDisposable
         return new SkParagraph(instance);
     }
     
+    public void Reset()
+    {
+        API.paragraph_builder_reset(Instance);
+    }
+    
     ~SkParagraphBuilder()
     {
         Dispose();
@@ -141,6 +146,9 @@ internal sealed class SkParagraphBuilder : IDisposable
         [DllImport(SkiaAPI.LibraryName)]
         public static extern IntPtr paragraph_builder_create_paragraph(IntPtr paragraphBuilder);
         
+        [DllImport(SkiaAPI.LibraryName)]
+        public static extern void paragraph_builder_reset(IntPtr paragraphBuilder);
+        
         [DllImport(SkiaAPI.LibraryName)]
         public static extern void paragraph_builder_delete(IntPtr paragraphBuilder);
     }