MCPcopy Index your code
hub / github.com/microsoft/SandDance / stroke

Function stroke

docs/app/js/sanddance-app.js:122288–122305  ·  view source on GitHub ↗
(context29, item, opacity)

Source from the content-addressed store, hash-verified

122286}
122287var Empty = [];
122288function stroke(context29, item, opacity) {
122289 var lw = (lw = item.strokeWidth) != null ? lw : 1;
122290 if (lw <= 0) return false;
122291 opacity *= item.strokeOpacity == null ? 1 : item.strokeOpacity;
122292 if (opacity > 0) {
122293 context29.globalAlpha = opacity;
122294 context29.strokeStyle = color(context29, item, item.stroke);
122295 context29.lineWidth = lw;
122296 context29.lineCap = item.strokeCap || "butt";
122297 context29.lineJoin = item.strokeJoin || "miter";
122298 context29.miterLimit = item.strokeMiterLimit || 10;
122299 if (context29.setLineDash) {
122300 context29.setLineDash(item.strokeDash || Empty);
122301 context29.lineDashOffset = item.strokeDashOffset || 0;
122302 }
122303 return true;
122304 } else return false;
122305}
122306function compare(a, b11) {
122307 return a.zindex - b11.zindex || a.index - b11.index;
122308}

Callers 4

drawPathFunction · 0.70
draw$4Function · 0.70
pathFunction · 0.70
drawFunction · 0.70

Calls 1

colorFunction · 0.70

Tested by

no test coverage detected