MCPcopy Create free account
hub / github.com/microsoft/SandDance / hitPath

Function hitPath

docs/app/js/sanddance-app.js:122377–122388  ·  view source on GitHub ↗
(path7, filled)

Source from the content-addressed store, hash-verified

122375 };
122376}
122377function hitPath(path7, filled) {
122378 return function(context34, o, x27, y26) {
122379 var item = Array.isArray(o) ? o[0] : o, fill1 = filled == null ? item.fill : filled, stroke1 = item.stroke && context34.isPointInStroke, lw, lc;
122380 if (stroke1) {
122381 lw = item.strokeWidth;
122382 lc = item.strokeCap;
122383 context34.lineWidth = lw != null ? lw : 1;
122384 context34.lineCap = lc != null ? lc : "butt";
122385 }
122386 return path7(context34, o) ? false : fill1 && context34.isPointInPath(x27, y26) || stroke1 && context34.isPointInStroke(x27, y26);
122387 };
122388}
122389function pickPath(path8) {
122390 return pick$1(hitPath(path8));
122391}

Callers 3

pickPathFunction · 0.70
markMultiItemPathFunction · 0.70
sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected