(context, item, x, y, gx, gy)
| 123006 | }); |
| 123007 | } |
| 123008 | function hit(context, item, x, y, gx, gy) { |
| 123009 | if (item.fontSize <= 0) return false; |
| 123010 | if (!item.angle) return true; // bounds sufficient if no rotation |
| 123011 | // project point into space of unrotated bounds |
| 123012 | var p = anchorPoint(item), ax = p.x1, ay = p.y1, b15 = bound(tempBounds, item, 1), a = -item.angle * DegToRad, cos = Math.cos(a), sin = Math.sin(a), px4 = cos * gx - sin * gy + (ax - cos * ax + sin * ay), py4 = sin * gx + cos * gy + (ay - sin * ax - cos * ay); |
| 123013 | return b15.contains(px4, py4); |
| 123014 | } |
| 123015 | function intersectText(item, box) { |
| 123016 | const p = bound(tempBounds, item, 2); |
| 123017 | return intersectBoxLine(box, p[0], p[1], p[2], p[3]) || intersectBoxLine(box, p[0], p[1], p[4], p[5]) || intersectBoxLine(box, p[4], p[5], p[6], p[7]) || intersectBoxLine(box, p[2], p[3], p[6], p[7]); |
nothing calls this directly
no test coverage detected