Writing a paint program à la MS Paint - how to interpolate between mouse move events?

后端 未结 6 508
陌清茗
陌清茗 2020-12-14 22:48

I want to write a paint program in the style of MS Paint.

For painting things on screen when the user moves the mouse, I have to wait for mouse move events and draw

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 23:29

    so, as I see the problem of jagged edge of freehand made curve, when the mouse are moved very fast, is not solved !!! In my opinion there are need to work around with the polling frequency of mousemove event in the system i.e. using different mouse driver or smf.. And the second way is the math.. using some kind of algorithm, to accuratly bend the straight line between two points when the mouse event is polled out.. For clear view you can compare how is drawed free hand line in photoshop and how in mspaint.. thanks folks.. ;)

提交回复
热议问题