کشیدن نقاشی با توابع گرافیکی و ذخیره فایل
نکته شماره 13 :
public void Draw2File (){Bitmap bmp = new Bitmap (500, 400);Graphics gr = Graphics.FromImage (bmp);Rectangle rect = new Rectangle (20, 20, 450, 350);gr.DrawRectangle (Pens.Red, rect);gr.FillRectangle(Brushes.Pink, rect);gr.DrawString ("Salam", new Font ("Arial", 10), Brushes.Red, 50, 50);gr.DrawArc (Pens.Red, 30, 30, 60, 60, 0, 180);gr.DrawEllipse(new Pen(Color.Yellow, 3), new Rectangle(200, 100, 200, 200));"fontstyle2">٢٩bmp.Save ("C:\\1.bmp");bmp.Dispose ();gr.Dispose ();}
+ نوشته شده در دوشنبه هفتم خرداد ۱۳۹۷ ساعت 20:22 توسط محسن
|