using System; using System.Windows.Forms; using System.Drawing; using System.Drawing.Drawing2D; class Joonis3:Form{ protected override void OnPaint(PaintEventArgs e){ Graphics g=e.Graphics; g.SmoothingMode=SmoothingMode.AntiAlias; Pen p=new Pen(Color.Green, 5); Brush b=new LinearGradientBrush( new Rectangle(10, 10, 200, 200), Color.Red, Color.Yellow, LinearGradientMode.ForwardDiagonal ); g.FillRectangle(b, 40, 80, 200, 150); g.FillPie(b, 10, 10, 50, 50, 45, 90); Point[] pd={ //kolmnurk new Point(100, 10), new Point(50, 100), new Point(150, 100) }; g.DrawClosedCurve(p, pd); //kumer g.DrawString("Tere", new Font("Courier", 20), b, new PointF(150, 30)); b.Dispose(); p.Dispose(); } public static void Main(string[] arg){ Application.Run(new Joonis3()); } }