add visual feedback

This commit is contained in:
clowwindy
2015-01-12 02:44:24 +08:00
parent e878b41519
commit de0f752cc8
4 changed files with 38 additions and 5 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ namespace Shadowsocks.View
string qrText = ssconfig;
QRCode code = ZXing.QrCode.Internal.Encoder.encode(qrText, ErrorCorrectionLevel.M);
ByteMatrix m = code.Matrix;
int blockSize = Math.Max(200 / m.Height, 1);
int blockSize = Math.Max(pictureBox1.Height / m.Height, 1);
Bitmap drawArea = new Bitmap((m.Width * blockSize), (m.Height * blockSize));
using (Graphics g = Graphics.FromImage(drawArea))
{