C#填充平行四边形

来源:百度知道 编辑:UC知道 时间:2024/07/07 10:36:19
用C#编程填充平行四边形,不是矩形,非常感谢!!

private void Form1_Paint(object sender, PaintEventArgs e)
{
// 准备平行四边形
Point[] sbx = new Point[]{
new Point(100, 50),
new Point(400, 50),
new Point(350, 200),
new Point(50, 200)
};
// 绘制
e.Graphics.FillPolygon(SystemBrushes.Window, sbx);
}