Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions QRCoder/QRCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor,
using (var lightBrush = new SolidBrush(lightColor))
using (var darkBrush = new SolidBrush(darkColor))
{
gfx.FillRectangle(lightBrush, new Rectangle(0, 0, bmp.Width, bmp.Height));
for (var x = 0; x < size + offset; x += pixelsPerModule)
{
for (var y = 0; y < size + offset; y += pixelsPerModule)
Expand All @@ -72,10 +73,6 @@ public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor,
{
gfx.FillRectangle(darkBrush, new Rectangle(x - offset, y - offset, pixelsPerModule, pixelsPerModule));
}
else
{
gfx.FillRectangle(lightBrush, new Rectangle(x - offset, y - offset, pixelsPerModule, pixelsPerModule));
}
}
}

Expand Down