これは、配列内で同じポイントを複数回指定したことが原因です。つまり、最初と最後のポイントです。
FillClosedCurve
パスを「閉じます」....その必要はありません...実際、ポイントを2回指定するのは正しくありません....ポイントからポイントに戻るパスを閉じようとするためです同じ位置....アーティファクトを引き起こします。
違いを示すための小さな例を次に示します。
private void Form1_Paint(object sender, PaintEventArgs e)
{
PointF[] arrayDuplicatedPointAtStartAndEnd =
{
new PointF(20.0F, 20.0F),
new PointF(150.0F, 50.0F),
new PointF(150.0F, 150.0F),
new PointF(20.0F, 20.0F),
};
PointF[] arrayWithoutPointOverlap =
{
new PointF(20.0F, 20.0F),
new PointF(150.0F, 50.0F),
new PointF(150.0F, 150.0F)
};
float tension = 0.4F;
using (SolidBrush redBrush = new SolidBrush(Color.Red))
{
e.Graphics.FillClosedCurve(redBrush, arrayDuplicatedPointAtStartAndEnd, FillMode.Winding, tension);
}
e.Graphics.TranslateTransform(110.0f, 0.0f, MatrixOrder.Prepend);
using (SolidBrush blueBrush = new SolidBrush(Color.Blue))
{
e.Graphics.FillClosedCurve(blueBrush, arrayWithoutPointOverlap, FillMode.Winding, tension);
}
}
