(x, ratio, width)
| 59442 | }; |
| 59443 | } |
| 59444 | function scaleX(x, ratio, width) { |
| 59445 | var r = Math.min(Math.round(x * ratio), width - 1); |
| 59446 | return r; |
| 59447 | } |
| 59448 | function scaleY(y, ratio, height, yInvert) { |
| 59449 | return yInvert ? Math.max(0, height - 1 - Math.round(y * ratio)) : Math.min(Math.round(y * ratio), height - 1); |
| 59450 | } |