diff --git a/QrCodeGenerator/QrCode.cs b/QrCodeGenerator/QrCode.cs
index b6ec9d0..5b1c8ee 100644
--- a/QrCodeGenerator/QrCode.cs
+++ b/QrCodeGenerator/QrCode.cs
@@ -417,7 +417,7 @@ public string ToSvgString(int border, string foreground, string background)
}
///
- /// Creates a graphics of this QR code valid in SVG or XAML.
+ /// Creates a graphics path of this QR code valid in SVG or XAML.
///
/// The graphics path uses a coordinate system where each module is 1 unit wide and tall,
/// and the top left module is offset vertically and horizontally by border units.
@@ -428,7 +428,10 @@ public string ToSvgString(int border, string foreground, string background)
/// automatically derived, at least the right and bottom border will be missing.
///
///
- /// The path will look like this: M3,3h7v1h-7z M12,3h1v4h-1z ... M70,71h1v1h-1z
+ /// The path will look like this: M3,3h7v1h-7z M12,3h1v4h-1z ... M70,71h1v1h-1z. It
+ /// is valid for SVG (<path d="M3,3h..." />) and for XAML
+ /// (<Path Data="M3,3h..." />). For programmatic geometry creation in WPF see
+ /// Geometry.Parse(String).
///
///
/// The border width, as a factor of the module (QR code pixel) size
@@ -525,15 +528,17 @@ private static void ClearRectangle(bool[,] modules, int x, int y, int width, int
}
}
- // Create a copy of the modules
+ // Create a copy of the modules (in row-major order)
private bool[,] CopyModules()
{
var modules = new bool[Size, Size];
+ var index = 0;
for (var y = 0; y < Size; y++)
{
for (var x = 0; x < Size; x++)
{
- modules[y, x] = GetModule(x, y);
+ modules[y, x] = _modules[index];
+ index += 1;
}
}