在图表上动态绘制几何形状 [英] Dynamiclly Drawing Geometry Shapes On Chart

查看:90
本文介绍了在图表上动态绘制几何形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个图表,带有一些系列.我使用鼠标左键拖动一个矩形.我使用GID +图形来绘制它,但是每次我必须清除整个绘图表面时,就像win os的绘图板一样.当我绘制另一个矩形时,我先保存矩形并重新绘制.它轻拂.

there has a Chart,with some series.i use leftbutton of mouse to drag a rectangle.I use Graphics of GID+ to draw it ,but everytime I have to clear the entire drawing surface,it just like drawing board of win os. when i draw another rectanle,i save rectangles before and repaint.it flicks .

推荐答案

有两种方法可以避免这种情况,但是它们取决于您所在的位置做图纸.您正在使用Paint事件吗?如果没有,为什么不呢?它甚至为您提供了必需的Graphics对象!

如果您使用的是paint事件,请尝试将要绘制的容器(窗体,面板或其他)的DoubleBuffered属性设置为true-可能会消除闪烁.
There are a couple of ways to avoid this, but they depend on where you are doing the drawing. Are you using the Paint event? If not, why not? It even provides you with the required Graphics object!

If you are using the paint event, then try setting the DoubleBuffered property of the container you are drawing on (form, panel, or whatever) to true - that will probably get rid of the flicker.


这篇关于在图表上动态绘制几何形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆