From 31f78c772f26907097cb508d58d721c17127ae27 Mon Sep 17 00:00:00 2001 From: William Boxx Date: Wed, 13 Sep 2023 03:53:46 -0500 Subject: [PATCH] =?UTF-8?q?Fixed=20RenderModuleWidth()=20function=20to=20i?= =?UTF-8?q?nclude=20WideBarToNarrowBarWidth=E2=80=A6=20(#185)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed RenderModuleWidth() function to include WideBarToNarrowBarWidthRatio in return string. * Fixed unit tests for changes to ZplBarcode --- src/BinaryKits.Zpl.Label.UnitTest/BarcodeTest.cs | 6 +++--- src/BinaryKits.Zpl.Label/Elements/ZplBarcode.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BinaryKits.Zpl.Label.UnitTest/BarcodeTest.cs b/src/BinaryKits.Zpl.Label.UnitTest/BarcodeTest.cs index fc9ec80a..ff080acd 100644 --- a/src/BinaryKits.Zpl.Label.UnitTest/BarcodeTest.cs +++ b/src/BinaryKits.Zpl.Label.UnitTest/BarcodeTest.cs @@ -21,7 +21,7 @@ public void Barcode39() Debug.WriteLine(output); Assert.IsNotNull(output); - Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,100\n^BY2\n^B3N,N,100,Y,N\n^FD123ABC^FS\n^XZ", output); + Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,100\n^BY2,3\n^B3N,N,100,Y,N\n^FD123ABC^FS\n^XZ", output); } [TestMethod] @@ -37,7 +37,7 @@ public void Barcode128() Debug.WriteLine(output); Assert.IsNotNull(output); - Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2\n^BCN,100,Y,N\n^FD123ABC^FS\n^XZ", output); + Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2,3\n^BCN,100,Y,N\n^FD123ABC^FS\n^XZ", output); } [TestMethod] @@ -53,7 +53,7 @@ public void BarcodeEan13() Debug.WriteLine(output); Assert.IsNotNull(output); - Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2\n^BEN,100,Y,N\n^FD123456^FS\n^XZ", output); + Assert.AreEqual("^XA\n^LH0,0\n^CI28\n\n^FO100,300\n^BY2,3\n^BEN,100,Y,N\n^FD123456^FS\n^XZ", output); } } } diff --git a/src/BinaryKits.Zpl.Label/Elements/ZplBarcode.cs b/src/BinaryKits.Zpl.Label/Elements/ZplBarcode.cs index e78138de..6600f706 100644 --- a/src/BinaryKits.Zpl.Label/Elements/ZplBarcode.cs +++ b/src/BinaryKits.Zpl.Label/Elements/ZplBarcode.cs @@ -55,7 +55,7 @@ protected string RenderFieldOrientation() protected string RenderModuleWidth() { - return $"^BY{ModuleWidth}"; + return $"^BY{ModuleWidth},{WideBarToNarrowBarWidthRatio}"; } protected bool IsDigitsOnly(string text)