Decreasing Polyline Stroke Width

落花浮王杯 提交于 2019-12-12 02:24:38

问题


I am trying to mimic the behavior of markers on white boards and was wondering if it I can do it with svg polylines. I know the stroke width can be set but can be it changed to vary depending on the velocity of the mouse which I can figure out or is it just a constant value for the stroke?


回答1:


You can't have multiple stroke widths in a single polyline element. I think canvas is probably a better fit for this task.




回答2:


Or if you wanted to use SVG, instead of using a <polyline>, use a series of connected <line>s



来源:https://stackoverflow.com/questions/18003323/decreasing-polyline-stroke-width

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!