()
| 121678 | return Math.max(min, Math.min(value2, max)); |
| 121679 | } |
| 121680 | function vg_rect() { |
| 121681 | var x7 = rectangleX, y6 = rectangleY, width = rectangleWidth, height = rectangleHeight, crTL = number(0), crTR = crTL, crBL = crTL, crBR = crTL, context16 = null; |
| 121682 | function rectangle1(_, x0, y0) { |
| 121683 | var buffer, x1 = x0 != null ? x0 : +x7.call(this, _), y1 = y0 != null ? y0 : +y6.call(this, _), w2 = +width.call(this, _), h7 = +height.call(this, _), s = Math.min(w2, h7) / 2, tl1 = clamp(+crTL.call(this, _), 0, s), tr1 = clamp(+crTR.call(this, _), 0, s), bl1 = clamp(+crBL.call(this, _), 0, s), br1 = clamp(+crBR.call(this, _), 0, s); |
| 121684 | if (!context16) context16 = buffer = (0, _d3Path.path)(); |
| 121685 | if (tl1 <= 0 && tr1 <= 0 && bl1 <= 0 && br1 <= 0) context16.rect(x1, y1, w2, h7); |
| 121686 | else { |
| 121687 | var x2 = x1 + w2, y2 = y1 + h7; |
| 121688 | context16.moveTo(x1 + tl1, y1); |
| 121689 | context16.lineTo(x2 - tr1, y1); |
| 121690 | context16.bezierCurveTo(x2 - C * tr1, y1, x2, y1 + C * tr1, x2, y1 + tr1); |
| 121691 | context16.lineTo(x2, y2 - br1); |
| 121692 | context16.bezierCurveTo(x2, y2 - C * br1, x2 - C * br1, y2, x2 - br1, y2); |
| 121693 | context16.lineTo(x1 + bl1, y2); |
| 121694 | context16.bezierCurveTo(x1 + C * bl1, y2, x1, y2 - C * bl1, x1, y2 - bl1); |
| 121695 | context16.lineTo(x1, y1 + tl1); |
| 121696 | context16.bezierCurveTo(x1, y1 + C * tl1, x1 + C * tl1, y1, x1 + tl1, y1); |
| 121697 | context16.closePath(); |
| 121698 | } |
| 121699 | if (buffer) { |
| 121700 | context16 = null; |
| 121701 | return buffer + "" || null; |
| 121702 | } |
| 121703 | } |
| 121704 | rectangle1.x = function(_) { |
| 121705 | if (arguments.length) { |
| 121706 | x7 = number(_); |
| 121707 | return rectangle1; |
| 121708 | } else return x7; |
| 121709 | }; |
| 121710 | rectangle1.y = function(_) { |
| 121711 | if (arguments.length) { |
| 121712 | y6 = number(_); |
| 121713 | return rectangle1; |
| 121714 | } else return y6; |
| 121715 | }; |
| 121716 | rectangle1.width = function(_) { |
| 121717 | if (arguments.length) { |
| 121718 | width = number(_); |
| 121719 | return rectangle1; |
| 121720 | } else return width; |
| 121721 | }; |
| 121722 | rectangle1.height = function(_) { |
| 121723 | if (arguments.length) { |
| 121724 | height = number(_); |
| 121725 | return rectangle1; |
| 121726 | } else return height; |
| 121727 | }; |
| 121728 | rectangle1.cornerRadius = function(tl2, tr2, br2, bl2) { |
| 121729 | if (arguments.length) { |
| 121730 | crTL = number(tl2); |
| 121731 | crTR = tr2 != null ? number(tr2) : crTL; |
| 121732 | crBR = br2 != null ? number(br2) : crTL; |
| 121733 | crBL = bl2 != null ? number(bl2) : crTR; |
| 121734 | return rectangle1; |
| 121735 | } else return crTL; |
| 121736 | }; |
| 121737 | rectangle1.context = function(_) { |
no test coverage detected