cancel
Showing results for 
Search instead for 
Did you mean: 

Why using CanvasWidget class to draw lines encounter flicking problem?

Robin Zhou
Associate II

0690X000008w53bQAA.jpg

Hi, I encounter a problem to continuously display a physiological waveform through the subclass of CanvasWidget class developed. The dots on the line were added to an FIFO buffer in the subclass within the handleTickEvent() function of the view, then invalidate the corresponding rectangular area with InvalidateRec() function, the drawCanvasWidget() virtual function was reimplementation in the subclass to draw the lines with canvas render class.

But as show in the picture, the lines near to the right border of the widget would flicking continuously. Is there a good way to solve the flicking problem ? Suggestion is needed here.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

This is usually because you're drawing outside the area you're invalidating, so the flickering is due to a pixel being present in one framebuffer but not the other. Probably your invalidated area is not wide enough.

/Martin

View solution in original post

3 REPLIES 3
Martin KJELDSEN
Chief III

This is usually because you're drawing outside the area you're invalidating, so the flickering is due to a pixel being present in one framebuffer but not the other. Probably your invalidated area is not wide enough.

/Martin

Robin Zhou
Associate II

Thanks for the reply. My problem is solved.

BMara.1
Associate II

Would you have any example code that youd be willing to share? I am currently having the same issue.