| 98969 | } |
| 98970 | |
| 98971 | function hitPath(path, filled) { |
| 98972 | return function (context, o, x, y) { |
| 98973 | var item = Array.isArray(o) ? o[0] : o, |
| 98974 | fill = filled == null ? item.fill : filled, |
| 98975 | stroke = item.stroke && context.isPointInStroke, |
| 98976 | lw, |
| 98977 | lc; |
| 98978 | |
| 98979 | if (stroke) { |
| 98980 | lw = item.strokeWidth; |
| 98981 | lc = item.strokeCap; |
| 98982 | context.lineWidth = lw != null ? lw : 1; |
| 98983 | context.lineCap = lc != null ? lc : 'butt'; |
| 98984 | } |
| 98985 | |
| 98986 | return path(context, o) ? false : fill && context.isPointInPath(x, y) || stroke && context.isPointInStroke(x, y); |
| 98987 | }; |
| 98988 | } |
| 98989 | |
| 98990 | function pickPath(path) { |
| 98991 | return pick(hitPath(path)); |