Bitmap b = new Bitmap(BarString.Length, _Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
string xs = ""; char[] cs = BarString.ToCharArray();
for (int i = 0; i < cs.Length; i++)
{
xs = i.ToString();
for (int j = 0; j < _Height; j++)
{
if (cs[i] == 'b')
{
b.SetPixel(i, j, Color.Black); } else
{ b.SetPixel(i, j, Color.White); } }
}
Font ft1 = new System.Drawing.Font("Times New Roman", 18, FontStyle.Regular, GraphicsUnit.World);
Graphics g = Graphics.FromImage(b);
g.DrawString(strValues, ft1, System.Drawing.Brushes.Black, 70, 140);//strValues为输入的一条数字条形码已经画出来了,就是想在条形码下面加一条数字
这样加为什么不行呢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货