internal override void Draw2DBarcode(IGraphicsRenderer g, float kx, float ky) { Brush light = Brushes.White; Brush dark = new SolidBrush(Color); GraphicsPath path = new GraphicsPath(); g.FillRectangle(light, 0, 0, matrix.Width * PixelSize * kx, matrix.Height * PixelSize * kx); for (int y = 0; y < matrix.Height; y++) { for (int x = 0; x < matrix.Width; x++) { if (matrix.get_Renamed(x, y) == 0) { path.AddRectangle(new RectangleF( x * PixelSize * kx, y * PixelSize * ky, PixelSize * kx, PixelSize * ky )); } } } if (path.PointCount > 0) { g.FillPath(dark, path); } }
internal override void Draw2DBarcode(IGraphicsRenderer g, float kx, float ky) { Brush light = Brushes.White; Brush dark = new SolidBrush(Color); GraphicsPath path = new GraphicsPath(); for (int y = 0; y < matrix.Height; y++) { for (int x = 0; x < matrix.Width; x++) { if (matrix.get_Renamed(x, y) == 0) { g.PathAddRectangle(path, new RectangleF( x * PixelSize * kx, y * PixelSize * ky, PixelSize * kx, PixelSize * ky )); } } } if (path.PointCount > 0) { g.FillPath(dark, path); if (text.StartsWith("SPC")) { ErrorCorrection = QRCodeErrorCorrection.M; } } dark.Dispose(); path.Dispose(); }