attr(stroke-linecap)什么都不做

时间:2012-07-01 23:04:58

标签: raphael

var view = Raphael(10, 50, 800, 600); 
var testLine = view.path("M343,56 L343,560 Z");  // A simple straight line.
testLine.attr({stroke:"gold"}); 
testLine.attr({"stroke-width":25.0});
testLine.attr({"stroke-linecap":"round"});  // No linecap!

为什么没有将linecap设置为圆形?

1 个答案:

答案 0 :(得分:1)

通过删除'Z'路径终止符修复:

var testLine = view.path("M343,56 L343,560");