Definition at line 7 of file Size.php.
◆ __construct()
Intervention\Image\Size::__construct |
( |
|
$width = null , |
|
|
|
$height = null , |
|
|
Point |
$pivot = null |
|
) |
| |
Creates a new Size instance
- Parameters
-
integer | $width | |
integer | $height | |
Point | $pivot | |
Definition at line 37 of file Size.php.
◆ align()
Intervention\Image\Size::align |
( |
|
$position, |
|
|
|
$offset_x = 0 , |
|
|
|
$offset_y = 0 |
|
) |
| |
Aligns current size's pivot point to given position and moves point automatically by offset.
- Parameters
-
string | $position | |
integer | $offset_x | |
integer | $offset_y | |
- Returns
- \Intervention\Image\Size
Definition at line 278 of file Size.php.
◆ fit()
Intervention\Image\Size::fit |
( |
Size |
$size, |
|
|
|
$position = 'center' |
|
) |
| |
Resize given Size to best fitting size of current size.
- Parameters
-
- Returns
- \Intervention\Image\Size
Definition at line 225 of file Size.php.
◆ fitsInto()
Intervention\Image\Size::fitsInto |
( |
Size |
$size | ) |
|
Checks if given size fits into current size
- Parameters
-
- Returns
- boolean
Definition at line 264 of file Size.php.
◆ getHeight()
Intervention\Image\Size::getHeight |
( |
| ) |
|
Get the current height
- Returns
- integer
Definition at line 81 of file Size.php.
◆ getRatio()
Intervention\Image\Size::getRatio |
( |
| ) |
|
Calculate the current aspect ratio
- Returns
- float
Definition at line 91 of file Size.php.
◆ getWidth()
Intervention\Image\Size::getWidth |
( |
| ) |
|
Get the current width
- Returns
- integer
Definition at line 71 of file Size.php.
◆ relativePosition()
Intervention\Image\Size::relativePosition |
( |
Size |
$size | ) |
|
Calculate the relative position to another Size based on the pivot point settings of both sizes.
- Parameters
-
- Returns
- \Intervention\Image\Point
Definition at line 211 of file Size.php.
◆ resize()
Intervention\Image\Size::resize |
( |
|
$width, |
|
|
|
$height, |
|
|
Closure |
$callback = null |
|
) |
| |
Resize to desired width and/or height
- Parameters
-
integer | $width | |
integer | $height | |
Closure | $callback | |
- Returns
- Size
Definition at line 104 of file Size.php.
◆ set()
Intervention\Image\Size::set |
( |
|
$width, |
|
|
|
$height |
|
) |
| |
Set the width and height absolutely
- Parameters
-
integer | $width | |
integer | $height | |
Definition at line 50 of file Size.php.
◆ setPivot()
Intervention\Image\Size::setPivot |
( |
Point |
$point | ) |
|
Set current pivot point
- Parameters
-
Definition at line 61 of file Size.php.
◆ $height
Intervention\Image\Size::$height |
◆ $pivot
Intervention\Image\Size::$pivot |
◆ $width
Intervention\Image\Size::$width |
The documentation for this class was generated from the following file:
- plugins/intervention-image/Intervention/Image/Size.php