Skip to content

Commit

Permalink
Set default to 1.0 in helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
codebude committed Apr 17, 2024
1 parent a53745c commit 8d7dde8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions QRCoder/ArtQRCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Bitmap GetGraphic(Bitmap backgroundImage = null)
/// <param name="backgroundImageStyle">Style of the background image (if set). Fill=spanning complete graphic; DataAreaOnly=Don't paint background into quietzone</param>
/// <param name="finderPatternImage">Optional image that should be used instead of the default finder patterns</param>
/// <returns>QRCode graphic as bitmap</returns>
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, Color backgroundColor, Bitmap backgroundImage = null, double pixelSizeFactor = 1.0,
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, Color backgroundColor, Bitmap backgroundImage = null, double pixelSizeFactor = 1,
bool drawQuietZones = true, QuietZoneStyle quietZoneRenderingStyle = QuietZoneStyle.Dotted,
BackgroundImageStyle backgroundImageStyle = BackgroundImageStyle.DataAreaOnly, Bitmap finderPatternImage = null)
{
Expand Down Expand Up @@ -283,7 +283,7 @@ public static class ArtQRCodeHelper
/// <param name="finderPatternImage">Optional image that should be used instead of the default finder patterns</param>
/// <returns>QRCode graphic as bitmap</returns>
public static Bitmap GetQRCode(string plainText, int pixelsPerModule, Color darkColor, Color lightColor, Color backgroundColor, ECCLevel eccLevel, bool forceUtf8 = false,
bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, Bitmap backgroundImage = null, double pixelSizeFactor = 0.8,
bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, Bitmap backgroundImage = null, double pixelSizeFactor = 1.0,
bool drawQuietZones = true, QuietZoneStyle quietZoneRenderingStyle = QuietZoneStyle.Flat,
BackgroundImageStyle backgroundImageStyle = BackgroundImageStyle.DataAreaOnly, Bitmap finderPatternImage = null)
{
Expand Down
5 changes: 3 additions & 2 deletions QRCoderTests/ArtQRCodeRendererTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Drawing;
using QRCoderTests.Helpers.XUnitExtenstions;
using QRCoderTests.Helpers;
using System.Drawing.Imaging;

namespace QRCoderTests
{
Expand Down Expand Up @@ -110,9 +111,9 @@ public void can_render_artqrcode_from_helper()
{
//Create QR code
var bmp = ArtQRCodeHelper.GetQRCode("A", 10, Color.Black, Color.White, Color.Transparent, QRCodeGenerator.ECCLevel.L);

((Bitmap)bmp.Clone()).Save("C:\\Users\\netbl\\Downloads\\art_new.png", ImageFormat.Png);
var result = HelperFunctions.BitmapToHash(bmp);
result.ShouldBe("6c1bb8257349b29f76e50c3fa8abd9c9");
result.ShouldBe("57ecaa9bdeadcdcbeac8a19d734907ff");
}
}
}
Expand Down

0 comments on commit 8d7dde8

Please sign in to comment.