Since mouse events are not coming on every one pixel change when moving cursor fast, then you have draw line (not only pixel) from the last mouse position (which you have to save on mouse move event I think) to current position.