Skip to content

Commit 78d25fa

Browse files
authored
Merge pull request #532 from Shane32/remove_addquietzone
Remove AddQuietZone
2 parents e3664d1 + 18cbfb8 commit 78d25fa

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

QRCoder/QRCodeGenerator.ModulePlacer.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,6 @@ public partial class QRCodeGenerator
88
{
99
private static partial class ModulePlacer
1010
{
11-
/// <summary>
12-
/// Adds a quiet zone around the QR code. A quiet zone is a blank margin used to separate the QR code
13-
/// from other visual elements, improving scanner readability. This zone consists of white modules
14-
/// extending 4 modules wide around the existing QR code pattern.
15-
/// </summary>
16-
/// <param name="qrCode">The QR code data structure to modify.</param>
17-
public static void AddQuietZone(QRCodeData qrCode)
18-
{
19-
// Calculate the required length for a new quiet line, including existing modules plus 8 additional for the quiet zone.
20-
var quietLineLength = qrCode.ModuleMatrix.Count + 8;
21-
// Add four new lines at the top of the QR code matrix to create the upper part of the quiet zone.
22-
for (var i = 0; i < 4; i++)
23-
qrCode.ModuleMatrix.Insert(0, new BitArray(quietLineLength));
24-
// Add four new lines at the bottom of the QR code matrix to create the lower part of the quiet zone.
25-
for (var i = 0; i < 4; i++)
26-
qrCode.ModuleMatrix.Add(new BitArray(quietLineLength));
27-
// Expand each line of the QR code matrix sideways by 4 modules on each side to complete the quiet zone.
28-
for (var i = 4; i < qrCode.ModuleMatrix.Count - 4; i++)
29-
{
30-
qrCode.ModuleMatrix[i].Length += 8;
31-
ShiftAwayFromBit0(qrCode.ModuleMatrix[i], 4);
32-
}
33-
}
34-
3511
/// <summary>
3612
/// Places the version information on the QR code matrix for versions 7 and higher. Version information
3713
/// is encoded into two small rectangular areas near the bottom left and top right corners outside the timing patterns.

0 commit comments

Comments
 (0)