撒拉威阿拉伯民主共和国位于非洲西北部,位处撒哈拉沙漠西部,西滨大西洋,与摩洛哥、毛里塔尼亚、阿尔及利亚相邻,人口约26万,面积266000平方公里,最大城市为阿尤恩。该地是一个有争议地区,摩洛哥声明对此地区拥有主权。目前,撒拉威政府仅统治极小部分领土,其余大部分为摩洛哥所占领。共有55个国家承认撒拉威阿拉伯民主共和国。国旗为长方形,长宽之比为2:1。左侧为红色三角形。右侧自上而下由黑白绿三色宽带相连组成。白色部分中央有一轮红色新月和一颗红色五角星。以上四种颜色为泛阿拉伯颜色。黑色象征死亡,绿色象征生命,白色象征和平,红色象征鲜血,星月象征伊斯兰教。
EDA
坐标数据比例关系
vs代码
namespace Windows1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//矩形边框
var g = this.pictureBox1.CreateGraphics();
SolidBrush solidBrush0 = new SolidBrush(Color.Black);
SolidBrush solidBrush1 = new SolidBrush(Color.White);
SolidBrush solidBrush2 = new SolidBrush(Color.Green);
SolidBrush solidBrush3 = new SolidBrush(Color.Red);
Point point1 = new Point(0, 0);
Point point2 = new Point(396, 0);
Point point3 = new Point(90, 66);
Point point4 = new Point(396, 66);
Point point5 = new Point(136, 99);
Point point6 = new Point(90, 132);
Point point7 = new Point(396, 132);
Point point8 = new Point(0, 198);
Point point9 = new Point(396, 198);
Point[] points1 = { point4, point3, point1, point2 };
Point[] points2 = { point7, point6, point5, point3, point4 };
Point[] points3 = { point9, point8, point6, point7 };
Point[] points4 = { point8, point6, point5, point3, point1 };
g.FillPolygon(solidBrush0, points1, System.Drawing.Drawing2D.FillMode.Alternate);
g.FillPolygon(solidBrush1, points2, System.Drawing.Drawing2D.FillMode.Alternate);
g.FillPolygon(solidBrush2, points3, System.Drawing.Drawing2D.FillMode.Alternate);
g.FillPolygon(solidBrush3, points4, System.Drawing.Drawing2D.FillMode.Alternate);
//月牙
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Brush bush = new SolidBrush(Color.Red);//填充的颜色
g.FillEllipse(bush, 169, 71, 55, 55);
Brush redbush = new SolidBrush(Color.White);//填充的颜色
g.FillEllipse(redbush, 179, 71, 55, 55);
//红色五角形
var pen = new Pen(Color.Red);
int R = 20;
const double PI = Math.PI;
double ct1 = PI / 10.0;
var brush = new SolidBrush(Color.Red);
Point pt0 = new Point(202, 99);
Point[] pts = new Point[10];
double dct = PI / 5.0;
double r = R * Math.Cos(4 * Math.PI/10.0) / Math.Cos(2 * Math.PI/10.0);
int i = 0;
for (i = 0; i < 9; i += 2)
{
pts[i].X = (int)Math.Round(pt0.X + R * Math.Cos(i * dct-PI/2));
pts[i].Y = (int)Math.Round(pt0.Y + R * Math.Sin(i * dct-PI / 2));
}
for (i = 1; i < 10; i += 2)
{
pts[i].X = (int)Math.Round(pt0.X + r * Math.Cos(i * dct-PI / 2));
pts[i].Y = (int)Math.Round(pt0.Y + r * Math.Sin(i * dct-PI / 2));
}
g.FillPolygon(brush, pts);
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
}
vs