Method | Description | |
---|---|---|
fit ( integer $width, integer $height, integer $box, boolean $force = false ) : array | Fits width and height into a defined box and keeps the ratio | |
fit_height ( integer $width, integer $height, integer $fit, boolean $force = false ) : array | Fits width and height by a passed height and keeps the ratio | |
fit_width ( integer $width, integer $height, integer $fit, boolean $force = false ) : array | Fits width and height by a passed width and keeps the ratio | |
ratio ( integer $width, integer $height ) : float | Gets the ratio by width and height |
static public fit_height ( integer $width, integer $height, integer $fit, boolean $force = false ) : array | ||
$width | integer | |
$height | integer | |
$fit | integer | The new height |
$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 |
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 |