C# GDI+ 画虚线 直接这样写 画出来的是直线。 pen.DashStyle = DashStyle.Custom;graphics.DrawLine(pen, point1, point2);怎么去自定义这个DashStyle.Custom呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Graphics graphics(this->GetDC()->m_hDC); Pen pen(Color(255, 0, 0, 0),1.f); REAL dashVals[2] = {0.3f,5.0f }; pen.SetDashPattern(dashVals, 2); pen.SetDashOffset(70); PointF p1(150, 400); PointF p2(190, 400); PointF p3(256, 310); graphics.DrawLine(&pen,p1,p2 ); graphics.DrawLine(&pen,p2,p3 ); Graphics _Graphcis = Graphics.FromHwnd(this.Handle); Pen _Pen = new Pen(Brushes.Yellow); _Pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Custom; _Pen.DashPattern = new float[] { 5f,10f }; _Graphcis.DrawLine(_Pen, 100,100, 200,100); C#中多个axwebbrowser如何不共享cookies(Session) 如何禁用datagridview的行自动增加功能!!! 小弟远程重启计算机有问题,求救各位大虾 C#网站调用VC DLL多用户同时使用时出错! 用C#开发通信服务器端的稳定性问题 用C#如何编写一个程序使这个程序无法复制(用什么方法都不行) 这是vs.net2005精简版下载地址: 求将EMF格式转为PDF格式的代码和方法..... C# winform 使用webclient上传出错 急!请教高手解答........... 请教一个C#读串口的问题 请问一个反射对象强制转换的问题
Graphics graphics(this->GetDC()->m_hDC);
Pen pen(Color(255, 0, 0, 0),1.f);
REAL dashVals[2] = {0.3f,5.0f }; pen.SetDashPattern(dashVals, 2);
pen.SetDashOffset(70); PointF p1(150, 400);
PointF p2(190, 400);
PointF p3(256, 310);
graphics.DrawLine(&pen,p1,p2 );
graphics.DrawLine(&pen,p2,p3 );
Pen _Pen = new Pen(Brushes.Yellow);
_Pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Custom;
_Pen.DashPattern = new float[] { 5f,10f };
_Graphcis.DrawLine(_Pen, 100,100, 200,100);