0
点赞
收藏
分享

微信扫一扫

找点填充三角形

以沫的窝 2022-04-02 阅读 83
c#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var g = pictureBox1.CreateGraphics();

            var brush = new SolidBrush(Color.Red);


            brush.Color = Color.Green;
            Rectangle[] h = new Rectangle[3];

            Point point1 = new Point(120, 200);

            Point point2 = new Point(200, 200);

            Point point3 = new Point(160, 131);

            Point[] i = { point1, point2, point3 };

            g.FillPolygon(Brushes.Red, i);
        }
    }
}

 

举报

相关推荐

空心三角形

递归三角形

三角形面积

三角形判断

【数字三角形】

星号三角形

绘制三角形

0 条评论