日期:2014-05-17  浏览次数:21232 次

我在winform上画出来的带箭头直线为什么是这个样子?

p.DashStyle = DashStyle.Solid;                       //定义实线
            p.EndCap = LineCap.ArrowAnchor;                     //定义线尾的样式为箭头
            while (k < N)
            {
                //gg.FillEllipse(myBrush, new Rectangle(point[j].X, point[j].Y, 10, 10));//画实心椭圆
                gg.DrawLine(p, point_edge[j].X, point_edge[j].Y, point_edge[j + 1].X, point_edge[j + 1].Y);
                j+=2;
                k++;
            }
WinForm 画线

------解决方案--------------------
Graphics
SmoothingMode = SmoothingMode.AntiAlias

Pen
StartCap = LineCap.Round 
EndCap = LineCap.Round
LineJoin = LineJoin.Round

------解决方案--------------------
设置单选按钮相关属性:
Text=""
AutoSize=true