PHP 클래스 size, kirby

상속: extends Controller
파일 보기 프로젝트 열기: bastianallgeier/kirby 1 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

fit() 정적인 공개 메소드

Fits width and height into a defined box and keeps the ratio
static public fit ( integer $width, integer $height, integer $box, boolean $force = false ) : array
$width integer
$height integer
$box integer
$force boolean If width and height are smaller than the box this will force upscaling
리턴 array An array with a key and value for width and height

fit_height() 정적인 공개 메소드

Fits width and height by a passed height and keeps the ratio
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
리턴 array An array with a key and value for width and height

fit_width() 정적인 공개 메소드

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
리턴 array An array with a key and value for width and height

ratio() 정적인 공개 메소드

Gets the ratio by width and height
static public ratio ( integer $width, integer $height ) : float
$width integer
$height integer
리턴 float