(context49, scene, bounds16)
| 122972 | return bounds15; |
| 122973 | } |
| 122974 | function draw(context49, scene, bounds16) { |
| 122975 | visit(scene, (item)=>{ |
| 122976 | var opacity = item.opacity == null ? 1 : item.opacity, p, x43, y42, i, lh, tl5, str; |
| 122977 | if (bounds16 && !bounds16.intersects(item.bounds) || opacity === 0 || item.fontSize <= 0 || item.text == null || item.text.length === 0) return; |
| 122978 | context49.font = font(item); |
| 122979 | context49.textAlign = item.align || "left"; |
| 122980 | p = anchorPoint(item); |
| 122981 | x43 = p.x1, y42 = p.y1; |
| 122982 | if (item.angle) { |
| 122983 | context49.save(); |
| 122984 | context49.translate(x43, y42); |
| 122985 | context49.rotate(item.angle * DegToRad); |
| 122986 | x43 = y42 = 0; // reset x, y |
| 122987 | } |
| 122988 | x43 += item.dx || 0; |
| 122989 | y42 += (item.dy || 0) + offset(item); |
| 122990 | tl5 = textLines(item); |
| 122991 | blend(context49, item); |
| 122992 | if ((0, _vegaUtil.isArray)(tl5)) { |
| 122993 | lh = lineHeight(item); |
| 122994 | for(i = 0; i < tl5.length; ++i){ |
| 122995 | str = textValue(item, tl5[i]); |
| 122996 | if (item.fill && fill(context49, item, opacity)) context49.fillText(str, x43, y42); |
| 122997 | if (item.stroke && stroke(context49, item, opacity)) context49.strokeText(str, x43, y42); |
| 122998 | y42 += lh; |
| 122999 | } |
| 123000 | } else { |
| 123001 | str = textValue(item, tl5); |
| 123002 | if (item.fill && fill(context49, item, opacity)) context49.fillText(str, x43, y42); |
| 123003 | if (item.stroke && stroke(context49, item, opacity)) context49.strokeText(str, x43, y42); |
| 123004 | } |
| 123005 | if (item.angle) context49.restore(); |
| 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 |
no test coverage detected