(textBB, width, height)
| 839 | } |
| 840 | |
| 841 | function fitTextInsideBox(textBB, width, height) { |
| 842 | // compute scaling ratio to have text fit within specified width and height |
| 843 | var ratio = Math.min(width / textBB.width, height / textBB.height); |
| 844 | return [ratio, textBB, width + 'x' + height]; |
| 845 | } |
| 846 | |
| 847 | function fitTextInsideCircle(textBB, radius) { |
| 848 | // compute scaling ratio to have text fit within specified radius |
no outgoing calls
no test coverage detected
searching dependent graphs…