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

C# GDI+画三色笔闪烁问题!
我现在要绘制个三色笔画线,并且画的过程也得呈现出来是三色笔,画的过程不能闪烁!
我现在已经画好了,但是有个问题是画的过程中不停地闪烁,请问各位CSDN的各位前辈,我这种做法如何避免这个闪烁的问题?如果不能避免,有什么好的方法画出三色笔呢,要求能达到上面的几点!

以下是我的代码,其实很简单就是同一路径用不同的Pen画三次。
 Pen pen3 = new Pen(Color.Red, 10);
 Pen pen2 = new Pen(Color.Yellow, 15);
 Pen pen1 = new Pen(Color.Blue, 20);
 pen1.LineJoin = System.Drawing.Drawing2D.LineJoin.Round;
 pen1.StartCap = System.Drawing.Drawing2D.LineCap.Round;
 pen1.EndCap = System.Drawing.Drawing2D.LineCap.Round;

 pen2.LineJoin = System.Drawing.Drawing2D.LineJoin.Round;
 pen2.StartCap = System.Drawing.Drawing2D.LineCap.Round;
 pen2.EndCap = System.Drawing.Drawing2D.LineCap.Round;

 pen3.LineJoin = System.Drawing.Drawing2D.LineJoin.Round;
 pen3.StartCap = System.Drawing.Drawing2D.LineCap.Round;
 pen3.EndCap = System.Drawing.Drawing2D.LineCap.Round;

if (SvgSpecialPenTypeClass.SvgSpecialPenType == 4)
  {
  localGraphics.DrawPath(pen1, m_docTraceBook.gp);
  localGraphics.DrawPath(pen2, m_docTraceBook.gp);
  localGraphics.DrawPath(pen3, m_docTraceBook.gp);
  }
下图是要求实现的GDI+线:


------解决方案--------------------
不懂 帮顶哈!!