System.Drawing namespace (beginner)

            Bitmap b = new Bitmap (600,600) ; // create a bitmap of FIG aspect 500; </br>
            Graphics Graphics.FromImage G = (B); // a GDI + drawing surface, which is defined as the bitmap format;
            G .Clear (Color.Red); // clear the entire graphics plane, and filled with a specified color;
            Pen Pen new new = P (Color.green, 3.0f); // Create a pencil;
            g.drawLine (P, 0,0,600,600) ; // draw a line structure connecting the two points;
            g.DrawEllipse (P, 0,0,100,100); // draw an ellipse
            SolidBrush sb = new SolidBrush (Color.Blue) ; // create a solid brush;
            g.FillEllipse (sb, 100, 100, 200 , 200); // filled ellipse defined inside;
            g.FillRectangle (SB, 300, 300, 100, 100); // filled inside the rectangle defined;
            the Font new new F = the Font ( "Arial", 20); // Font
            g.drawString ( "! hum ha Hey", F, SB, 0,200);
            point [] = new new arRP point [. 5]; // as the basic point point
            arRP [0] = new new Point (200 is, 200 is);
            arRP [. 1] = new new Point (200,400);
            arRP [2] = new new Point (500, 400);
            arRP [. 3] = new new Point (500,600);
            arRP [ . 4] = new new Point (300, 600);
            g.DrawPolygon (P, arRP); // draw a set of structures defined by the point of the polygon
            b.Save (Response.OutputStream, 
          System.Drawing.Imaging.ImageFormat.Gif);
Published 10 original articles · won praise 0 · views 10000 +

Guess you like

Origin blog.csdn.net/lwbsleep/article/details/7066738