From 1db2e55b2b96d76cc57283d2f8dc8c085e69a7fb Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Mon, 28 Feb 2022 01:25:55 +0100 Subject: [PATCH] added line spacing --- Instructions/TextInstruction.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Instructions/TextInstruction.cs b/Instructions/TextInstruction.cs index 2bb9fc7..632045b 100644 --- a/Instructions/TextInstruction.cs +++ b/Instructions/TextInstruction.cs @@ -15,7 +15,7 @@ public class TextInstruction : BaseInstruction public bool doubleHeight {get; set; } = false; public bool doubleWidth {get; set; } = false; public bool fontB {get; set; } = false; - + public int lineSpacing {get; set; } = -1; public bool newLine { get; set; } = true; @@ -27,6 +27,10 @@ public class TextInstruction : BaseInstruction commands.AddRange(setStyles()); + if (lineSpacing >= 0){ + commands.Add(e.SetLineSpacingInDots(lineSpacing)); + } + if (newLine) { commands.Add(e.PrintLine(text)); @@ -40,6 +44,10 @@ public class TextInstruction : BaseInstruction commands.Add(e.SetStyles(PrintStyle.None)); } + if (lineSpacing >= 0){ + commands.Add(e.ResetLineSpacing()); + } + return commands; }