From c4e0e9dce5eca6b9100eb9507afef4d16dd0c5ff Mon Sep 17 00:00:00 2001 From: KoaQiu Date: Sun, 8 Oct 2023 15:23:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=AD=A3=E5=9C=A8=E7=BB=98?= =?UTF-8?q?=E5=88=B6=E8=87=AA=E5=AE=9A=E4=B9=89finderPatternImage=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=97=B6=E7=BB=98=E5=88=B6QuietZones?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E4=BD=8D=E7=BD=AE=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QRCoder/ArtQRCode.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/QRCoder/ArtQRCode.cs b/QRCoder/ArtQRCode.cs index c1964c93..7aa3335c 100644 --- a/QRCoder/ArtQRCode.cs +++ b/QRCoder/ArtQRCode.cs @@ -120,9 +120,10 @@ public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, if (finderPatternImage != null) { var finderPatternSize = 7 * pixelsPerModule; - graphics.DrawImage(finderPatternImage, new Rectangle(0, 0, finderPatternSize, finderPatternSize)); - graphics.DrawImage(finderPatternImage, new Rectangle(size - finderPatternSize, 0, finderPatternSize, finderPatternSize)); - graphics.DrawImage(finderPatternImage, new Rectangle(0, size - finderPatternSize, finderPatternSize, finderPatternSize)); + var finderPatternOffset = drawQuietZones ? 4 * pixelsPerModule : 0; + graphics.DrawImage(finderPatternImage, new Rectangle(finderPatternOffset, finderPatternOffset, finderPatternSize, finderPatternSize)); + graphics.DrawImage(finderPatternImage, new Rectangle(size - finderPatternOffset - finderPatternSize, finderPatternOffset, finderPatternSize, finderPatternSize)); + graphics.DrawImage(finderPatternImage, new Rectangle(finderPatternOffset, size - finderPatternOffset - finderPatternSize, finderPatternSize, finderPatternSize)); } graphics.Save(); }