|||
C#做绘图软件时怎样保存PictureBox中用graphics画的图
Graphics.FromImage(pictureBox1.Image).DrawEllipse(new Pen(Brushes.Red), e.X, e.Y, 1, 1);
pictureBox1.Invalidate();
或者
Graphics g = Graphics.FromImage(pictureBox1.Image);
g.DrawRectangle(new Pen(Color.Red, 2), leftEgdeOfRetina, topEdgeOfRetina, rightEdgeOfRetina - leftEgdeOfRetina, bottomEdgeOfRetina - topEdgeOfRetina);
pictureBox1.Invalidate();
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-11 01:42
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社