mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 14:36:13 +01:00
5 lines
No EOL
124 B
Text
5 lines
No EOL
124 B
Text
function string_scale(str, w, h) {
|
|
var ww = string_width(str);
|
|
var hh = string_height(str);
|
|
return min(w / ww, h / hh);
|
|
} |