Draw colorful Pentagram

Source: Internet
Author: User

using(Graphics graphics = This. CreateGraphics ()) {graphics.                  Clear (Color.White); Point[] Points= {//Clockwise Point coordinates                                 NewPoint ( the,0),NewPoint ( -, -),                                  NewPoint ( the, -),NewPoint ( the, -),                                 NewPoint ( the, the),NewPoint ( the, -),                                  NewPoint ( -, the),NewPoint ( -, -),                                  NewPoint (0, -),NewPoint ( -, -),                                 NewPoint ( the,0)  }; //Create PathGraphicsPath Path =NewGraphicsPath (); //add a line in a pathpath.                AddLines (points); //Create a path gradient paint brushPathGradientBrush PGB =NewPathGradientBrush (path); //Set Center point color (end color)Pgb. Centercolor =color.red; //set the color of each endpoint (end color)//set the edge color of the path gradient brushPgb. Surroundcolors =Newcolor[] {color.aqua, Color.green, Color.pink, Color.White, Color.yell                ow, Color.green, Color.Blue, Color.silver, Color.Black, color.green}; //Fill Target PathGraphics.                FillPath (PGB, path); Path.                Dispose (); Pgb.            Dispose (); }

Draw colorful Pentagram

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.