Fits width and height by a passed width and keeps the ratio
static public fit_width ( integer $width, integer $height, integer $fit, boolean $force = false ) : array | ||
$width | integer | |
$height | integer | |
$fit | integer | The new width |
$force | boolean | If width and height are smaller than the box this will force upscaling |
return | array | An array with a key and value for width and height |