C#GDI+双缓冲高效绘图
Rectangle rectangle = e.ClipRectangle;
BufferedGraphicsContext GraphicsContext = BufferedGraphicsManager.Current;
BufferedGraphics myBuffer = GraphicsContext.Allocate(e.Graphics, e.ClipRectangle);
Graphics g = myBuffer.Graphics;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.SmoothingMode = SmoothingMode.HighQuality;
g.Clear(BackColor);
Pen bluePen2 = new Pen(Color.Blue);
LineDrawRoutine(g, bluePen2);
myBuffer.Render(e.Graphics);
g.Dispose();
myBuffer.Dispose();
posted on 2010-10-29 13:57 kisstome88 阅读(1130) 评论(1) 编辑 收藏 举报