diff --git a/Clients/WindowsFormsDemo/EncodingOptionsForm.cs b/Clients/WindowsFormsDemo/EncodingOptionsForm.cs index 3e80f9ef..cb6e2b26 100644 --- a/Clients/WindowsFormsDemo/EncodingOptionsForm.cs +++ b/Clients/WindowsFormsDemo/EncodingOptionsForm.cs @@ -48,6 +48,7 @@ public EncodingOptionsForm() cmbRenderer.Items.Add(typeof(BitmapRenderer)); cmbRenderer.Items.Add(typeof(CustomBitmapRenderer)); + cmbRenderer.Items.Add(typeof(AlternateBitmapRenderer)); cmbRenderer.SelectedItem = typeof(BitmapRenderer); } } diff --git a/Source/Bindings/ZXing.CoreCompat.System.Drawing/Rendering/BitmapRenderer.cs b/Source/Bindings/ZXing.CoreCompat.System.Drawing/Rendering/BitmapRenderer.cs index 4de26e66..c6b3e3c6 100644 --- a/Source/Bindings/ZXing.CoreCompat.System.Drawing/Rendering/BitmapRenderer.cs +++ b/Source/Bindings/ZXing.CoreCompat.System.Drawing/Rendering/BitmapRenderer.cs @@ -209,7 +209,7 @@ public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string content, Enc { var textAreaHeight = font.Height; - emptyArea = height + 10 > textAreaHeight ? textAreaHeight : 0; + emptyArea = height > textAreaHeight ? textAreaHeight : 0; if (emptyArea > 0) { diff --git a/Source/Bindings/ZXing.Eto.Forms/Rendering/BitmapRenderer.cs b/Source/Bindings/ZXing.Eto.Forms/Rendering/BitmapRenderer.cs index f3fc974a..4054a5a9 100644 --- a/Source/Bindings/ZXing.Eto.Forms/Rendering/BitmapRenderer.cs +++ b/Source/Bindings/ZXing.Eto.Forms/Rendering/BitmapRenderer.cs @@ -139,7 +139,7 @@ public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string content, Enc { var textAreaHeight = (int)font.LineHeight; - emptyArea = height + 10 > textAreaHeight ? textAreaHeight : 0; + emptyArea = height > textAreaHeight ? textAreaHeight : 0; } // output content text below the barcode diff --git a/Source/Bindings/ZXing.SkiaSharp/Renderer/SKBitmapRenderer.cs b/Source/Bindings/ZXing.SkiaSharp/Renderer/SKBitmapRenderer.cs index e142341f..eec9912b 100644 --- a/Source/Bindings/ZXing.SkiaSharp/Renderer/SKBitmapRenderer.cs +++ b/Source/Bindings/ZXing.SkiaSharp/Renderer/SKBitmapRenderer.cs @@ -145,7 +145,7 @@ public SKBitmap Render(BitMatrix matrix, BarcodeFormat format, string content, E var backcolor = (uint) Background; var textAreaHeight = (int) (TextSize < 1 ? 10 : TextSize); - emptyArea = outputContent && height + 10 > textAreaHeight ? textAreaHeight : 0; + emptyArea = outputContent && height > textAreaHeight ? textAreaHeight : 0; for (int y = 0; y < matrix.Height - emptyArea; y++) { diff --git a/Source/Bindings/ZXing.Windows.Compatibility/Rendering/BitmapRenderer.cs b/Source/Bindings/ZXing.Windows.Compatibility/Rendering/BitmapRenderer.cs index 4df7a948..fe6969d5 100644 --- a/Source/Bindings/ZXing.Windows.Compatibility/Rendering/BitmapRenderer.cs +++ b/Source/Bindings/ZXing.Windows.Compatibility/Rendering/BitmapRenderer.cs @@ -209,7 +209,7 @@ virtual public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string cont { var textAreaHeight = font.Height; - emptyArea = height + 10 > textAreaHeight ? textAreaHeight : 0; + emptyArea = height > textAreaHeight ? textAreaHeight : 0; if (emptyArea > 0) { diff --git a/Source/Bindings/ZXing.ZKWeb.System.Drawing/Rendering/BitmapRenderer.cs b/Source/Bindings/ZXing.ZKWeb.System.Drawing/Rendering/BitmapRenderer.cs index 98b20360..669dac76 100644 --- a/Source/Bindings/ZXing.ZKWeb.System.Drawing/Rendering/BitmapRenderer.cs +++ b/Source/Bindings/ZXing.ZKWeb.System.Drawing/Rendering/BitmapRenderer.cs @@ -208,7 +208,7 @@ public System.DrawingCore.Bitmap Render(BitMatrix matrix, BarcodeFormat format, { var textAreaHeight = font.Height; - emptyArea = height + 10 > textAreaHeight ? textAreaHeight : 0; + emptyArea = height > textAreaHeight ? textAreaHeight : 0; if (emptyArea > 0) { diff --git a/Source/lib/renderer/BitmapRenderer.cs b/Source/lib/renderer/BitmapRenderer.cs index 1f735b06..615c94c5 100644 --- a/Source/lib/renderer/BitmapRenderer.cs +++ b/Source/lib/renderer/BitmapRenderer.cs @@ -227,7 +227,7 @@ virtual public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string cont var textAreaHeight = font.Height; #endif - emptyArea = height + 10 > textAreaHeight ? textAreaHeight : 0; + emptyArea = height > textAreaHeight ? textAreaHeight : 0; if (emptyArea > 0) {