目前知道有兩種方法畫多邊形GraphicsPath但是用畫多邊形的方式畫三角形不太好老畫不正的截圖放大就明顯了
代碼
Point point = new Point( );
Point point = new Point( );
Point point = new Point( );
Point[] pntArr = {point point point};
eGraphicsFillPolygon(BrushesRed pntArr);
代碼
int len = ;
int x = ;
int y = ;
Point[] pntArr = new Point[];
pntArr[] = new Point(x y);
pntArr[] = new Point(x len y);
pntArr[] = new Point(x len / (int)(len * MathSqrt() / + y));
GraphicsPath path = new GraphicsPath();
pathAddLines(pntArr);
eGraphicsSmoothingMode = SystemDrawingDrawingDSmoothingModeAntiAlias;
eGraphicsFillPath(BrushesRed path);
eGraphicsSmoothingMode = SystemDrawingDrawingDSmoothingModeDefault;
From:http://tw.wingwit.com/Article/program/ASP/201311/21782.html