Why my simulator has a white line on screen?

this based on a canvas of the whole screen。When I press the top button, as long as the mouse stays in the window, there will be a white line, but this will not change if I press the button and move the mouse out of the window 。

  • The buttons are transparent in style, built on the canvas。

Without knowing the details of your implementation it seems like an off-by-one issue in y (or height) somewhere.
E.g. is y1 = 20, y2=30 is 11 px not 10 px.

To get more help please send a minimal (only the essential parts to demonstrate the problem) code to reproduce the issue.