How to draw path with variable width in canvas

前端 未结 5 1029
猫巷女王i
猫巷女王i 2020-12-03 20:36

I am using the following line of code to draw a path on a Canvas. So far everything works fine and I can easily draw path using this code.

But now our requirement is

5条回答
  •  北海茫月
    2020-12-03 20:49

    You can use getPressure() method and combine it with this answer https://stackoverflow.com/a/15533607/1112882 to make it work. Idea is to keep storing widths and using it.

提交回复
热议问题