绘制无闪烁线条
在delphi中,可以在异或模式下重画一条线,在这种模式下笔与背景色合并并导致隐藏线,如果我们背景中有很多颜色,则线会用该颜色重绘,我怎样才能在c#, 我不想再次用背景色重画线来隐藏线 我还应该说 我想在面板鼠标移动事件中画线以将一个矩形形状连接到另一个矩形形状
In delphi there was a ability to redraw a line in xor mode ,in this mode pen merged with backcolor and caused to hide the line,and if we had many color in background the line redrew with that color,how can i do same thing in c#,
i don't wanna redraw line with backcolor again to hide line
also i should say
i want to draw line in panel mousemove event to connect one rectangle shape to another
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 .net 世界中,您基本上是重画背景色并重画线条。您可以使用 DoubleBuffering 来帮助最大程度地减少闪烁。
如果您执意要尝试老派,请查看 SetRop2 api称呼。
In the .net world, you basically redraw the backcolor and redraw your line. You can use DoubleBuffering to help minimize the flickering.
If you are dead set on trying to go old school, look into the SetRop2 api call.