added line spacing

This commit is contained in:
Djeeberjr 2022-02-28 01:25:55 +01:00
parent 1c5f46b94b
commit 1db2e55b2b

View File

@ -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;
}