Cheetah
Public Member Functions | Public Attributes | List of all members
Intervention\Image\Constraint Class Reference

Public Member Functions

 __construct (Size $size)
 
 getSize ()
 
 fix ($type)
 
 isFixed ($type)
 
 aspectRatio ()
 
 upsize ()
 

Public Attributes

const ASPECTRATIO = 1
 
const UPSIZE = 2
 

Detailed Description

Definition at line 5 of file Constraint.php.

Constructor & Destructor Documentation

◆ __construct()

Intervention\Image\Constraint::__construct ( Size  $size)

Create a new constraint based on size

Parameters
Size$size

Definition at line 36 of file Constraint.php.

Member Function Documentation

◆ aspectRatio()

Intervention\Image\Constraint::aspectRatio ( )

Fixes aspect ratio in current constraint

Returns
void

Definition at line 77 of file Constraint.php.

◆ fix()

Intervention\Image\Constraint::fix (   $type)

Fix the given argument in current constraint

Parameters
integer$type
Returns
void

Definition at line 56 of file Constraint.php.

◆ getSize()

Intervention\Image\Constraint::getSize ( )

Returns current size of constraint

Returns
\Intervention\Image\Size

Definition at line 46 of file Constraint.php.

◆ isFixed()

Intervention\Image\Constraint::isFixed (   $type)

Checks if given argument is fixed in current constraint

Parameters
integer$type
Returns
boolean

Definition at line 67 of file Constraint.php.

◆ upsize()

Intervention\Image\Constraint::upsize ( )

Fixes possibility to size up in current constraint

Returns
void

Definition at line 87 of file Constraint.php.

Member Data Documentation

◆ ASPECTRATIO

const Intervention\Image\Constraint::ASPECTRATIO = 1

Bit value of aspect ratio constraint

Definition at line 10 of file Constraint.php.

◆ UPSIZE

const Intervention\Image\Constraint::UPSIZE = 2

Bit value of upsize constraint

Definition at line 15 of file Constraint.php.


The documentation for this class was generated from the following file: