Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
715
Draw Rectangle on MouseMove Event
posted

Hi,

I am trying to zoom user selected portion of chart.

user can draw rectangle or square by dragging mouse mouse.

startPosition : Mouse Down

End Position : Mouse Up or MouseMove

i draw rectangle from startPosition to End Position in FillSceneGraph event.

basically on MouseMove event i store EndPosition as current mouse location and call InvalidateLayers function on chart.

In FillSceneGraph event i draw rectangle from startPosition to EndPosition and add it to SceneGraph.

 Every thing works fine except the delay in displaying rectangle.

is there any way to avoid the delay..or is FillSceneGraph is right place to add primitives on mousemove event.

as mousemove event is called for every few milliseconds ..

 

Thanks,

Kk

Parents Reply Children