首先通过CAD绘制出国旗的数据图,图中包含角度和边长数据,通过计算得到相关的比例关系。
如下:国旗的长:宽= 3:2;
以国旗的对角线的交点为圆心绘制国旗中的圆
大圆半径R:小圆半径r=2:1;
国旗的长:大圆半径=6:1;
圆心到卦内边的距离:大圆半径 = 3:2;
卦长:卦宽= 3:2;
圆心到卦外边的距离:圆心到卦内边的距离= 3:2;
卦的小黑条的宽:卦的小白条的宽= 2:1;
卦的小黑条的长:卦的小白条= 5.3:1;
通过上述的比例关系可以按照步骤绘制出成比例的韩国国旗。
var g = this.pictureBox1.CreateGraphics();
var p = new Pen(Color.Black);
var brush = new SolidBrush(Color.White);
g.FillRectangle(brush, 0,0,300,200);
var g1 = this.pictureBox1.CreateGraphics();
var brush1 = new SolidBrush(Color.Red);
brush1.Color = Color.Red;
var rect1 = new Rectangle(100, 50, 100, 100);
g1.FillEllipse(brush1, 100, 50,100,100);
g1.DrawEllipse(p, rect1);
var g2 = this.pictureBox1.CreateGraphics();
var brush2 = new SolidBrush(Color.Blue);
g2.FillEllipse(brush2, 146, 89, 50, 50);
var rect2 = new Rectangle(146, 89, 50, 50);
g2.DrawEllipse(p, rect2);
var g4 = this.pictureBox1.CreateGraphics();
var brush4 = new SolidBrush(Color.Blue);
g4.FillPie(brush4, 100, 50, 100, 100, 34,180);
var g3 = this.pictureBox1.CreateGraphics();
var p3 = new Pen(Color.Red);
var brush3 = new SolidBrush(Color.Red);
g3.FillEllipse(brush3, 104, 61, 50, 50);
var rect3 = new Rectangle(104, 61, 50, 50);
g3.DrawEllipse(p3, rect3);
var g0= this.pictureBox1.CreateGraphics();
SolidBrush redBrush = new SolidBrush(Color.Black);
System.Drawing.Point point1 = new System.Drawing.Point(226, 122);//
System.Drawing.Point point2 = new System.Drawing.Point(200, 162);//
System.Drawing.Point point4 = new System.Drawing.Point(206, 167);//
System.Drawing.Point point3 = new System.Drawing.Point(233, 126);//
System.Drawing.Point[] points = { point1, point2, point4, point3 };
g0.FillPolygon(redBrush, points, System.Drawing.Drawing2D.FillMode.Alternate);