关于canvas渐变线问题 IOS bug
发布于 6 年前 作者 motao 18925 次浏览 来自 问答

       let gnt = context.createLinearGradient(points[index - 1].x, points[index - 1].y, item.x, item.y);

 

         debugger;

    gnt.addColorStop(0, opts.wmc_colors[index - 1]);

     gnt.addColorStop(1, opts.wmc_colors[index]);

 

context.setStrokeStyle(gnt);

。。。

 context.bezierCurveTo(tt1, tt2,tt3,tt4,tt5,tt6);

呈现得曲线,出现问题,安卓和PC都没问题,但再IOS中就会变得很大

android下图 (正常)

ios下图

1 回复

您好,请教下:直线和曲线交叉的地方,如何实现平滑过渡的?

回到顶部