||
/////////////////////////动态创建bmp模板,后将pictureBox1背景颜色设置为白色//////////////////////////////////////////////////
Bitmap bmpT = new Bitmap(dtW * (nodeTotalNum - subNodeNum), 400);
this.pictureBox1.Image = bmpT;
this.pictureBox1.Refresh();
////////////////////////在image上画图///////////////////////////////////////////////////
Graphics gh = Graphics.FromImage(this.pictureBox1.Image);
gh.FillPie(Brushes.Black, new Rectangle(x ,y, nodeW, nodeW), 0, 360);
///////////////////////////////////////////////////////////////////////////
saveFileDialog1.Filter = "*.bmp|*.bmp";
if (this.saveFileDialog1.ShowDialog() == DialogResult.OK)
{
Bitmap bmp = new Bitmap(this.pictureBox1.Image);
bmp.Save(this.saveFileDialog1.FileName);
bmp.Dispose();
}
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-25 12:31
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社